mirror of https://gitee.com/openkylin/openmpi.git
Import Upstream version 4.1.4
This commit is contained in:
commit
b5b9027bc8
|
@ -0,0 +1,578 @@
|
|||
Open MPI Authors
|
||||
================
|
||||
|
||||
The following cumulative list contains the names and email addresses
|
||||
of all individuals who have committed code to the Open MPI repository
|
||||
(either directly or through a third party, such as through a
|
||||
Github.com pull request). Note that these email addresses are not
|
||||
guaranteed to be current; they are simply a unique indicator of the
|
||||
individual who committed them.
|
||||
|
||||
|
||||
Abhishek Joshi
|
||||
abhishek.joshi@broadcom.com
|
||||
Abhishek Kulkarni
|
||||
adkulkar@cs.indiana.edu
|
||||
Aboorva Devarajan
|
||||
abodevar@in.ibm.com
|
||||
aburvadevarajan@gmail.com
|
||||
Adrian Knoth
|
||||
adi@minet.uni-jena.de
|
||||
Adrian Reber
|
||||
adrian@lisas.de
|
||||
areber@redhat.com
|
||||
Ake Sandgren
|
||||
ake.sandgren@hpc2n.umu.se
|
||||
Akshay Venkatesh
|
||||
akvenkatesh@nvidia.com
|
||||
Alejandro Vilches
|
||||
alejandro.vilches@intel.com
|
||||
Aleksey Senin
|
||||
alekseys@mellanox.com
|
||||
Alex Anenkov
|
||||
anenkov.ru@gmail.com
|
||||
Alex Margolin
|
||||
alex.margolin@huawei.com
|
||||
alex.margolin@mail.huji.ac.il
|
||||
Alex Mikheev
|
||||
alexm@mellanox.com
|
||||
Alexander Grund
|
||||
flamefire@users.noreply.github.com
|
||||
Alina Sklarevich
|
||||
alinas@mellanox.com
|
||||
Anandhi S Jayakumar
|
||||
anandhi.s.jayakumar@intel.com
|
||||
Andreas Knüpfer
|
||||
andreas.knuepfer@tu-dresden.de
|
||||
Andrew Friedley
|
||||
afriedle@osl.iu.edu
|
||||
andrew.friedley@intel.com
|
||||
Andrew J. Hesford
|
||||
ajh@sideband.org
|
||||
Andrew Lumsdaine
|
||||
lums@cs.indiana.edu
|
||||
Andrey Maslennikov
|
||||
andreyma@mellanox.com
|
||||
Annapurna Dasari
|
||||
annapurna.dasari@intel.com
|
||||
Antoine Dechaume
|
||||
antoined@users.noreply.github.com
|
||||
Anya Tatashina
|
||||
anya.tatashina@sun.com
|
||||
Aravind Gopalakrishnan
|
||||
aravind.gopalakrishnan@intel.com
|
||||
Artem Polyakov
|
||||
artpol84@gmail.com
|
||||
Artem Ryabov
|
||||
artemry@mellanox.com
|
||||
Artemy Kovalyov
|
||||
artemyko@mellanox.com
|
||||
Aurelien Bouteiller
|
||||
bouteill@icl.utk.edu
|
||||
Austen Lauria
|
||||
awlauria@us.ibm.com
|
||||
Avneesh Pant
|
||||
avneesh.pant@qlogic.com
|
||||
Ben Menadue
|
||||
ben.menadue@nci.org.au
|
||||
Benoît Legat
|
||||
benoit.legat@gmail.com
|
||||
Bernhard M. Wiedemann
|
||||
bwiedemann@suse.de
|
||||
Bert Wesarg
|
||||
bert.wesarg@tu-dresden.de
|
||||
Bill D'Amico
|
||||
bdamico@cisco.com
|
||||
Boris Karasev
|
||||
karasev.b@gmail.com
|
||||
Brad Benton
|
||||
brad.benton@us.ibm.com
|
||||
Brad Penoff
|
||||
penoff@cs.ubc.ca
|
||||
Brelle Emmanuel
|
||||
emmanuel.brelle@atos.net
|
||||
Brian Barrett
|
||||
bbarrett@amazon.com
|
||||
brbarret@open-mpi.org
|
||||
Brice Goglin
|
||||
brice.goglin@inria.fr
|
||||
Bryce Glover
|
||||
randomdsdevel@gmail.com
|
||||
Camille Coti
|
||||
ccoti@icl.utk.edu
|
||||
Carlos Bederián
|
||||
bc@famaf.unc.edu.ar
|
||||
Charles Shereda
|
||||
cpshereda@lanl.gov
|
||||
Chris Ward
|
||||
tjcw@uk.ibm.com
|
||||
Christian Bell
|
||||
christian.bell@qlogic.com
|
||||
Christoph Niethammer
|
||||
niethammer@hlrs.de
|
||||
Christopher Yeoh
|
||||
cyeoh@au1.ibm.com
|
||||
Clement Foyer
|
||||
clement.foyer@inria.fr
|
||||
Clément FOYER
|
||||
clementfoyer@users.noreply.github.com
|
||||
Craig E Rasmussen
|
||||
rasmus@cas.uoregon.edu
|
||||
Dan Lacher
|
||||
dan.lacher@sun.com
|
||||
Dave Goodell
|
||||
dgoodell@cisco.com
|
||||
David Daniel
|
||||
ddd@lanl.gov
|
||||
David Eberius
|
||||
deberius@vols.utk.edu
|
||||
David Solt
|
||||
dsolt@us.ibm.com
|
||||
David Wootton
|
||||
dwootton@us.ibm.com
|
||||
Denis Dimick
|
||||
dgdimick@lnal.gov
|
||||
Devendar Bureddy
|
||||
devendar@mellanox.com
|
||||
Devesh Sharma
|
||||
devesh.sharma@broadcom.com
|
||||
Dimitar Pashov
|
||||
d.pashov@gmail.com
|
||||
Dipti Kothari
|
||||
dkothar@amazon.com
|
||||
Donald Kerr
|
||||
donald.kerr@oracle.com
|
||||
Doron Shoham
|
||||
dorons@mellanox.com
|
||||
Durgesh
|
||||
durg1222@in.ibm.com
|
||||
Edgar Gabriel
|
||||
edgar.gabriel1@outlook.com
|
||||
edgar.gabriel@amd.com
|
||||
egabriel@central.uh.edu
|
||||
gabriel@cs.uh.edu
|
||||
Elena Elkina
|
||||
elena.elkina@itseez.com
|
||||
Ethan Mallove
|
||||
ethan.mallove@oracle.com
|
||||
Eugene Loh
|
||||
eugene.loh@oracle.com
|
||||
Fangrui Song
|
||||
i@maskray.me
|
||||
Federico Reghenzani
|
||||
federico1.reghenzani@mail.polimi.it
|
||||
Francois WELLENREITER
|
||||
francois.wellenreiter@atos.net
|
||||
wellen@free.fr
|
||||
Gabe Saba
|
||||
sabgabe@amazon.com
|
||||
Gabriel Pichot
|
||||
gabriel.pichot@gmail.com
|
||||
Galen Shipman
|
||||
gshipman@lanl.gov
|
||||
Gaëtan Bossu
|
||||
gbossu@ddn.com
|
||||
Geoffrey Paulsen
|
||||
gpaulsen@us.ibm.com
|
||||
Geoffroy Vallee
|
||||
geoffroy.vallee@gmail.com
|
||||
George Bosilca
|
||||
bosilca@eecs.utk.edu
|
||||
bosilca@icl.utk.edu
|
||||
Gilles Gouaillardet
|
||||
gilles.gouaillardet@iferc.org
|
||||
gilles@rist.or.jp
|
||||
Ginger Young
|
||||
gingery@lanl.gov
|
||||
Gleb Natapov
|
||||
gleb@voltaire.com
|
||||
Goldman, Adam
|
||||
adam.goldman@intel.com
|
||||
Gopal Santhanaraman
|
||||
santhana@osu.edu
|
||||
Graham Fagg
|
||||
gef@icl.utk.edu
|
||||
Greg Koenig
|
||||
koenig@acm.org
|
||||
Greg Watson
|
||||
gwatson@lanl.gov
|
||||
Gregory M. Kurtzer
|
||||
gmkurtzer@lbl.gov
|
||||
Guillaume Mercier
|
||||
mercier@labri.fr
|
||||
Guillaume Papauré
|
||||
guillaume.papaure@bull.net
|
||||
Hadi Montakhabi
|
||||
hmontakhabi@uh.edu
|
||||
Harald Klimach
|
||||
harald@klimachs.de
|
||||
Harumi Kuno
|
||||
harumi.kuno@hpe.com
|
||||
Hessam Mirsadeghi
|
||||
hmirsadeghi@nvidia.com
|
||||
Howard Pritchard
|
||||
howardp@lanl.gov
|
||||
hppritcha@gmail.com
|
||||
Iain Bason
|
||||
iain.bason@oracle.com
|
||||
Igor Ivanov
|
||||
igor.ivanov.va@gmail.com
|
||||
igor.ivanov@itseez.com
|
||||
Igor Usarov
|
||||
igoru@mellanox.com
|
||||
James Clark
|
||||
james.clark@arm.com
|
||||
Jason Williams
|
||||
uberlinuxguy@gmail.com
|
||||
Jed Brown
|
||||
jed@jedbrown.org
|
||||
Jeff Hammond
|
||||
jeff.science@gmail.com
|
||||
Jeff Squyres
|
||||
jeff@squyres.com
|
||||
jsquyres@cisco.com
|
||||
Jelena Pjesivac-Grbovic
|
||||
pjesa@icl.iu.edu
|
||||
Jie Zhang
|
||||
zhngaj@amazon.com
|
||||
Jijo Varghese
|
||||
jijo733@gmail.com
|
||||
Jithin Jose
|
||||
jithin.jose@intel.com
|
||||
John L. Jolly
|
||||
jjolly@suse.com
|
||||
John Westlund
|
||||
john.a.westlund@intel.com
|
||||
Jon Mason
|
||||
jdmason@opengridcomputing.com
|
||||
Jordan Cherry
|
||||
cherryj@amazon.com
|
||||
Jordan Hayes
|
||||
jhayes@ucr.edu
|
||||
Jose Roman
|
||||
jroman@dsic.upv.es
|
||||
Joseph Schuchart
|
||||
schuchart@hlrs.de
|
||||
schuchart@icl.utk.edu
|
||||
Josh Hursey
|
||||
jhursey@us.ibm.com
|
||||
jjhursey@open-mpi.org
|
||||
Joshua Gerrard
|
||||
enquiries@joshuagerrard.com
|
||||
joshuagerrard+ompi-commit@protonmail.com
|
||||
Joshua Ladd
|
||||
jladd.mlnx@gmail.com
|
||||
joshual@mellanox.com
|
||||
KAWASHIMA Takahiro
|
||||
rivis.kawashima@nifty.com
|
||||
t-kawashima@jp.fujitsu.com
|
||||
Kaiyu Shi
|
||||
skyisno.1@gmail.com
|
||||
Karen Norteman
|
||||
karen.norteman@sun.com
|
||||
Karol Mroz
|
||||
mroz.karol@gmail.com
|
||||
Kenneth Matney
|
||||
matneykdsr@ornl.gov
|
||||
Kevin Buckley
|
||||
kevin.buckley.ecs.vuw.ac.nz@gmail.com
|
||||
Kurita, Takehiro
|
||||
fj6370fp@aa.jp.fujitsu.com
|
||||
L. R. Rajeshnarayanan
|
||||
l.r.rajeshnarayanan@intel.com
|
||||
Laura Casswell
|
||||
lcasswell@lanl.gov
|
||||
Lei Chen
|
||||
chenlcl@cn.ibm.com
|
||||
Lenny Verkhovsky
|
||||
lennyb@voltaire.com
|
||||
Leobardo Ruiz Rountree
|
||||
lruizrountree@gmail.com
|
||||
Leonid Genkin
|
||||
lgenkin@nvidia.com
|
||||
Li-Ta Lo
|
||||
ollie@lanl.gov
|
||||
Mamzi Bayatpour mbayatpour@nvidia.com ()
|
||||
mbayatpour@helios001.hpcadvisorycouncil.com
|
||||
Mangala Jyothi Bhaskar
|
||||
mjbhaskar@salmon.cs.uh.edu
|
||||
mjbhaskar@uh.edu
|
||||
Manjunath Gorentla Venkata
|
||||
manjugv@ornl.gov
|
||||
Mark Allen
|
||||
markalle@us.ibm.com
|
||||
Mark Santcroos
|
||||
m.a.santcroos@amc.uva.nl
|
||||
mark.santcroos@rutgers.edu
|
||||
mas781@scarletmail.rutgers.edu
|
||||
Mark Taylor
|
||||
mt@lanl.gov
|
||||
Martin Kontsek
|
||||
mkontsek@cisco.com
|
||||
Matias A Cabral
|
||||
matias.a.cabral@intel.com
|
||||
Matt Ezell
|
||||
ezellma@ornl.gov
|
||||
Matthias Jurenz
|
||||
matthias.jurenz@tu-dresden.de
|
||||
Maximilien Levesque
|
||||
maximilien.levesque@gmail.com
|
||||
Maxwell Coil
|
||||
mcoil@nd.edu
|
||||
Michael Heinz
|
||||
michael.william.heinz@cornelisnetworks.com
|
||||
michael.william.heinz@intel.com
|
||||
Michael Lass
|
||||
bevan@bi-co.net
|
||||
Mike Dubman
|
||||
miked@mellanox.com
|
||||
Mikhail Brinskii
|
||||
mikhailb@mellanox.com
|
||||
mikhailb@nvidia.com
|
||||
Mikhail Kurnosov
|
||||
mkurnosov@gmail.com
|
||||
Mitch Sukalski
|
||||
mwsukal@ca.sandia.gov
|
||||
Mohamad Chaarawi
|
||||
mschaara@cs.uh.edu
|
||||
Mohan Gandhi
|
||||
mohgan@amazon.com
|
||||
Moritz Kreutzer
|
||||
mokreutzer@gmail.com
|
||||
NARIBAYASHI Akira
|
||||
a.naribayashi@fujitsu.com
|
||||
Nadezhda Kogteva
|
||||
nadezhda.kogteva@itseez.com
|
||||
Nadia Derbey
|
||||
nadia.derbey@atos.net
|
||||
nadia.derbey@bull.net
|
||||
Nathan Hjelm
|
||||
hjelmn@cs.unm.edu
|
||||
hjelmn@google.com
|
||||
hjelmn@lanl.gov
|
||||
hjelmn@me.com
|
||||
Nathan T. Weeks
|
||||
weeks@iastate.edu
|
||||
Nathaniel Graham
|
||||
ngraham@lanl.gov
|
||||
nrgraham23@gmail.com
|
||||
Nick Papior Andersen
|
||||
nickpapior@gmail.com
|
||||
Nicolas Chevalier
|
||||
nicolas.chevalier@bull.net
|
||||
Nicolas Morey-Chaisemartin
|
||||
nmoreychaisemartin@suse.com
|
||||
Nikola Dancejic
|
||||
dancejic@amazon.com
|
||||
Ninad Prabhukhanolkar
|
||||
ninadchess96@gmail.com
|
||||
Noah Evans
|
||||
noah.evans@gmail.com
|
||||
Nysal Jan K A
|
||||
jnysal@in.ibm.com
|
||||
Omri Mor
|
||||
omri50@gmail.com
|
||||
Orion Poplawski
|
||||
orion@cora.nwra.com
|
||||
Orivej Desh
|
||||
orivej@gmx.fr
|
||||
Oscar Vega-Gisbert
|
||||
ovega@dsic.upv.es
|
||||
Pak Lui
|
||||
pak.lui@amd.com
|
||||
pak.lui@sun.com
|
||||
Pascal Deveze
|
||||
pascal.deveze@atos.net
|
||||
Patrick Geoffray
|
||||
patrick@myri.com
|
||||
Pavel Shamis
|
||||
pasharesearch@gmail.com
|
||||
shamisp@ornl.gov
|
||||
Peter Gottesman
|
||||
peter@petergottesman.com
|
||||
Philip Kovacs
|
||||
pkdevel@yahoo.com
|
||||
Philipp Otte
|
||||
philipp.j.otte@googlemail.com
|
||||
Pierre Lemarinier
|
||||
lemarini@icl.utk.edu
|
||||
Piotr Lesnicki
|
||||
piotr.lesnicki@atos.net
|
||||
piotr.lesnicki@ext.bull.net
|
||||
Potnuri Bharat Teja
|
||||
bharat@chelsio.com
|
||||
Prabhanjan Kambadur
|
||||
pkambadu@osl.iu.edu
|
||||
Raghavendra Pendyala
|
||||
raghavendra.p.pendyala@intel.com
|
||||
Raghu Raja
|
||||
craghun@amazon.com
|
||||
Rainer Keller
|
||||
rainer.keller@hft-stuttgart.de
|
||||
rainer.keller@hlrs.de
|
||||
rainer.keller@hs-esslingen.de
|
||||
Ralph Castain
|
||||
rhc@open-mpi.org
|
||||
rhc@pmix.org
|
||||
Reese Faucette
|
||||
rfaucett@cisco.com
|
||||
René Widera
|
||||
r.widera@hzdr.de
|
||||
Rich Graham
|
||||
richardg@mellanox.com
|
||||
Risto Toijala
|
||||
risto.toijala@gmail.com
|
||||
Rob Awles
|
||||
rta@lanl.gov
|
||||
Rob Latham
|
||||
robl@mcs.anl.gov
|
||||
Robert Wespetal
|
||||
wesper@amazon.com
|
||||
Rolf vandeVaart
|
||||
rvandevaart@nvidia.com
|
||||
Ron Brightwell
|
||||
rbbrigh@sandia.gov
|
||||
Ryan Grant
|
||||
regrant233@gmail.com
|
||||
regrant@sandia.gov
|
||||
Sameh S. Sharkawi
|
||||
sssharka@us.ibm.com
|
||||
Sami Ayyorgun
|
||||
sami@lanl.gov
|
||||
Sami Ilvonen
|
||||
sami.ilvonen@csc.fi
|
||||
Samuel Gutierrez
|
||||
samuel@lanl.gov
|
||||
Sayantan Sur
|
||||
surs@osu.edu
|
||||
Scott Miller
|
||||
scott.miller1@ibm.com
|
||||
Selvin Xavier
|
||||
selvin.xavier@broadcom.com
|
||||
Sergey Oblomov
|
||||
sergeyo@mellanox.com
|
||||
sergeyo@nvidia.com
|
||||
Sharon Melamed
|
||||
sharonm@voltaire.com
|
||||
Shiqing Fan
|
||||
shiqing@hlrs.de
|
||||
Simon Byrne
|
||||
simonbyrne@gmail.com
|
||||
Spruit, Neil R
|
||||
neil.r.spruit@intel.com
|
||||
Stanislav Kirillov
|
||||
staskirillof@yandex.ru
|
||||
staskirillov@gmail.com
|
||||
Steve Wise
|
||||
swise@opengridcomputing.com
|
||||
StevenGood154
|
||||
sgood2@nd.edu
|
||||
Subhadeep Bhattacharya
|
||||
subhadeepb@nvidia.com
|
||||
Sushant Sharma
|
||||
sushant@lanl.gov
|
||||
Sven Stork
|
||||
stork@hlrs.de
|
||||
Swen Boehm
|
||||
sboehm@ornl.gov
|
||||
Sylvain Jeaugey
|
||||
sjeaugey@nvidia.com
|
||||
sylvain.jeaugey@bull.net
|
||||
Teng Lin
|
||||
teng.lin@gmail.com
|
||||
Terry Dontje
|
||||
terry.dontje@oracle.com
|
||||
Thananon Patinyasakdikul
|
||||
apatinya@cisco.com
|
||||
thananon.patinyasakdikul@intel.com
|
||||
tpatinya@utk.edu
|
||||
Thara Angskun
|
||||
angskun@cs.utk.edu
|
||||
Themos Tsikas
|
||||
themostsikas@users.noreply.github.com
|
||||
Thomas Herault
|
||||
herault@icl.utk.edu
|
||||
Thomas Jahns
|
||||
jahns@dkrz.de
|
||||
Thomas Naughton
|
||||
naughtont@ornl.gov
|
||||
Tim Mattox
|
||||
timothy.mattox@engilitycorp.com
|
||||
tmattox@gmail.com
|
||||
Tim Prins
|
||||
tprins@lanl.gov
|
||||
Tim Wickberg
|
||||
tim@schedmd.com
|
||||
Tim Woodall
|
||||
twoodall@lanl.gov
|
||||
Todd Kordenbrock
|
||||
thkgcode@gmail.com
|
||||
thkorde@sandia.gov
|
||||
Tomislav Janjusic
|
||||
tomislavj@mellanox.com
|
||||
tomislavj@mngx-apl-01.mtl.labs.mlnx
|
||||
Torsten Hoefler
|
||||
htor@osl.iu.edu
|
||||
Tsubasa Yanagibashi
|
||||
fj2505dt@aa.jp.fujitsu.com
|
||||
Valentin Petrov
|
||||
valentinp@mellanox.com
|
||||
valentinp@nvidia.com
|
||||
Vasily Filipov
|
||||
vasily@mellanox.com
|
||||
Vishal Sahay
|
||||
vsahay@osl.iu.edu
|
||||
Vishwanath Venkatesan
|
||||
vvenkates@gmail.com
|
||||
Wei Zhang
|
||||
wzam@amazon.com
|
||||
wzam@amazonc.com
|
||||
Weikuan Yu
|
||||
yuw@lanl.gov
|
||||
Wesley Bland
|
||||
wbland@icl.utk.edu
|
||||
William Bailey
|
||||
wbailey2@nd.edu
|
||||
William LePera
|
||||
lepera@us.ibm.com
|
||||
William Throwe
|
||||
wtt6@cornell.edu
|
||||
William Zhang
|
||||
wilzhang@amazon.com
|
||||
Wojtek Wasko
|
||||
wwasko@nvidia.com
|
||||
Xi Luo
|
||||
dycz0fx@gmail.com
|
||||
Xin Zhao
|
||||
xinz@mellanox.com
|
||||
Yael Dayan
|
||||
yaeld@mellanox.com
|
||||
Yevgeny Kliteynik
|
||||
kliteyn@mellanox.co.il
|
||||
Yohann Burette
|
||||
yohann.burette@intel.com
|
||||
Yossi Itigin
|
||||
yosefe@mellanox.com
|
||||
Yu Feng
|
||||
rainwoodman@gmail.com
|
||||
Zhi Ming Wang
|
||||
wangzm@cn.ibm.com
|
||||
Zoltán Mizsei
|
||||
zmizsei@extrowerk.com
|
||||
bsergentm
|
||||
marc.sergent@atos.net
|
||||
dongzhong
|
||||
zhongdong0321@hotmail.com
|
||||
guserav
|
||||
erik.zeiske@hpe.com
|
||||
erik.zeiske@web.de
|
||||
heasterday
|
||||
heasterday@users.noreply.github.com
|
||||
luz.paz
|
||||
luzpaz@users.noreply.github.com
|
||||
perrynzhou
|
||||
perrynzhou@gmail.com
|
||||
raafatfeki
|
||||
fekiraafat@gmail.com
|
||||
tomhers
|
||||
tom.herschberg@gmail.com
|
|
@ -0,0 +1,101 @@
|
|||
Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
University Research and Technology
|
||||
Corporation. All rights reserved.
|
||||
Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
of Tennessee Research Foundation. All rights
|
||||
reserved.
|
||||
Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
University of Stuttgart. All rights reserved.
|
||||
Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
Copyright (c) 2008-2015 Cisco Systems, Inc. All rights reserved.
|
||||
$COPYRIGHT$
|
||||
|
||||
Additional copyrights may follow
|
||||
|
||||
$HEADER$
|
||||
|
||||
|
||||
For More Information
|
||||
====================
|
||||
|
||||
This file is a *very* short overview of building and installing Open
|
||||
MPI, and building MPI applications. Much more information is
|
||||
available on the Open MPI web site (e.g., see the FAQ section):
|
||||
|
||||
http://www.open-mpi.org/
|
||||
|
||||
|
||||
Developer Builds
|
||||
================
|
||||
|
||||
If you have checked out a DEVELOPER'S COPY of Open MPI (i.e., you
|
||||
cloned from Git), you should read the HACKING file before attempting
|
||||
to build Open MPI. You must then run:
|
||||
|
||||
shell$ ./autogen.pl
|
||||
|
||||
You will need very recent versions of GNU Autoconf, Automake, and
|
||||
Libtool. If autogen.pl fails, read the HACKING file. If anything
|
||||
else fails, read the HACKING file. Finally, we suggest reading the
|
||||
HACKING file.
|
||||
|
||||
*** NOTE: Developer's copies of Open MPI typically include a large
|
||||
performance penalty at run-time because of extra debugging overhead.
|
||||
|
||||
|
||||
User Builds
|
||||
===========
|
||||
|
||||
Building Open MPI is typically a combination of running "configure"
|
||||
and "make". Execute the following commands to install the Open MPI
|
||||
system from within the directory at the top of the tree:
|
||||
|
||||
shell$ ./configure --prefix=/where/to/install
|
||||
[...lots of output...]
|
||||
shell$ make all install
|
||||
|
||||
If you need special access to install, then you can execute "make
|
||||
all" as a user with write permissions in the build tree, and a
|
||||
separate "make install" as a user with write permissions to the
|
||||
install tree.
|
||||
|
||||
Compiling support for various networks or other specific hardware may
|
||||
require additional command ling flags when running configure. See the
|
||||
README file for more details. Note that VPATH builds are fully
|
||||
supported. For example:
|
||||
|
||||
shell$ tar xf openmpi-X.Y.Z.tar.gz
|
||||
shell$ cd openmpi-X.Y.Z
|
||||
shell$ mkdir build
|
||||
shell$ cd build
|
||||
shell$ ../configure ...your options...
|
||||
[...lots of output...]
|
||||
shell$ make all install
|
||||
|
||||
Parallel builds are also supported (although some versions of "make",
|
||||
such as GNU make, will only use the first target listed on the command
|
||||
line when executable parallel builds). For example (assume GNU make):
|
||||
|
||||
shell$ make -j 4 all
|
||||
[...lots of output...]
|
||||
shell$ make install
|
||||
|
||||
Parallel make is generally only helpful in the build phase (i.e.,
|
||||
"make all"); the installation process (i.e., "make install") is mostly
|
||||
serial and does not benefit much from parallelization.
|
||||
|
||||
|
||||
Compiling MPI Applications
|
||||
==========================
|
||||
|
||||
MPI applications should be compiled using the Open MPI "wrapper"
|
||||
compilers:
|
||||
|
||||
C programs: mpicc your-code.c
|
||||
C++ programs: mpiCC your-code.cc or
|
||||
mpic++ your-code.cc (for case-insensitive filesystems)
|
||||
Fortran programs: mpifort your-code.f90
|
||||
|
||||
These compilers simply add various command line flags (such as -lmpi)
|
||||
and invoke a back-end compiler; they are not compilers in themselves.
|
|
@ -0,0 +1,101 @@
|
|||
Most files in this release are marked with the copyrights of the
|
||||
organizations who have edited them. The copyrights below are in no
|
||||
particular order and generally reflect members of the Open MPI core
|
||||
team who have contributed code to this release. The copyrights for
|
||||
code used under license from other parties are included in the
|
||||
corresponding files.
|
||||
|
||||
Copyright (c) 2004-2010 The Trustees of Indiana University and Indiana
|
||||
University Research and Technology
|
||||
Corporation. All rights reserved.
|
||||
Copyright (c) 2004-2020 The University of Tennessee and The University
|
||||
of Tennessee Research Foundation. All rights
|
||||
reserved.
|
||||
Copyright (c) 2004-2019 High Performance Computing Center Stuttgart,
|
||||
University of Stuttgart. All rights reserved.
|
||||
Copyright (c) 2004-2008 The Regents of the University of California.
|
||||
All rights reserved.
|
||||
Copyright (c) 2006-2018 Los Alamos National Security, LLC. All rights
|
||||
reserved.
|
||||
Copyright (c) 2006-2020 Cisco Systems, Inc. All rights reserved.
|
||||
Copyright (c) 2006-2010 Voltaire, Inc. All rights reserved.
|
||||
Copyright (c) 2006-2018 Sandia National Laboratories. All rights reserved.
|
||||
Copyright (c) 2006-2010 Sun Microsystems, Inc. All rights reserved.
|
||||
Use is subject to license terms.
|
||||
Copyright (c) 2006-2020 The University of Houston. All rights reserved.
|
||||
Copyright (c) 2006-2009 Myricom, Inc. All rights reserved.
|
||||
Copyright (c) 2007-2018 UT-Battelle, LLC. All rights reserved.
|
||||
Copyright (c) 2007-2020 IBM Corporation. All rights reserved.
|
||||
Copyright (c) 1998-2005 Forschungszentrum Juelich, Juelich Supercomputing
|
||||
Centre, Federal Republic of Germany
|
||||
Copyright (c) 2005-2008 ZIH, TU Dresden, Federal Republic of Germany
|
||||
Copyright (c) 2007 Evergrid, Inc. All rights reserved.
|
||||
Copyright (c) 2008 Chelsio, Inc. All rights reserved.
|
||||
Copyright (c) 2008-2009 Institut National de Recherche en
|
||||
Informatique. All rights reserved.
|
||||
Copyright (c) 2007 Lawrence Livermore National Security, LLC.
|
||||
All rights reserved.
|
||||
Copyright (c) 2007-2019 Mellanox Technologies. All rights reserved.
|
||||
Copyright (c) 2006-2010 QLogic Corporation. All rights reserved.
|
||||
Copyright (c) 2008-2017 Oak Ridge National Labs. All rights reserved.
|
||||
Copyright (c) 2006-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
Copyright (c) 2009-2015 Bull SAS. All rights reserved.
|
||||
Copyright (c) 2010 ARM ltd. All rights reserved.
|
||||
Copyright (c) 2016 ARM, Inc. All rights reserved.
|
||||
Copyright (c) 2010-2011 Alex Brick <bricka@ccs.neu.edu>. All rights reserved.
|
||||
Copyright (c) 2012 The University of Wisconsin-La Crosse. All rights
|
||||
reserved.
|
||||
Copyright (c) 2013-2019 Intel, Inc. All rights reserved.
|
||||
Copyright (c) 2011-2017 NVIDIA Corporation. All rights reserved.
|
||||
Copyright (c) 2016 Broadcom Limited. All rights reserved.
|
||||
Copyright (c) 2011-2019 Fujitsu Limited. All rights reserved.
|
||||
Copyright (c) 2014-2015 Hewlett-Packard Development Company, LP. All
|
||||
rights reserved.
|
||||
Copyright (c) 2013-2020 Research Organization for Information Science (RIST).
|
||||
All rights reserved.
|
||||
Copyright (c) 2017-2020 Amazon.com, Inc. or its affiliates. All Rights
|
||||
reserved.
|
||||
Copyright (c) 2019-2020 Triad National Security, LLC. All rights
|
||||
reserved.
|
||||
Copyright (c) 2020-2021 Cornelis Networks, Inc. All rights reserved.
|
||||
|
||||
$COPYRIGHT$
|
||||
|
||||
Additional copyrights may follow
|
||||
|
||||
$HEADER$
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
- Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
- Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer listed
|
||||
in this license in the documentation and/or other materials
|
||||
provided with the distribution.
|
||||
|
||||
- Neither the name of the copyright holders nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
The copyright holders provide no reassurances that the source code
|
||||
provided does not infringe any patent, copyright, or any other
|
||||
intellectual property rights of third parties. The copyright holders
|
||||
disclaim any liability to any recipient for claims brought against
|
||||
recipient by any third party for infringement of that parties
|
||||
intellectual property rights.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -0,0 +1,60 @@
|
|||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2009 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2012-2015 Los Alamos National Security, Inc. All rights reserved.
|
||||
# Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2017-2018 Amazon.com, Inc. or its affiliates.
|
||||
# All Rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
SUBDIRS = config contrib $(MCA_PROJECT_SUBDIRS) test
|
||||
DIST_SUBDIRS = config contrib $(MCA_PROJECT_DIST_SUBDIRS) test
|
||||
EXTRA_DIST = README INSTALL VERSION Doxyfile LICENSE autogen.pl README.JAVA.txt AUTHORS
|
||||
|
||||
include examples/Makefile.include
|
||||
|
||||
dist-hook:
|
||||
env LS_COLORS= sh "$(top_srcdir)/config/distscript.sh" "$(top_srcdir)" "$(distdir)" "$(OMPI_REPO_REV)"
|
||||
@if test ! -s $(distdir)/AUTHORS ; then \
|
||||
echo "AUTHORS file is empty; aborting distribution"; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
# Check for common symbols. Use a "-hook" to increase the odds that a
|
||||
# developer will see it at the end of their installation process.
|
||||
install-exec-hook:
|
||||
-@if test -d "$(top_srcdir)/.git"; then \
|
||||
$(top_srcdir)/config/find_common_syms \
|
||||
--brief \
|
||||
--top_builddir=$(top_builddir) \
|
||||
--top_srcdir=$(top_srcdir) \
|
||||
--objext=$(OBJEXT); \
|
||||
fi
|
||||
|
||||
ACLOCAL_AMFLAGS = -I config
|
||||
|
||||
# Use EXTRA_DIST and an explicit target (with a FORCE hack so that
|
||||
# it's always run) rather than a dist-hook because there's some magic
|
||||
# extra logic in Automake that will add AUTHORS to EXTRA_DIST if the
|
||||
# file exists when Automake is run. Once we're explicit (to avoid odd
|
||||
# copy behavior), it's easier to always build AUTHORS here, rather
|
||||
# than trying to handle the EXTRA_DIST dependency from a clean repo
|
||||
# (no AUTHORS file present) and use dist-hook to run every time.
|
||||
AUTHORS: FORCE
|
||||
$(PERL) "$(top_srcdir)/contrib/dist/make-authors.pl" --skip-ok --quiet --srcdir="$(top_srcdir)"
|
||||
|
||||
FORCE:
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,68 @@
|
|||
# -*- makefile -*-
|
||||
# Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
TRIM_OPTIONS=
|
||||
if ! MAN_PAGE_BUILD_MPI_CXX_BINDINGS
|
||||
TRIM_OPTIONS += --nocxx
|
||||
endif
|
||||
if ! MAN_PAGE_BUILD_MPIFH_BINDINGS
|
||||
TRIM_OPTIONS += --nofortran
|
||||
endif
|
||||
if ! MAN_PAGE_BUILD_USEMPIF08_BINDINGS
|
||||
TRIM_OPTIONS += --nof08
|
||||
endif
|
||||
|
||||
.1in.1:
|
||||
$(OMPI_V_GEN) $(top_srcdir)/config/make_manpage.pl \
|
||||
--package-name='@PACKAGE_NAME@' \
|
||||
--package-version='@PACKAGE_VERSION@' \
|
||||
--ompi-date='@OMPI_RELEASE_DATE@' \
|
||||
--opal-date='@OPAL_RELEASE_DATE@' \
|
||||
--orte-date='@ORTE_RELEASE_DATE@' \
|
||||
--input=$< \
|
||||
--output=$@
|
||||
|
||||
.3in.3:
|
||||
$(OMPI_V_GEN) $(top_srcdir)/config/make_manpage.pl \
|
||||
--package-name='@PACKAGE_NAME@' \
|
||||
--package-version='@PACKAGE_VERSION@' \
|
||||
--ompi-date='@OMPI_RELEASE_DATE@' \
|
||||
--opal-date='@OPAL_RELEASE_DATE@' \
|
||||
--orte-date='@ORTE_RELEASE_DATE@' \
|
||||
$(TRIM_OPTIONS) \
|
||||
--input=$< \
|
||||
--output=$@
|
||||
|
||||
.7in.7:
|
||||
$(OMPI_V_GEN) $(top_srcdir)/config/make_manpage.pl \
|
||||
--package-name='@PACKAGE_NAME@' \
|
||||
--package-version='@PACKAGE_VERSION@' \
|
||||
--ompi-date='@OMPI_RELEASE_DATE@' \
|
||||
--opal-date='@OPAL_RELEASE_DATE@' \
|
||||
--orte-date='@ORTE_RELEASE_DATE@' \
|
||||
--input=$< \
|
||||
--output=$@
|
||||
|
||||
# A little verbosity magic; "make" will show the terse output. "make
|
||||
# V=1" will show the actual commands used (just like the other
|
||||
# Automake-generated compilation/linker rules).
|
||||
V=0
|
||||
|
||||
OMPI_V_LN_S = $(ompi__v_LN_S_$V)
|
||||
ompi__v_LN_S_ = $(ompi__v_LN_S_$AM_DEFAULT_VERBOSITY)
|
||||
ompi__v_LN_S_0 = @echo " LN_S " `basename $@`;
|
||||
|
||||
OMPI_V_MKDIR = $(ompi__v_MKDIR_$V)
|
||||
ompi__v_MKDIR_ = $(ompi__v_MKDIR_$AM_DEFAULT_VERBOSITY)
|
||||
ompi__v_MKDIR_0 = @echo " MKDIR " $@;
|
||||
|
||||
OMPI_V_GEN = $(ompi__v_GEN_$V)
|
||||
ompi__v_GEN_ = $(ompi__v_GEN_$AM_DEFAULT_VERBOSITY)
|
||||
ompi__v_GEN_0 = @echo " GENERATE" $@;
|
|
@ -0,0 +1,275 @@
|
|||
***************************************************************************
|
||||
IMPORTANT NOTE
|
||||
|
||||
JAVA BINDINGS ARE PROVIDED ON A "PROVISIONAL" BASIS - I.E., THEY ARE
|
||||
NOT PART OF THE CURRENT OR PROPOSED MPI STANDARDS. THUS, INCLUSION OF
|
||||
JAVA SUPPORT IS NOT REQUIRED BY THE STANDARD. CONTINUED INCLUSION OF
|
||||
THE JAVA BINDINGS IS CONTINGENT UPON ACTIVE USER INTEREST AND
|
||||
CONTINUED DEVELOPER SUPPORT.
|
||||
|
||||
***************************************************************************
|
||||
|
||||
This version of Open MPI provides support for Java-based
|
||||
MPI applications.
|
||||
|
||||
The rest of this document provides step-by-step instructions on
|
||||
building OMPI with Java bindings, and compiling and running
|
||||
Java-based MPI applications. Also, part of the functionality is
|
||||
explained with examples. Further details about the design,
|
||||
implementation and usage of Java bindings in Open MPI can be found
|
||||
in [1]. The bindings follow a JNI approach, that is, we do not
|
||||
provide a pure Java implementation of MPI primitives, but a thin
|
||||
layer on top of the C implementation. This is the same approach
|
||||
as in mpiJava [2]; in fact, mpiJava was taken as a starting point
|
||||
for Open MPI Java bindings, but they were later totally rewritten.
|
||||
|
||||
[1] O. Vega-Gisbert, J. E. Roman, and J. M. Squyres. "Design and
|
||||
implementation of Java bindings in Open MPI". Parallel Comput.
|
||||
59: 1-20 (2016).
|
||||
|
||||
[2] M. Baker et al. "mpiJava: An object-oriented Java interface to
|
||||
MPI". In Parallel and Distributed Processing, LNCS vol. 1586,
|
||||
pp. 748-762, Springer (1999).
|
||||
|
||||
============================================================================
|
||||
|
||||
Building Java Bindings
|
||||
|
||||
If this software was obtained as a developer-level
|
||||
checkout as opposed to a tarball, you will need to start your build by
|
||||
running ./autogen.pl. This will also require that you have a fairly
|
||||
recent version of autotools on your system - see the HACKING file for
|
||||
details.
|
||||
|
||||
Java support requires that Open MPI be built at least with shared libraries
|
||||
(i.e., --enable-shared) - any additional options are fine and will not
|
||||
conflict. Note that this is the default for Open MPI, so you don't
|
||||
have to explicitly add the option. The Java bindings will build only
|
||||
if --enable-mpi-java is specified, and a JDK is found in a typical
|
||||
system default location.
|
||||
|
||||
If the JDK is not in a place where we automatically find it, you can
|
||||
specify the location. For example, this is required on the Mac
|
||||
platform as the JDK headers are located in a non-typical location. Two
|
||||
options are available for this purpose:
|
||||
|
||||
--with-jdk-bindir=<foo> - the location of javac and javah
|
||||
--with-jdk-headers=<bar> - the directory containing jni.h
|
||||
|
||||
For simplicity, typical configurations are provided in platform files
|
||||
under contrib/platform/hadoop. These will meet the needs of most
|
||||
users, or at least provide a starting point for your own custom
|
||||
configuration.
|
||||
|
||||
In summary, therefore, you can configure the system using the
|
||||
following Java-related options:
|
||||
|
||||
$ ./configure --with-platform=contrib/platform/hadoop/<your-platform>
|
||||
...
|
||||
|
||||
or
|
||||
|
||||
$ ./configure --enable-mpi-java --with-jdk-bindir=<foo>
|
||||
--with-jdk-headers=<bar> ...
|
||||
|
||||
or simply
|
||||
|
||||
$ ./configure --enable-mpi-java ...
|
||||
|
||||
if JDK is in a "standard" place that we automatically find.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Running Java Applications
|
||||
|
||||
For convenience, the "mpijavac" wrapper compiler has been provided for
|
||||
compiling Java-based MPI applications. It ensures that all required MPI
|
||||
libraries and class paths are defined. You can see the actual command
|
||||
line using the --showme option, if you are interested.
|
||||
|
||||
Once your application has been compiled, you can run it with the
|
||||
standard "mpirun" command line:
|
||||
|
||||
$ mpirun <options> java <your-java-options> <my-app>
|
||||
|
||||
For convenience, mpirun has been updated to detect the "java" command
|
||||
and ensure that the required MPI libraries and class paths are defined
|
||||
to support execution. You therefore do NOT need to specify the Java
|
||||
library path to the MPI installation, nor the MPI classpath. Any class
|
||||
path definitions required for your application should be specified
|
||||
either on the command line or via the CLASSPATH environmental
|
||||
variable. Note that the local directory will be added to the class
|
||||
path if nothing is specified.
|
||||
|
||||
As always, the "java" executable, all required libraries, and your
|
||||
application classes must be available on all nodes.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Basic usage of Java bindings
|
||||
|
||||
There is an MPI package that contains all classes of the MPI Java
|
||||
bindings: Comm, Datatype, Request, etc. These classes have a direct
|
||||
correspondence with classes defined by the MPI standard. MPI primitives
|
||||
are just methods included in these classes. The convention used for
|
||||
naming Java methods and classes is the usual camel-case convention,
|
||||
e.g., the equivalent of MPI_File_set_info(fh,info) is fh.setInfo(info),
|
||||
where fh is an object of the class File.
|
||||
|
||||
Apart from classes, the MPI package contains predefined public attributes
|
||||
under a convenience class MPI. Examples are the predefined communicator
|
||||
MPI.COMM_WORLD or predefined datatypes such as MPI.DOUBLE. Also, MPI
|
||||
initialization and finalization are methods of the MPI class and must
|
||||
be invoked by all MPI Java applications. The following example illustrates
|
||||
these concepts:
|
||||
|
||||
import mpi.*;
|
||||
|
||||
class ComputePi {
|
||||
|
||||
public static void main(String args[]) throws MPIException {
|
||||
|
||||
MPI.Init(args);
|
||||
|
||||
int rank = MPI.COMM_WORLD.getRank(),
|
||||
size = MPI.COMM_WORLD.getSize(),
|
||||
nint = 100; // Intervals.
|
||||
double h = 1.0/(double)nint, sum = 0.0;
|
||||
|
||||
for(int i=rank+1; i<=nint; i+=size) {
|
||||
double x = h * ((double)i - 0.5);
|
||||
sum += (4.0 / (1.0 + x * x));
|
||||
}
|
||||
|
||||
double sBuf[] = { h * sum },
|
||||
rBuf[] = new double[1];
|
||||
|
||||
MPI.COMM_WORLD.reduce(sBuf, rBuf, 1, MPI.DOUBLE, MPI.SUM, 0);
|
||||
|
||||
if(rank == 0) System.out.println("PI: " + rBuf[0]);
|
||||
MPI.Finalize();
|
||||
}
|
||||
}
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Exception handling
|
||||
|
||||
Java bindings in Open MPI support exception handling. By default, errors
|
||||
are fatal, but this behavior can be changed. The Java API will throw
|
||||
exceptions if the MPI.ERRORS_RETURN error handler is set:
|
||||
|
||||
MPI.COMM_WORLD.setErrhandler(MPI.ERRORS_RETURN);
|
||||
|
||||
If you add this statement to your program, it will show the line
|
||||
where it breaks, instead of just crashing in case of an error.
|
||||
Error-handling code can be separated from main application code by
|
||||
means of try-catch blocks, for instance:
|
||||
|
||||
try
|
||||
{
|
||||
File file = new File(MPI.COMM_SELF, "filename", MPI.MODE_RDONLY);
|
||||
}
|
||||
catch(MPIException ex)
|
||||
{
|
||||
System.err.println("Error Message: "+ ex.getMessage());
|
||||
System.err.println(" Error Class: "+ ex.getErrorClass());
|
||||
ex.printStackTrace();
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
How to specify buffers
|
||||
|
||||
In MPI primitives that require a buffer (either send or receive) the
|
||||
Java API admits a Java array. Since Java arrays can be relocated by
|
||||
the Java runtime environment, the MPI Java bindings need to make a
|
||||
copy of the contents of the array to a temporary buffer, then pass the
|
||||
pointer to this buffer to the underlying C implementation. From the
|
||||
practical point of view, this implies an overhead associated to all
|
||||
buffers that are represented by Java arrays. The overhead is small
|
||||
for small buffers but increases for large arrays.
|
||||
|
||||
There is a pool of temporary buffers with a default capacity of 64K.
|
||||
If a temporary buffer of 64K or less is needed, then the buffer will
|
||||
be obtained from the pool. But if the buffer is larger, then it will
|
||||
be necessary to allocate the buffer and free it later.
|
||||
|
||||
The default capacity of pool buffers can be modified with an 'mca'
|
||||
parameter:
|
||||
|
||||
mpirun --mca mpi_java_eager size ...
|
||||
|
||||
Where 'size' is the number of bytes, or kilobytes if it ends with 'k',
|
||||
or megabytes if it ends with 'm'.
|
||||
|
||||
An alternative is to use "direct buffers" provided by standard
|
||||
classes available in the Java SDK such as ByteBuffer. For convenience
|
||||
we provide a few static methods "new[Type]Buffer" in the MPI class
|
||||
to create direct buffers for a number of basic datatypes. Elements
|
||||
of the direct buffer can be accessed with methods put() and get(),
|
||||
and the number of elements in the buffer can be obtained with the
|
||||
method capacity(). This example illustrates its use:
|
||||
|
||||
int myself = MPI.COMM_WORLD.getRank();
|
||||
int tasks = MPI.COMM_WORLD.getSize();
|
||||
|
||||
IntBuffer in = MPI.newIntBuffer(MAXLEN * tasks),
|
||||
out = MPI.newIntBuffer(MAXLEN);
|
||||
|
||||
for(int i = 0; i < MAXLEN; i++)
|
||||
out.put(i, myself); // fill the buffer with the rank
|
||||
|
||||
Request request = MPI.COMM_WORLD.iAllGather(
|
||||
out, MAXLEN, MPI.INT, in, MAXLEN, MPI.INT);
|
||||
request.waitFor();
|
||||
request.free();
|
||||
|
||||
for(int i = 0; i < tasks; i++)
|
||||
{
|
||||
for(int k = 0; k < MAXLEN; k++)
|
||||
{
|
||||
if(in.get(k + i * MAXLEN) != i)
|
||||
throw new AssertionError("Unexpected value");
|
||||
}
|
||||
}
|
||||
|
||||
Direct buffers are available for: BYTE, CHAR, SHORT, INT, LONG,
|
||||
FLOAT, and DOUBLE. There is no direct buffer for booleans.
|
||||
|
||||
Direct buffers are not a replacement for arrays, because they have
|
||||
higher allocation and deallocation costs than arrays. In some
|
||||
cases arrays will be a better choice. You can easily convert a
|
||||
buffer into an array and vice versa.
|
||||
|
||||
All non-blocking methods must use direct buffers and only
|
||||
blocking methods can choose between arrays and direct buffers.
|
||||
|
||||
The above example also illustrates that it is necessary to call
|
||||
the free() method on objects whose class implements the Freeable
|
||||
interface. Otherwise a memory leak is produced.
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
Specifying offsets in buffers
|
||||
|
||||
In a C program, it is common to specify an offset in a array with
|
||||
"&array[i]" or "array+i", for instance to send data starting from
|
||||
a given position in the array. The equivalent form in the Java bindings
|
||||
is to "slice()" the buffer to start at an offset. Making a "slice()"
|
||||
on a buffer is only necessary, when the offset is not zero. Slices
|
||||
work for both arrays and direct buffers.
|
||||
|
||||
import static mpi.MPI.slice;
|
||||
...
|
||||
int numbers[] = new int[SIZE];
|
||||
...
|
||||
MPI.COMM_WORLD.send(slice(numbers, offset), count, MPI.INT, 1, 0);
|
||||
|
||||
----------------------------------------------------------------------------
|
||||
|
||||
If you have any problems, or find any bugs, please feel free to report
|
||||
them to Open MPI user's mailing list (see
|
||||
http://www.open-mpi.org/community/lists/ompi.php).
|
|
@ -0,0 +1,167 @@
|
|||
#if 0
|
||||
|
||||
# NOTE: The comments below cannot use tokens that will be intepreted
|
||||
# as C++ preprocessor directives. So when you read "if 0", the reader
|
||||
# must mentally prepend a # to the "if" token.
|
||||
#
|
||||
# This file is carefully constructed so that it can be a) run as a
|
||||
# Bourne shell script and b) compiled as a C/C++ header file.
|
||||
#
|
||||
# Specifically, this file is used in the following ways:
|
||||
#
|
||||
# 1. This file is executed as a Bourne shell script to assign version
|
||||
# numbers to shell variables in config/opal_get_version.* and
|
||||
# configure.ac.
|
||||
# 2. On case-insensitive filesystems, this file can get included by
|
||||
# C++ STL header files when compiling the MPI C++ bindings (i.e.,
|
||||
# when they "include <version>", that will end up including this
|
||||
# file).
|
||||
#
|
||||
# Case #2 was discovered in
|
||||
# https://github.com/open-mpi/ompi/issues/9122. The obvious fix for
|
||||
# this issue would be to rename VERSION (e.g., VERSION.sh). However,
|
||||
# since the MPI C++ bindings were removed in Open MPI v5.0.0, this
|
||||
# issue issue only affects legacy Open MPI release series (namely:
|
||||
# v4.1.x and v4.0.x). As such, do something simple / safe to fix it:
|
||||
# protect the main body of this file with an "if" preprocessor
|
||||
# directive.
|
||||
#
|
||||
# 1. For case 1, C++ preprocessor directives become Bourne shell comments.
|
||||
# 2. For case 2, we "if 0" the main body of the file and in the "else"
|
||||
# block, "include_next<version>" to get the "real" <version> file.
|
||||
#
|
||||
# This is a bit of a gross (or clever, depending on your viewpoint)
|
||||
# hack, but it makes both cases work with minimal changes to the
|
||||
# legacy v4.0.x and v4.1.x release series.
|
||||
|
||||
############################################################################
|
||||
|
||||
# Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2008-2021 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2011 NVIDIA Corporation. All rights reserved.
|
||||
# Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2017 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2019 Triad National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2018-2020 IBM Corporation. All rights reserved.
|
||||
# Copyright (c) 2018 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2020-2021 Amazon.com, Inc. or its affiliates. All Rights
|
||||
# reserved.
|
||||
|
||||
# This is the VERSION file for Open MPI, describing the precise
|
||||
# version of Open MPI in this distribution. The various components of
|
||||
# the version number below are combined to form a single version
|
||||
# number string.
|
||||
|
||||
# major, minor, and release are generally combined in the form
|
||||
# <major>.<minor>.<release>.
|
||||
|
||||
major=4
|
||||
minor=1
|
||||
release=4
|
||||
|
||||
# greek is generally used for alpha or beta release tags. If it is
|
||||
# non-empty, it will be appended to the version number. It does not
|
||||
# have to be numeric. Common examples include: a1 (alpha release 1),
|
||||
# b1 (beta release 1), rc2 (release candidate 2). The only
|
||||
# requirement is that it must be entirely printable ASCII characters
|
||||
# and have no white space.
|
||||
|
||||
greek=
|
||||
|
||||
# If repo_rev is empty, then the repository version number will be
|
||||
# obtained during "make dist" via the "git describe --tags --always"
|
||||
# command, or with the date (if "git describe" fails) in the form of
|
||||
# "date<date>".
|
||||
|
||||
repo_rev=v4.1.4
|
||||
|
||||
# If tarball_version is not empty, it is used as the version string in
|
||||
# the tarball filename, regardless of all other versions listed in
|
||||
# this file. For example, if tarball_version is empty, the tarball
|
||||
# filename will be of the form
|
||||
# openmpi-<major>.<minor>.<release><greek>.tar.*. However, if
|
||||
# tarball_version is not empty, the tarball filename will be of the
|
||||
# form openmpi-<tarball_version>.tar.*.
|
||||
|
||||
tarball_version=
|
||||
|
||||
# The date when this release was created
|
||||
|
||||
date="May 26, 2022"
|
||||
|
||||
# The shared library version of each of Open MPI's public libraries.
|
||||
# These versions are maintained in accordance with the "Library
|
||||
# Interface Versions" chapter from the GNU Libtool documentation. The
|
||||
# first Open MPI release to programatically specify these versions was
|
||||
# v1.3.4 (note that Libtool defaulted all prior releases to 0:0:0).
|
||||
# All changes in these version numbers are dictated by the Open MPI
|
||||
# release managers (not individual developers). Notes:
|
||||
|
||||
# 1. Since these version numbers are associated with *releases*, the
|
||||
# version numbers maintained on the Open MPI GIT main (and developer
|
||||
# branches) is always 0:0:0 for all libraries.
|
||||
|
||||
# 2. The version number of libmpi refers to the public MPI interfaces.
|
||||
# It does not refer to any internal interfaces.
|
||||
|
||||
# 3. Similar to libmpi, the version numbers of the Fortran libraries
|
||||
# refer to the public MPI interfaces. For example, that there have
|
||||
# been typo fixes in the parameter types to mpif.h Fortran library
|
||||
# functions over time; these technically did not change the interface
|
||||
# because Fortran 77 does not link by parameter type.
|
||||
|
||||
# 4. Similar to libmpi, libmpi_cxx's version number refers to the
|
||||
# public MPI interfaces. Note that this version number may or may not
|
||||
# be affected by changes to inlined functions in OMPI's
|
||||
# header-file-based C++ bindings implementation.
|
||||
|
||||
# 5. The ORTE and OPAL libraries will change versions when their
|
||||
# public interfaces change (as relative to the layer(s) above them).
|
||||
# None of the ORTE and OPAL interfaces are public to MPI applications,
|
||||
# but they are "public" within the OMPI code base and select 3rd party
|
||||
# software packages.
|
||||
|
||||
# Version numbers are described in the Libtool current:revision:age
|
||||
# format.
|
||||
|
||||
libmpi_so_version=70:4:30
|
||||
libmpi_cxx_so_version=70:1:30
|
||||
libmpi_mpifh_so_version=70:0:30
|
||||
libmpi_usempi_tkr_so_version=70:0:30
|
||||
libmpi_usempi_ignore_tkr_so_version=70:0:30
|
||||
libmpi_usempif08_so_version=70:0:30
|
||||
libopen_rte_so_version=70:2:30
|
||||
libopen_pal_so_version=70:2:30
|
||||
libmpi_java_so_version=70:0:30
|
||||
liboshmem_so_version=70:2:30
|
||||
libompitrace_so_version=70:1:30
|
||||
|
||||
# "Common" components install standalone libraries that are run-time
|
||||
# linked by one or more components. So they need to be versioned as
|
||||
# well. Yuck; this somewhat breaks the
|
||||
# components-don't-affect-the-build-system abstraction.
|
||||
|
||||
# OMPI layer
|
||||
libmca_ompi_common_ompio_so_version=70:4:29
|
||||
libmca_ompi_common_monitoring_so_version=70:0:20
|
||||
|
||||
# ORTE layer
|
||||
libmca_orte_common_alps_so_version=70:0:30
|
||||
|
||||
# OPAL layer
|
||||
libmca_opal_common_cuda_so_version=70:0:30
|
||||
libmca_opal_common_ofi_so_version=10:2:0
|
||||
libmca_opal_common_sm_so_version=70:0:30
|
||||
libmca_opal_common_ucx_so_version=70:2:30
|
||||
libmca_opal_common_ugni_so_version=70:0:30
|
||||
libmca_opal_common_verbs_so_version=70:0:30
|
||||
|
||||
#else
|
||||
|
||||
#include_next <version>
|
||||
|
||||
#endif
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,38 @@
|
|||
#
|
||||
# Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2021 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2010 Oracle and/or its affiliates. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
# Copyright (c) 2016 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
EXTRA_DIST = \
|
||||
distscript.sh \
|
||||
opal_get_version.m4sh \
|
||||
ltmain_nag_pthread.diff \
|
||||
ltmain_pgi_tp.diff \
|
||||
opal_mca_priority_sort.pl \
|
||||
find_common_syms \
|
||||
getdate.sh \
|
||||
make_manpage.pl \
|
||||
from-savannah/upstream-config.guess \
|
||||
from-savannah/upstream-config.sub
|
||||
|
||||
maintainer-clean-local:
|
||||
rm -f opal_get_version.sh
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,495 @@
|
|||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl This file is automatically created by autogen.pl; it should not
|
||||
dnl be edited by hand!!
|
||||
dnl
|
||||
dnl Generated by ec2-user at Thu May 26 14:32:49 2022
|
||||
dnl on ip-172-31-4-35.us-west-2.compute.internal.
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Platform file
|
||||
m4_define([autogen_platform_file], [])
|
||||
|
||||
dnl Separate m4 define for each project
|
||||
m4_define([project_opal], [1])
|
||||
m4_define([project_orte], [1])
|
||||
m4_define([project_ompi], [1])
|
||||
m4_define([project_oshmem], [1])
|
||||
|
||||
dnl Project names
|
||||
m4_define([project_name_long], [Open MPI])
|
||||
m4_define([project_name_short], [openmpi])
|
||||
|
||||
dnl List of MCA projects found by autogen.pl
|
||||
m4_define([mca_project_list], [opal, orte, ompi, oshmem])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl MCA information
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Frameworks in the opal project and their corresponding directories
|
||||
m4_define([mca_opal_framework_list], [common, allocator, backtrace, btl, compress, crs, dl, event, hwloc, if, installdirs, memchecker, memcpy, memory, mpool, patcher, pmix, pstat, rcache, reachable, shmem, timer])
|
||||
|
||||
dnl Components in the opal / common framework
|
||||
m4_define([mca_opal_common_m4_config_component_list], [cuda, ofi, sm, ucx, verbs, verbs_usnic])
|
||||
m4_define([mca_opal_common_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / allocator framework
|
||||
m4_define([mca_opal_allocator_m4_config_component_list], [])
|
||||
m4_define([mca_opal_allocator_no_config_component_list], [basic, bucket])
|
||||
|
||||
dnl Components in the opal / backtrace framework
|
||||
m4_define([mca_opal_backtrace_m4_config_component_list], [execinfo, none, printstack])
|
||||
m4_define([mca_opal_backtrace_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / btl framework
|
||||
m4_define([mca_opal_btl_m4_config_component_list], [ofi, openib, portals4, sm, smcuda, tcp, uct, ugni, usnic, vader])
|
||||
m4_define([mca_opal_btl_no_config_component_list], [self])
|
||||
|
||||
dnl Components in the opal / compress framework
|
||||
m4_define([mca_opal_compress_m4_config_component_list], [])
|
||||
m4_define([mca_opal_compress_no_config_component_list], [bzip, gzip])
|
||||
|
||||
dnl Components in the opal / crs framework
|
||||
m4_define([mca_opal_crs_m4_config_component_list], [self])
|
||||
m4_define([mca_opal_crs_no_config_component_list], [none])
|
||||
|
||||
dnl Components in the opal / dl framework
|
||||
m4_define([mca_opal_dl_m4_config_component_list], [dlopen, libltdl])
|
||||
m4_define([mca_opal_dl_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / event framework
|
||||
m4_define([mca_opal_event_m4_config_component_list], [external, libevent2022])
|
||||
m4_define([mca_opal_event_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / hwloc framework
|
||||
m4_define([mca_opal_hwloc_m4_config_component_list], [external, hwloc201])
|
||||
m4_define([mca_opal_hwloc_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / if framework
|
||||
m4_define([mca_opal_if_m4_config_component_list], [bsdx_ipv4, bsdx_ipv6, linux_ipv6, posix_ipv4, solaris_ipv6])
|
||||
m4_define([mca_opal_if_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / installdirs framework
|
||||
m4_define([mca_opal_installdirs_m4_config_component_list], [config, env])
|
||||
m4_define([mca_opal_installdirs_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / memchecker framework
|
||||
m4_define([mca_opal_memchecker_m4_config_component_list], [valgrind])
|
||||
m4_define([mca_opal_memchecker_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / memcpy framework
|
||||
m4_define([mca_opal_memcpy_m4_config_component_list], [])
|
||||
m4_define([mca_opal_memcpy_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / memory framework
|
||||
m4_define([mca_opal_memory_m4_config_component_list], [malloc_solaris, patcher])
|
||||
m4_define([mca_opal_memory_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / mpool framework
|
||||
m4_define([mca_opal_mpool_m4_config_component_list], [memkind])
|
||||
m4_define([mca_opal_mpool_no_config_component_list], [hugepage])
|
||||
|
||||
dnl Components in the opal / patcher framework
|
||||
m4_define([mca_opal_patcher_m4_config_component_list], [linux, overwrite])
|
||||
m4_define([mca_opal_patcher_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / pmix framework
|
||||
m4_define([mca_opal_pmix_m4_config_component_list], [cray, ext1x, ext2x, ext3x, flux, pmix3x, s1, s2])
|
||||
m4_define([mca_opal_pmix_no_config_component_list], [isolated])
|
||||
|
||||
dnl Components in the opal / pstat framework
|
||||
m4_define([mca_opal_pstat_m4_config_component_list], [linux, test])
|
||||
m4_define([mca_opal_pstat_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / rcache framework
|
||||
m4_define([mca_opal_rcache_m4_config_component_list], [gpusm, rgpusm, udreg])
|
||||
m4_define([mca_opal_rcache_no_config_component_list], [grdma])
|
||||
|
||||
dnl Components in the opal / reachable framework
|
||||
m4_define([mca_opal_reachable_m4_config_component_list], [netlink])
|
||||
m4_define([mca_opal_reachable_no_config_component_list], [weighted])
|
||||
|
||||
dnl Components in the opal / shmem framework
|
||||
m4_define([mca_opal_shmem_m4_config_component_list], [mmap, posix, sysv])
|
||||
m4_define([mca_opal_shmem_no_config_component_list], [])
|
||||
|
||||
dnl Components in the opal / timer framework
|
||||
m4_define([mca_opal_timer_m4_config_component_list], [altix, darwin, linux, solaris])
|
||||
m4_define([mca_opal_timer_no_config_component_list], [])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Frameworks in the orte project and their corresponding directories
|
||||
m4_define([mca_orte_framework_list], [common, errmgr, ess, filem, grpcomm, iof, odls, oob, plm, ras, regx, rmaps, rml, routed, rtc, schizo, snapc, sstore, state])
|
||||
|
||||
dnl Components in the orte / common framework
|
||||
m4_define([mca_orte_common_m4_config_component_list], [alps])
|
||||
m4_define([mca_orte_common_no_config_component_list], [])
|
||||
|
||||
dnl Components in the orte / errmgr framework
|
||||
m4_define([mca_orte_errmgr_m4_config_component_list], [])
|
||||
m4_define([mca_orte_errmgr_no_config_component_list], [default_app, default_hnp, default_orted, default_tool])
|
||||
|
||||
dnl Components in the orte / ess framework
|
||||
m4_define([mca_orte_ess_m4_config_component_list], [alps, lsf, slurm, tm])
|
||||
m4_define([mca_orte_ess_no_config_component_list], [env, hnp, pmi, singleton, tool])
|
||||
|
||||
dnl Components in the orte / filem framework
|
||||
m4_define([mca_orte_filem_m4_config_component_list], [])
|
||||
m4_define([mca_orte_filem_no_config_component_list], [raw])
|
||||
|
||||
dnl Components in the orte / grpcomm framework
|
||||
m4_define([mca_orte_grpcomm_m4_config_component_list], [])
|
||||
m4_define([mca_orte_grpcomm_no_config_component_list], [direct])
|
||||
|
||||
dnl Components in the orte / iof framework
|
||||
m4_define([mca_orte_iof_m4_config_component_list], [])
|
||||
m4_define([mca_orte_iof_no_config_component_list], [hnp, orted, tool])
|
||||
|
||||
dnl Components in the orte / odls framework
|
||||
m4_define([mca_orte_odls_m4_config_component_list], [alps, default, pspawn])
|
||||
m4_define([mca_orte_odls_no_config_component_list], [])
|
||||
|
||||
dnl Components in the orte / oob framework
|
||||
m4_define([mca_orte_oob_m4_config_component_list], [alps, tcp])
|
||||
m4_define([mca_orte_oob_no_config_component_list], [])
|
||||
|
||||
dnl Components in the orte / plm framework
|
||||
m4_define([mca_orte_plm_m4_config_component_list], [alps, isolated, lsf, rsh, slurm, tm])
|
||||
m4_define([mca_orte_plm_no_config_component_list], [])
|
||||
|
||||
dnl Components in the orte / ras framework
|
||||
m4_define([mca_orte_ras_m4_config_component_list], [alps, gridengine, lsf, slurm, tm])
|
||||
m4_define([mca_orte_ras_no_config_component_list], [simulator])
|
||||
|
||||
dnl Components in the orte / regx framework
|
||||
m4_define([mca_orte_regx_m4_config_component_list], [])
|
||||
m4_define([mca_orte_regx_no_config_component_list], [fwd, naive, reverse])
|
||||
|
||||
dnl Components in the orte / rmaps framework
|
||||
m4_define([mca_orte_rmaps_m4_config_component_list], [])
|
||||
m4_define([mca_orte_rmaps_no_config_component_list], [mindist, ppr, rank_file, resilient, round_robin, seq])
|
||||
|
||||
dnl Components in the orte / rml framework
|
||||
m4_define([mca_orte_rml_m4_config_component_list], [])
|
||||
m4_define([mca_orte_rml_no_config_component_list], [oob])
|
||||
|
||||
dnl Components in the orte / routed framework
|
||||
m4_define([mca_orte_routed_m4_config_component_list], [])
|
||||
m4_define([mca_orte_routed_no_config_component_list], [binomial, direct, radix])
|
||||
|
||||
dnl Components in the orte / rtc framework
|
||||
m4_define([mca_orte_rtc_m4_config_component_list], [])
|
||||
m4_define([mca_orte_rtc_no_config_component_list], [hwloc])
|
||||
|
||||
dnl Components in the orte / schizo framework
|
||||
m4_define([mca_orte_schizo_m4_config_component_list], [alps, jsm, moab, singularity, slurm])
|
||||
m4_define([mca_orte_schizo_no_config_component_list], [flux, ompi, orte])
|
||||
|
||||
dnl Components in the orte / snapc framework
|
||||
m4_define([mca_orte_snapc_m4_config_component_list], [full])
|
||||
m4_define([mca_orte_snapc_no_config_component_list], [])
|
||||
|
||||
dnl Components in the orte / sstore framework
|
||||
m4_define([mca_orte_sstore_m4_config_component_list], [central, stage])
|
||||
m4_define([mca_orte_sstore_no_config_component_list], [])
|
||||
|
||||
dnl Components in the orte / state framework
|
||||
m4_define([mca_orte_state_m4_config_component_list], [])
|
||||
m4_define([mca_orte_state_no_config_component_list], [app, hnp, novm, orted, tool])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Frameworks in the ompi project and their corresponding directories
|
||||
m4_define([mca_ompi_framework_list], [common, bml, coll, crcp, fbtl, fcoll, fs, hook, io, mtl, op, osc, pml, rte, sharedfp, topo, vprotocol])
|
||||
|
||||
dnl Components in the ompi / common framework
|
||||
m4_define([mca_ompi_common_m4_config_component_list], [monitoring, ompio])
|
||||
m4_define([mca_ompi_common_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / bml framework
|
||||
m4_define([mca_ompi_bml_m4_config_component_list], [r2])
|
||||
m4_define([mca_ompi_bml_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / coll framework
|
||||
m4_define([mca_ompi_coll_m4_config_component_list], [cuda, fca, hcoll, monitoring, portals4, ucc])
|
||||
m4_define([mca_ompi_coll_no_config_component_list], [adapt, basic, han, inter, libnbc, self, sm, sync, tuned])
|
||||
|
||||
dnl Components in the ompi / crcp framework
|
||||
m4_define([mca_ompi_crcp_m4_config_component_list], [bkmrk])
|
||||
m4_define([mca_ompi_crcp_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / fbtl framework
|
||||
m4_define([mca_ompi_fbtl_m4_config_component_list], [ime, posix, pvfs2])
|
||||
m4_define([mca_ompi_fbtl_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / fcoll framework
|
||||
m4_define([mca_ompi_fcoll_m4_config_component_list], [])
|
||||
m4_define([mca_ompi_fcoll_no_config_component_list], [dynamic, dynamic_gen2, individual, two_phase, vulcan])
|
||||
|
||||
dnl Components in the ompi / fs framework
|
||||
m4_define([mca_ompi_fs_m4_config_component_list], [gpfs, ime, lustre, pvfs2, ufs])
|
||||
m4_define([mca_ompi_fs_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / hook framework
|
||||
m4_define([mca_ompi_hook_m4_config_component_list], [])
|
||||
m4_define([mca_ompi_hook_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / io framework
|
||||
m4_define([mca_ompi_io_m4_config_component_list], [ompio, romio321])
|
||||
m4_define([mca_ompi_io_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / mtl framework
|
||||
m4_define([mca_ompi_mtl_m4_config_component_list], [ofi, portals4, psm, psm2])
|
||||
m4_define([mca_ompi_mtl_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / op framework
|
||||
m4_define([mca_ompi_op_m4_config_component_list], [avx])
|
||||
m4_define([mca_ompi_op_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / osc framework
|
||||
m4_define([mca_ompi_osc_m4_config_component_list], [monitoring, portals4, pt2pt, rdma, ucx])
|
||||
m4_define([mca_ompi_osc_no_config_component_list], [sm])
|
||||
|
||||
dnl Components in the ompi / pml framework
|
||||
m4_define([mca_ompi_pml_m4_config_component_list], [crcpw, monitoring, ob1, ucx, v, yalla])
|
||||
m4_define([mca_ompi_pml_no_config_component_list], [cm])
|
||||
|
||||
dnl Components in the ompi / rte framework
|
||||
m4_define([mca_ompi_rte_m4_config_component_list], [orte, pmix])
|
||||
m4_define([mca_ompi_rte_no_config_component_list], [])
|
||||
|
||||
dnl Components in the ompi / sharedfp framework
|
||||
m4_define([mca_ompi_sharedfp_m4_config_component_list], [sm])
|
||||
m4_define([mca_ompi_sharedfp_no_config_component_list], [individual, lockedfile])
|
||||
|
||||
dnl Components in the ompi / topo framework
|
||||
m4_define([mca_ompi_topo_m4_config_component_list], [treematch])
|
||||
m4_define([mca_ompi_topo_no_config_component_list], [basic])
|
||||
|
||||
dnl Components in the ompi / vprotocol framework
|
||||
m4_define([mca_ompi_vprotocol_m4_config_component_list], [])
|
||||
m4_define([mca_ompi_vprotocol_no_config_component_list], [pessimist])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Frameworks in the oshmem project and their corresponding directories
|
||||
m4_define([mca_oshmem_framework_list], [atomic, memheap, scoll, spml, sshmem])
|
||||
|
||||
dnl Components in the oshmem / atomic framework
|
||||
m4_define([mca_oshmem_atomic_m4_config_component_list], [mxm, ucx])
|
||||
m4_define([mca_oshmem_atomic_no_config_component_list], [basic])
|
||||
|
||||
dnl Components in the oshmem / memheap framework
|
||||
m4_define([mca_oshmem_memheap_m4_config_component_list], [])
|
||||
m4_define([mca_oshmem_memheap_no_config_component_list], [buddy, ptmalloc])
|
||||
|
||||
dnl Components in the oshmem / scoll framework
|
||||
m4_define([mca_oshmem_scoll_m4_config_component_list], [fca, ucc])
|
||||
m4_define([mca_oshmem_scoll_no_config_component_list], [basic, mpi])
|
||||
|
||||
dnl Components in the oshmem / spml framework
|
||||
m4_define([mca_oshmem_spml_m4_config_component_list], [ikrit, ucx])
|
||||
m4_define([mca_oshmem_spml_no_config_component_list], [])
|
||||
|
||||
dnl Components in the oshmem / sshmem framework
|
||||
m4_define([mca_oshmem_sshmem_m4_config_component_list], [mmap, sysv, ucx, verbs])
|
||||
m4_define([mca_oshmem_sshmem_no_config_component_list], [])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl List of configure.m4 files to include
|
||||
m4_include([opal/mca/backtrace/configure.m4])
|
||||
m4_include([opal/mca/dl/configure.m4])
|
||||
m4_include([opal/mca/event/configure.m4])
|
||||
m4_include([opal/mca/hwloc/configure.m4])
|
||||
m4_include([opal/mca/installdirs/configure.m4])
|
||||
m4_include([opal/mca/memchecker/configure.m4])
|
||||
m4_include([opal/mca/memcpy/configure.m4])
|
||||
m4_include([opal/mca/memory/configure.m4])
|
||||
m4_include([opal/mca/pstat/configure.m4])
|
||||
m4_include([opal/mca/timer/configure.m4])
|
||||
m4_include([opal/mca/common/cuda/configure.m4])
|
||||
m4_include([opal/mca/common/ofi/configure.m4])
|
||||
m4_include([opal/mca/common/sm/configure.m4])
|
||||
m4_include([opal/mca/common/ucx/configure.m4])
|
||||
m4_include([opal/mca/common/verbs/configure.m4])
|
||||
m4_include([opal/mca/common/verbs_usnic/configure.m4])
|
||||
m4_include([opal/mca/backtrace/execinfo/configure.m4])
|
||||
m4_include([opal/mca/backtrace/none/configure.m4])
|
||||
m4_include([opal/mca/backtrace/printstack/configure.m4])
|
||||
m4_include([opal/mca/btl/ofi/configure.m4])
|
||||
m4_include([opal/mca/btl/openib/configure.m4])
|
||||
m4_include([opal/mca/btl/portals4/configure.m4])
|
||||
m4_include([opal/mca/btl/sm/configure.m4])
|
||||
m4_include([opal/mca/btl/smcuda/configure.m4])
|
||||
m4_include([opal/mca/btl/tcp/configure.m4])
|
||||
m4_include([opal/mca/btl/uct/configure.m4])
|
||||
m4_include([opal/mca/btl/ugni/configure.m4])
|
||||
m4_include([opal/mca/btl/usnic/configure.m4])
|
||||
m4_include([opal/mca/btl/vader/configure.m4])
|
||||
m4_include([opal/mca/crs/self/configure.m4])
|
||||
m4_include([opal/mca/dl/dlopen/configure.m4])
|
||||
m4_include([opal/mca/dl/libltdl/configure.m4])
|
||||
m4_include([opal/mca/event/external/configure.m4])
|
||||
m4_include([opal/mca/event/libevent2022/configure.m4])
|
||||
m4_include([opal/mca/hwloc/external/configure.m4])
|
||||
m4_include([opal/mca/hwloc/hwloc201/configure.m4])
|
||||
m4_include([opal/mca/if/bsdx_ipv4/configure.m4])
|
||||
m4_include([opal/mca/if/bsdx_ipv6/configure.m4])
|
||||
m4_include([opal/mca/if/linux_ipv6/configure.m4])
|
||||
m4_include([opal/mca/if/posix_ipv4/configure.m4])
|
||||
m4_include([opal/mca/if/solaris_ipv6/configure.m4])
|
||||
m4_include([opal/mca/installdirs/config/configure.m4])
|
||||
m4_include([opal/mca/installdirs/env/configure.m4])
|
||||
m4_include([opal/mca/memchecker/valgrind/configure.m4])
|
||||
m4_include([opal/mca/memory/malloc_solaris/configure.m4])
|
||||
m4_include([opal/mca/memory/patcher/configure.m4])
|
||||
m4_include([opal/mca/mpool/memkind/configure.m4])
|
||||
m4_include([opal/mca/patcher/linux/configure.m4])
|
||||
m4_include([opal/mca/patcher/overwrite/configure.m4])
|
||||
m4_include([opal/mca/pmix/cray/configure.m4])
|
||||
m4_include([opal/mca/pmix/ext1x/configure.m4])
|
||||
m4_include([opal/mca/pmix/ext2x/configure.m4])
|
||||
m4_include([opal/mca/pmix/ext3x/configure.m4])
|
||||
m4_include([opal/mca/pmix/flux/configure.m4])
|
||||
m4_include([opal/mca/pmix/pmix3x/configure.m4])
|
||||
m4_include([opal/mca/pmix/s1/configure.m4])
|
||||
m4_include([opal/mca/pmix/s2/configure.m4])
|
||||
m4_include([opal/mca/pstat/linux/configure.m4])
|
||||
m4_include([opal/mca/pstat/test/configure.m4])
|
||||
m4_include([opal/mca/rcache/gpusm/configure.m4])
|
||||
m4_include([opal/mca/rcache/rgpusm/configure.m4])
|
||||
m4_include([opal/mca/rcache/udreg/configure.m4])
|
||||
m4_include([opal/mca/reachable/netlink/configure.m4])
|
||||
m4_include([opal/mca/shmem/mmap/configure.m4])
|
||||
m4_include([opal/mca/shmem/posix/configure.m4])
|
||||
m4_include([opal/mca/shmem/sysv/configure.m4])
|
||||
m4_include([opal/mca/timer/altix/configure.m4])
|
||||
m4_include([opal/mca/timer/darwin/configure.m4])
|
||||
m4_include([opal/mca/timer/linux/configure.m4])
|
||||
m4_include([opal/mca/timer/solaris/configure.m4])
|
||||
m4_include([orte/mca/common/alps/configure.m4])
|
||||
m4_include([orte/mca/ess/alps/configure.m4])
|
||||
m4_include([orte/mca/ess/lsf/configure.m4])
|
||||
m4_include([orte/mca/ess/slurm/configure.m4])
|
||||
m4_include([orte/mca/ess/tm/configure.m4])
|
||||
m4_include([orte/mca/odls/alps/configure.m4])
|
||||
m4_include([orte/mca/odls/default/configure.m4])
|
||||
m4_include([orte/mca/odls/pspawn/configure.m4])
|
||||
m4_include([orte/mca/oob/alps/configure.m4])
|
||||
m4_include([orte/mca/oob/tcp/configure.m4])
|
||||
m4_include([orte/mca/plm/alps/configure.m4])
|
||||
m4_include([orte/mca/plm/isolated/configure.m4])
|
||||
m4_include([orte/mca/plm/lsf/configure.m4])
|
||||
m4_include([orte/mca/plm/rsh/configure.m4])
|
||||
m4_include([orte/mca/plm/slurm/configure.m4])
|
||||
m4_include([orte/mca/plm/tm/configure.m4])
|
||||
m4_include([orte/mca/ras/alps/configure.m4])
|
||||
m4_include([orte/mca/ras/gridengine/configure.m4])
|
||||
m4_include([orte/mca/ras/lsf/configure.m4])
|
||||
m4_include([orte/mca/ras/slurm/configure.m4])
|
||||
m4_include([orte/mca/ras/tm/configure.m4])
|
||||
m4_include([orte/mca/schizo/alps/configure.m4])
|
||||
m4_include([orte/mca/schizo/jsm/configure.m4])
|
||||
m4_include([orte/mca/schizo/moab/configure.m4])
|
||||
m4_include([orte/mca/schizo/singularity/configure.m4])
|
||||
m4_include([orte/mca/schizo/slurm/configure.m4])
|
||||
m4_include([orte/mca/snapc/full/configure.m4])
|
||||
m4_include([orte/mca/sstore/central/configure.m4])
|
||||
m4_include([orte/mca/sstore/stage/configure.m4])
|
||||
m4_include([ompi/mca/fbtl/configure.m4])
|
||||
m4_include([ompi/mca/fcoll/configure.m4])
|
||||
m4_include([ompi/mca/fs/configure.m4])
|
||||
m4_include([ompi/mca/hook/configure.m4])
|
||||
m4_include([ompi/mca/mtl/configure.m4])
|
||||
m4_include([ompi/mca/pml/configure.m4])
|
||||
m4_include([ompi/mca/rte/configure.m4])
|
||||
m4_include([ompi/mca/sharedfp/configure.m4])
|
||||
m4_include([ompi/mca/common/monitoring/configure.m4])
|
||||
m4_include([ompi/mca/common/ompio/configure.m4])
|
||||
m4_include([ompi/mca/bml/r2/configure.m4])
|
||||
m4_include([ompi/mca/coll/cuda/configure.m4])
|
||||
m4_include([ompi/mca/coll/fca/configure.m4])
|
||||
m4_include([ompi/mca/coll/hcoll/configure.m4])
|
||||
m4_include([ompi/mca/coll/monitoring/configure.m4])
|
||||
m4_include([ompi/mca/coll/portals4/configure.m4])
|
||||
m4_include([ompi/mca/coll/ucc/configure.m4])
|
||||
m4_include([ompi/mca/crcp/bkmrk/configure.m4])
|
||||
m4_include([ompi/mca/fbtl/ime/configure.m4])
|
||||
m4_include([ompi/mca/fbtl/posix/configure.m4])
|
||||
m4_include([ompi/mca/fbtl/pvfs2/configure.m4])
|
||||
m4_include([ompi/mca/fs/gpfs/configure.m4])
|
||||
m4_include([ompi/mca/fs/ime/configure.m4])
|
||||
m4_include([ompi/mca/fs/lustre/configure.m4])
|
||||
m4_include([ompi/mca/fs/pvfs2/configure.m4])
|
||||
m4_include([ompi/mca/fs/ufs/configure.m4])
|
||||
m4_include([ompi/mca/io/ompio/configure.m4])
|
||||
m4_include([ompi/mca/io/romio321/configure.m4])
|
||||
m4_include([ompi/mca/mtl/ofi/configure.m4])
|
||||
m4_include([ompi/mca/mtl/portals4/configure.m4])
|
||||
m4_include([ompi/mca/mtl/psm/configure.m4])
|
||||
m4_include([ompi/mca/mtl/psm2/configure.m4])
|
||||
m4_include([ompi/mca/op/avx/configure.m4])
|
||||
m4_include([ompi/mca/osc/monitoring/configure.m4])
|
||||
m4_include([ompi/mca/osc/portals4/configure.m4])
|
||||
m4_include([ompi/mca/osc/pt2pt/configure.m4])
|
||||
m4_include([ompi/mca/osc/rdma/configure.m4])
|
||||
m4_include([ompi/mca/osc/ucx/configure.m4])
|
||||
m4_include([ompi/mca/pml/crcpw/configure.m4])
|
||||
m4_include([ompi/mca/pml/monitoring/configure.m4])
|
||||
m4_include([ompi/mca/pml/ob1/configure.m4])
|
||||
m4_include([ompi/mca/pml/ucx/configure.m4])
|
||||
m4_include([ompi/mca/pml/v/configure.m4])
|
||||
m4_include([ompi/mca/pml/yalla/configure.m4])
|
||||
m4_include([ompi/mca/rte/orte/configure.m4])
|
||||
m4_include([ompi/mca/rte/pmix/configure.m4])
|
||||
m4_include([ompi/mca/sharedfp/sm/configure.m4])
|
||||
m4_include([ompi/mca/topo/treematch/configure.m4])
|
||||
m4_include([oshmem/mca/memheap/configure.m4])
|
||||
m4_include([oshmem/mca/spml/configure.m4])
|
||||
m4_include([oshmem/mca/atomic/mxm/configure.m4])
|
||||
m4_include([oshmem/mca/atomic/ucx/configure.m4])
|
||||
m4_include([oshmem/mca/scoll/fca/configure.m4])
|
||||
m4_include([oshmem/mca/scoll/ucc/configure.m4])
|
||||
m4_include([oshmem/mca/spml/ikrit/configure.m4])
|
||||
m4_include([oshmem/mca/spml/ucx/configure.m4])
|
||||
m4_include([oshmem/mca/sshmem/mmap/configure.m4])
|
||||
m4_include([oshmem/mca/sshmem/sysv/configure.m4])
|
||||
m4_include([oshmem/mca/sshmem/ucx/configure.m4])
|
||||
m4_include([oshmem/mca/sshmem/verbs/configure.m4])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Open MPI extensions information
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl List of all MPI extensions
|
||||
m4_define([ompi_mpiext_list], [affinity, cr, cuda, pcollreq])
|
||||
|
||||
dnl List of configure.m4 files to include
|
||||
m4_include([ompi/mpiext/affinity/configure.m4])
|
||||
m4_include([ompi/mpiext/cr/configure.m4])
|
||||
m4_include([ompi/mpiext/cuda/configure.m4])
|
||||
m4_include([ompi/mpiext/pcollreq/configure.m4])
|
||||
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl ---------------------------------------------------------------------------
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl Open MPI contrib information
|
||||
dnl ---------------------------------------------------------------------------
|
||||
|
||||
dnl List of all MPI contribs
|
||||
m4_define([ompi_mpicontrib_list], [libompitrace])
|
||||
|
||||
dnl List of configure.m4 files to include
|
||||
m4_include([ompi/contrib/libompitrace/configure.m4])
|
|
@ -0,0 +1,73 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014-2015 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OPAL_C_GET_ALIGN(type, config_var)
|
||||
# ----------------------------------
|
||||
# Determine datatype alignment.
|
||||
# First arg is type, 2nd arg is config var to define.
|
||||
# Now that we require C99 compilers, we include stdbool.h
|
||||
# in the alignment test so that we can find the definition
|
||||
# of "bool" when we test for its alignment. We might be able
|
||||
# to avoid this if we test for alignemtn of _Bool, but
|
||||
# since we use "bool" in the code, let's be safe and check
|
||||
# what we use. Yes, they should be the same - but "should" and
|
||||
# "are" frequently differ
|
||||
AC_DEFUN([OPAL_C_GET_ALIGNMENT],[
|
||||
AC_CACHE_CHECK([alignment of $1],
|
||||
[AS_TR_SH([opal_cv_c_align_$1])],
|
||||
[AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
|
||||
#include <stdbool.h> ],
|
||||
[[
|
||||
struct foo { char c; $1 x; };
|
||||
struct foo *p = (struct foo *) malloc(sizeof(struct foo));
|
||||
int diff;
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
diff = ((char *)&p->x) - ((char *)&p->c);
|
||||
free(p);
|
||||
fprintf(f, "%d\n", (diff >= 0) ? diff : -diff);
|
||||
]])], [AS_TR_SH([opal_cv_c_align_$1])=`cat conftestval`],
|
||||
[AC_MSG_WARN([*** Problem running configure test!])
|
||||
AC_MSG_WARN([*** See config.log for details.])
|
||||
AC_MSG_ERROR([*** Cannot continue.])],
|
||||
[ # cross compile - do a non-executable test. Trick
|
||||
# taken from the Autoconf 2.59c. Switch to using
|
||||
# AC_CHECK_ALIGNOF when we can require Autoconf 2.60.
|
||||
_AC_COMPUTE_INT([(long int) offsetof (opal__type_alignof_, y)],
|
||||
[AS_TR_SH([opal_cv_c_align_$1])],
|
||||
[AC_INCLUDES_DEFAULT
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifndef offsetof
|
||||
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
|
||||
#endif
|
||||
typedef struct { char x; $1 y; } opal__type_alignof_;
|
||||
],
|
||||
[AC_MSG_WARN([*** Problem running configure test!])
|
||||
AC_MSG_WARN([*** See config.log for details.])
|
||||
AC_MSG_ERROR([*** Cannot continue.])])])])
|
||||
|
||||
AC_DEFINE_UNQUOTED([$2], [$AS_TR_SH([opal_cv_c_align_$1])], [Alignment of type $1])
|
||||
eval "$2=$AS_TR_SH([opal_cv_c_align_$1])"
|
||||
|
||||
rm -rf conftest* ]) dnl
|
|
@ -0,0 +1,134 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2014 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# _OPAL_C_WEAK_SYMBOLS(action_if_found, [action_if_not_found])
|
||||
# ------------------------------------------------------------
|
||||
AC_DEFUN([_OPAL_C_WEAK_SYMBOLS],[
|
||||
# need two files because icc will incorrectly not create the
|
||||
# symbols if they are not used in the object file in which they
|
||||
# are defined. Blah!
|
||||
# To get to compile with icc, have them in a separate header.
|
||||
cat > conftest_weak.h <<EOF
|
||||
int real(int i);
|
||||
int fake(int i);
|
||||
EOF
|
||||
|
||||
cat > conftest_weak.c <<EOF
|
||||
#include "conftest_weak.h"
|
||||
#pragma weak fake = real
|
||||
int real(int i) { return i; }
|
||||
EOF
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
#include "conftest_weak.h"
|
||||
int main() { return fake(3); }
|
||||
EOF
|
||||
|
||||
# Try the compile
|
||||
OPAL_LOG_COMMAND(
|
||||
[$CC $CFLAGS -c conftest_weak.c],
|
||||
[OPAL_LOG_COMMAND(
|
||||
[$CC $CFLAGS conftest.c conftest_weak.o -o conftest $LDFLAGS $LIBS],
|
||||
[opal_c_weak_symbols_happy=1],
|
||||
[opal_c_weak_symbols_happy=0])],
|
||||
[opal_c_weak_symbols_happy=0])
|
||||
|
||||
AS_IF([test "$opal_c_weak_symbols_happy" = "1"], [$1], [$2])
|
||||
|
||||
unset opal_c_weak_symbols_happy
|
||||
rm -f conftest_weak.h conftest_weak.c conftest.c conftest
|
||||
])
|
||||
|
||||
|
||||
# OPAL_C_WEAK_SYMBOLS()
|
||||
# ---------------------
|
||||
# sets OPAL_C_HAVE_WEAK_SYMBOLS=1 if C compiler has support for weak symbols
|
||||
AC_DEFUN([OPAL_C_WEAK_SYMBOLS],[
|
||||
AC_CACHE_CHECK([for weak symbol support],
|
||||
[opal_cv_c_weak_symbols],
|
||||
[_OPAL_C_WEAK_SYMBOLS([opal_cv_c_weak_symbols="yes"],
|
||||
[opal_cv_c_weak_symbols="no"])])
|
||||
|
||||
AS_IF([test "$opal_cv_c_weak_symbols" = "yes"],
|
||||
[OPAL_C_HAVE_WEAK_SYMBOLS=1], [OPAL_C_HAVE_WEAK_SYMBOLS=0])
|
||||
]) dnl
|
||||
|
||||
########################################################################
|
||||
|
||||
# _OPAL_C_MACRO_WEAK_SYMBOLS(action_if_found, [action_if_not_found])
|
||||
# ------------------------------------------------------------
|
||||
AC_DEFUN([_OPAL_C_MACRO_WEAK_SYMBOLS],[
|
||||
# need two files because icc will incorrectly not create the
|
||||
# symbols if they are not used in the object file in which they
|
||||
# are defined. Blah!
|
||||
# To get to compile with icc, have them in a separate header.
|
||||
cat > conftest_weak.h <<EOF
|
||||
int real(int i);
|
||||
int fake1(int i);
|
||||
int fake2(int i);
|
||||
|
||||
#define GENERATE_WEAK_PRAGMA(x) _Pragma(#x)
|
||||
#define GENERATE_TWO_WEAK_PRAGMAS(real, fake) \
|
||||
GENERATE_WEAK_PRAGMA(weak fake##1 = real) \
|
||||
GENERATE_WEAK_PRAGMA(weak fake##2 = real)
|
||||
EOF
|
||||
|
||||
cat > conftest_weak.c <<EOF
|
||||
#include "conftest_weak.h"
|
||||
GENERATE_TWO_WEAK_PRAGMAS(real, fake)
|
||||
int real(int i) { return i; }
|
||||
EOF
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
#include "conftest_weak.h"
|
||||
int main() { return fake1(3) + fake2(3); }
|
||||
EOF
|
||||
|
||||
# Try the compile
|
||||
OPAL_LOG_COMMAND(
|
||||
[$CC $CFLAGS -c conftest_weak.c],
|
||||
[OPAL_LOG_COMMAND(
|
||||
[$CC $CFLAGS conftest.c conftest_weak.o -o conftest $LDFLAGS $LIBS],
|
||||
[opal_c_macro_weak_symbols_happy=1],
|
||||
[opal_c_macro_weak_symbols_happy=0])],
|
||||
[opal_c_macro_weak_symbols_happy=0])
|
||||
|
||||
AS_IF([test "$opal_c_macro_weak_symbols_happy" = "1"], [$1], [$2])
|
||||
|
||||
unset opal_c_macro_weak_symbols_happy
|
||||
rm -f conftest_weak.h conftest_weak.c conftest.c conftest
|
||||
])
|
||||
|
||||
# OPAL_C_MACRO_WEAK_SYMBOLS
|
||||
# ---------------------
|
||||
# Sets OPAL_C_HAVE_MACRO_WEAK_SYMBOLS=1 if C compiler has support for weak
|
||||
# symbols
|
||||
AC_DEFUN([OPAL_C_MACRO_WEAK_SYMBOLS],[
|
||||
AC_CACHE_CHECK([for macro weak symbol support],
|
||||
[opal_cv_c_macro_weak_symbols],
|
||||
[_OPAL_C_MACRO_WEAK_SYMBOLS([opal_cv_c_macro_weak_symbols="yes"],
|
||||
[opal_cv_c_macro_weak_symbols="no"])])
|
||||
|
||||
AS_IF([test "$opal_cv_c_macro_weak_symbols" = "yes"],
|
||||
[OPAL_C_HAVE_MACRO_WEAK_SYMBOLS=1],
|
||||
[OPAL_C_HAVE_MACRO_WEAK_SYMBOLS=0])
|
||||
]) dnl
|
|
@ -0,0 +1,347 @@
|
|||
#! /bin/sh
|
||||
# Wrapper for compilers which do not understand '-c -o'.
|
||||
|
||||
scriptversion=2012-10-14.11; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
# Written by Tom Tromey <tromey@cygnus.com>.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# This file is maintained in Automake, please report
|
||||
# bugs to <bug-automake@gnu.org> or send patches to
|
||||
# <automake-patches@gnu.org>.
|
||||
|
||||
nl='
|
||||
'
|
||||
|
||||
# We need space, tab and new line, in precisely that order. Quoting is
|
||||
# there to prevent tools from complaining about whitespace usage.
|
||||
IFS=" "" $nl"
|
||||
|
||||
file_conv=
|
||||
|
||||
# func_file_conv build_file lazy
|
||||
# Convert a $build file to $host form and store it in $file
|
||||
# Currently only supports Windows hosts. If the determined conversion
|
||||
# type is listed in (the comma separated) LAZY, no conversion will
|
||||
# take place.
|
||||
func_file_conv ()
|
||||
{
|
||||
file=$1
|
||||
case $file in
|
||||
/ | /[!/]*) # absolute file, and not a UNC file
|
||||
if test -z "$file_conv"; then
|
||||
# lazily determine how to convert abs files
|
||||
case `uname -s` in
|
||||
MINGW*)
|
||||
file_conv=mingw
|
||||
;;
|
||||
CYGWIN*)
|
||||
file_conv=cygwin
|
||||
;;
|
||||
*)
|
||||
file_conv=wine
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
case $file_conv/,$2, in
|
||||
*,$file_conv,*)
|
||||
;;
|
||||
mingw/*)
|
||||
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
|
||||
;;
|
||||
cygwin/*)
|
||||
file=`cygpath -m "$file" || echo "$file"`
|
||||
;;
|
||||
wine/*)
|
||||
file=`winepath -w "$file" || echo "$file"`
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
# func_cl_dashL linkdir
|
||||
# Make cl look for libraries in LINKDIR
|
||||
func_cl_dashL ()
|
||||
{
|
||||
func_file_conv "$1"
|
||||
if test -z "$lib_path"; then
|
||||
lib_path=$file
|
||||
else
|
||||
lib_path="$lib_path;$file"
|
||||
fi
|
||||
linker_opts="$linker_opts -LIBPATH:$file"
|
||||
}
|
||||
|
||||
# func_cl_dashl library
|
||||
# Do a library search-path lookup for cl
|
||||
func_cl_dashl ()
|
||||
{
|
||||
lib=$1
|
||||
found=no
|
||||
save_IFS=$IFS
|
||||
IFS=';'
|
||||
for dir in $lib_path $LIB
|
||||
do
|
||||
IFS=$save_IFS
|
||||
if $shared && test -f "$dir/$lib.dll.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.dll.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/$lib.lib"; then
|
||||
found=yes
|
||||
lib=$dir/$lib.lib
|
||||
break
|
||||
fi
|
||||
if test -f "$dir/lib$lib.a"; then
|
||||
found=yes
|
||||
lib=$dir/lib$lib.a
|
||||
break
|
||||
fi
|
||||
done
|
||||
IFS=$save_IFS
|
||||
|
||||
if test "$found" != yes; then
|
||||
lib=$lib.lib
|
||||
fi
|
||||
}
|
||||
|
||||
# func_cl_wrapper cl arg...
|
||||
# Adjust compile command to suit cl
|
||||
func_cl_wrapper ()
|
||||
{
|
||||
# Assume a capable shell
|
||||
lib_path=
|
||||
shared=:
|
||||
linker_opts=
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.[oO][bB][jJ])
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fo"$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
func_file_conv "$2"
|
||||
set x "$@" -Fe"$file"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-I)
|
||||
eat=1
|
||||
func_file_conv "$2" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-I*)
|
||||
func_file_conv "${1#-I}" mingw
|
||||
set x "$@" -I"$file"
|
||||
shift
|
||||
;;
|
||||
-l)
|
||||
eat=1
|
||||
func_cl_dashl "$2"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-l*)
|
||||
func_cl_dashl "${1#-l}"
|
||||
set x "$@" "$lib"
|
||||
shift
|
||||
;;
|
||||
-L)
|
||||
eat=1
|
||||
func_cl_dashL "$2"
|
||||
;;
|
||||
-L*)
|
||||
func_cl_dashL "${1#-L}"
|
||||
;;
|
||||
-static)
|
||||
shared=false
|
||||
;;
|
||||
-Wl,*)
|
||||
arg=${1#-Wl,}
|
||||
save_ifs="$IFS"; IFS=','
|
||||
for flag in $arg; do
|
||||
IFS="$save_ifs"
|
||||
linker_opts="$linker_opts $flag"
|
||||
done
|
||||
IFS="$save_ifs"
|
||||
;;
|
||||
-Xlinker)
|
||||
eat=1
|
||||
linker_opts="$linker_opts $2"
|
||||
;;
|
||||
-*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
|
||||
func_file_conv "$1"
|
||||
set x "$@" -Tp"$file"
|
||||
shift
|
||||
;;
|
||||
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
|
||||
func_file_conv "$1" mingw
|
||||
set x "$@" "$file"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
if test -n "$linker_opts"; then
|
||||
linker_opts="-link$linker_opts"
|
||||
fi
|
||||
exec "$@" $linker_opts
|
||||
exit 1
|
||||
}
|
||||
|
||||
eat=
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: compile [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Wrapper for compilers which do not understand '-c -o'.
|
||||
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
|
||||
arguments, and rename the output as expected.
|
||||
|
||||
If you are trying to build a whole package this is not the
|
||||
right script to run: please start by reading the file 'INSTALL'.
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "compile $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
|
||||
func_cl_wrapper "$@" # Doesn't return...
|
||||
;;
|
||||
esac
|
||||
|
||||
ofile=
|
||||
cfile=
|
||||
|
||||
for arg
|
||||
do
|
||||
if test -n "$eat"; then
|
||||
eat=
|
||||
else
|
||||
case $1 in
|
||||
-o)
|
||||
# configure might choose to run compile as 'compile cc -o foo foo.c'.
|
||||
# So we strip '-o arg' only if arg is an object.
|
||||
eat=1
|
||||
case $2 in
|
||||
*.o | *.obj)
|
||||
ofile=$2
|
||||
;;
|
||||
*)
|
||||
set x "$@" -o "$2"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*.c)
|
||||
cfile=$1
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set x "$@" "$1"
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
shift
|
||||
done
|
||||
|
||||
if test -z "$ofile" || test -z "$cfile"; then
|
||||
# If no '-o' option was seen then we might have been invoked from a
|
||||
# pattern rule where we don't need one. That is ok -- this is a
|
||||
# normal compilation that the losing compiler can handle. If no
|
||||
# '.c' file was seen then we are probably linking. That is also
|
||||
# ok.
|
||||
exec "$@"
|
||||
fi
|
||||
|
||||
# Name of file we expect compiler to create.
|
||||
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
|
||||
|
||||
# Create the lock directory.
|
||||
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
|
||||
# that we are using for the .o file. Also, base the name on the expected
|
||||
# object file name, since that is what matters with a parallel build.
|
||||
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
|
||||
while true; do
|
||||
if mkdir "$lockdir" >/dev/null 2>&1; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
# FIXME: race condition here if user kills between mkdir and trap.
|
||||
trap "rmdir '$lockdir'; exit 1" 1 2 15
|
||||
|
||||
# Run the compile.
|
||||
"$@"
|
||||
ret=$?
|
||||
|
||||
if test -f "$cofile"; then
|
||||
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
|
||||
elif test -f "${cofile}bj"; then
|
||||
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
|
||||
fi
|
||||
|
||||
rmdir "$lockdir"
|
||||
exit $ret
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,791 @@
|
|||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2014 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,56 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2015 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
srcdir=$1
|
||||
builddir=$PWD
|
||||
distdir=$builddir/$2
|
||||
OMPI_REPO_REV=$3
|
||||
|
||||
if test x"$2" = x ; then
|
||||
echo "*** ERROR: Must supply relative distdir as argv[2] -- aborting"
|
||||
exit 1
|
||||
elif test ! -d "$distdir" ; then
|
||||
echo "*** ERROR: dist dir does not exist"
|
||||
echo "*** ERROR: $distdir"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# We can catch some hard (but possible) to do mistakes by looking at
|
||||
# our repo's revision, but only if we are in the source tree.
|
||||
# Otherwise, use what configure told us, at the cost of allowing one
|
||||
# or two corner cases in (but otherwise VPATH builds won't work).
|
||||
repo_rev=$OMPI_REPO_REV
|
||||
if test -d .git ; then
|
||||
repo_rev=$(config/opal_get_version.sh VERSION --repo-rev)
|
||||
fi
|
||||
|
||||
#
|
||||
# Update VERSION:repo_rev with the best value we have.
|
||||
#
|
||||
perl -pi -e 's/^repo_rev=.*/repo_rev='$repo_rev'/' -- "${distdir}/VERSION"
|
||||
# need to reset the timestamp to not annoy AM dependencies
|
||||
touch -r "${srcdir}/VERSION" "${distdir}/VERSION"
|
||||
|
||||
echo "*** Updated VERSION file with repo rev: $repo_rev"
|
||||
echo "*** (via dist-hook / config/distscript.sh)"
|
|
@ -0,0 +1,144 @@
|
|||
#!/usr/bin/env perl
|
||||
# Copyright (c) 2006-2016 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# Common symbols cause linking issues on some platforms, including OS X. See
|
||||
# this issue for more background:
|
||||
# https://github.com/open-mpi/ompi/issues/375
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Getopt::Long;
|
||||
use File::Basename qw(basename);
|
||||
|
||||
sub is_whitelisted;
|
||||
|
||||
my $MAX_BRIEF = 10;
|
||||
|
||||
my @orig_argv = @ARGV;
|
||||
my @sym_whitelist = ();
|
||||
|
||||
sub usage {
|
||||
print STDERR <<EOT;
|
||||
Usage: $0 --top_builddir=BUILDDIR --top_srcdir=SRCDIR [--objext=OBJEXT] [--brief] [--full-path]
|
||||
|
||||
Searches for all ".OBJEXT" files in BUILDDIR and checks for the existence of
|
||||
common symbols. Common symbols are problematic for some platforms, including
|
||||
OS X.
|
||||
|
||||
OBJEXT defaults to 'o' if not specified.
|
||||
EOT
|
||||
exit 1;
|
||||
}
|
||||
|
||||
my $all = 0;
|
||||
my $brief = 0;
|
||||
my $objext = 'o';
|
||||
my $top_builddir = '';
|
||||
my $top_srcdir = '';
|
||||
my $print_full_obj_path = 0;
|
||||
GetOptions(
|
||||
"all!" => \$all,
|
||||
"brief!" => \$brief,
|
||||
"full-path!" => \$print_full_obj_path,
|
||||
"objext=s" => \$objext,
|
||||
"top_builddir=s" => \$top_builddir,
|
||||
"top_srcdir=s" => \$top_srcdir,
|
||||
) || usage();
|
||||
|
||||
if (!$top_builddir or !$top_srcdir) {
|
||||
usage();
|
||||
}
|
||||
|
||||
if (0 != system("command -v nm >/dev/null 2>&1")) {
|
||||
print STDERR "NOTE: nm not found, skipping common symbol check\n";
|
||||
# Makefile usage should prefix this command with "-" to ignore this exit status
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# load the common symbol whitelist from files scattered around the codebase
|
||||
#
|
||||
# It would be better to load these into some sort of tree and then have those
|
||||
# whitelists only apply to objects that are found in the same directory or
|
||||
# subdirectories. That way a whitelisted symbol in one component doesn't
|
||||
# "shadow" a symbol that should not be whitelisted in another component. If we
|
||||
# find this is actually a problem in practice then we can write a v2 update.
|
||||
my @wl_files = `find '${top_srcdir}' -name 'common_sym_whitelist.txt'`;
|
||||
foreach my $wl_file (@wl_files) {
|
||||
chomp $wl_file;
|
||||
my @lines = `cat $wl_file`;
|
||||
foreach my $line (@lines) {
|
||||
chomp $line;
|
||||
next if ($line =~ /^\s*#/); # skip comments
|
||||
next if ($line =~ /^\s*$/); # skip blank lines
|
||||
push @sym_whitelist, $line;
|
||||
}
|
||||
}
|
||||
|
||||
my $n = 0;
|
||||
open(FIND, '-|', "find ${top_builddir} -name '*.${objext}'");
|
||||
OBJECT: while (my $obj_line = <FIND>) {
|
||||
my $obj = $obj_line;
|
||||
chomp $obj;
|
||||
|
||||
# This pattern may not be 100% robust for all implementations of nm. If
|
||||
# that turns out to be the case, we can try switching to "nm -P", which is
|
||||
# supposed to activate the "portable" (yet ugly) format. It's also unclear
|
||||
# at this point how common support for "nm -P" is.
|
||||
open(NM, '-|', "nm '${obj}' 2>/dev/null | egrep '\\s[cC]\\s'");
|
||||
SYMBOL: while (my $sym_line = <NM>) {
|
||||
if (!$all and is_whitelisted($sym_line)) {
|
||||
next SYMBOL;
|
||||
}
|
||||
|
||||
if ($n == 0) {
|
||||
print STDERR "WARNING! Common symbols found:\n";
|
||||
}
|
||||
if ($brief and $n == $MAX_BRIEF) {
|
||||
print STDERR "[...]\n";
|
||||
print STDERR "skipping remaining symbols. To see all symbols, run:\n";
|
||||
print STDERR " " . join(" ", ($0, grep {!/--brief/} @orig_argv)) . "\n";
|
||||
last OBJECT;
|
||||
}
|
||||
if ($print_full_obj_path) {
|
||||
print STDERR "$obj: $sym_line";
|
||||
} else {
|
||||
my $obj_basename = basename($obj);
|
||||
printf STDERR "%25s: %s", $obj_basename, $sym_line;
|
||||
}
|
||||
++$n;
|
||||
}
|
||||
close(NM);
|
||||
}
|
||||
close(FIND);
|
||||
|
||||
if ($n > 0) {
|
||||
exit 1;
|
||||
} else {
|
||||
exit 0;
|
||||
}
|
||||
|
||||
sub is_whitelisted {
|
||||
my $line = shift;
|
||||
|
||||
foreach my $wl_sym (@sym_whitelist) {
|
||||
if ($line =~ m/\b_?\Q$wl_sym\E\b/) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
# Look for symbol names ending in one or more underscores and assume they
|
||||
# are "Fortran-shaped". This won't match the hex output from most nm's and
|
||||
# shouldn't match the single characters that indicate symbol type.
|
||||
if ($line =~ m/\b_?[A-Za-z_]+[A-Za-z0-9_]*_+\b/) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,14 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2017 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2020 Cisco Systems, Inc. All rights reserved.
|
||||
|
||||
# Provide a way to override build date for reproducible build results
|
||||
# See https://reproducible-builds.org/ for why this is good.
|
||||
|
||||
# There are several different flavors of date(1) out there.
|
||||
# Try a few different CLI options for date(1) to see which one works.
|
||||
|
||||
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
|
||||
date -u -d "@$SOURCE_DATE_EPOCH" "$@" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "$@" 2>/dev/null || date -u "$@"
|
|
@ -0,0 +1,501 @@
|
|||
#!/bin/sh
|
||||
# install - install a program, script, or datafile
|
||||
|
||||
scriptversion=2013-12-25.23; # UTC
|
||||
|
||||
# This originates from X11R5 (mit/util/scripts/install.sh), which was
|
||||
# later released in X11R6 (xc/config/util/install.sh) with the
|
||||
# following copyright and license.
|
||||
#
|
||||
# Copyright (C) 1994 X Consortium
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to
|
||||
# deal in the Software without restriction, including without limitation the
|
||||
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
# sell copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in
|
||||
# all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
||||
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
|
||||
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
#
|
||||
# Except as contained in this notice, the name of the X Consortium shall not
|
||||
# be used in advertising or otherwise to promote the sale, use or other deal-
|
||||
# ings in this Software without prior written authorization from the X Consor-
|
||||
# tium.
|
||||
#
|
||||
#
|
||||
# FSF changes to this file are in the public domain.
|
||||
#
|
||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
||||
# 'make' implicit rules from creating a file called install from it
|
||||
# when there is no Makefile.
|
||||
#
|
||||
# This script is compatible with the BSD install script, but was written
|
||||
# from scratch.
|
||||
|
||||
tab=' '
|
||||
nl='
|
||||
'
|
||||
IFS=" $tab$nl"
|
||||
|
||||
# Set DOITPROG to "echo" to test this script.
|
||||
|
||||
doit=${DOITPROG-}
|
||||
doit_exec=${doit:-exec}
|
||||
|
||||
# Put in absolute file names if you don't have them in your path;
|
||||
# or use environment vars.
|
||||
|
||||
chgrpprog=${CHGRPPROG-chgrp}
|
||||
chmodprog=${CHMODPROG-chmod}
|
||||
chownprog=${CHOWNPROG-chown}
|
||||
cmpprog=${CMPPROG-cmp}
|
||||
cpprog=${CPPROG-cp}
|
||||
mkdirprog=${MKDIRPROG-mkdir}
|
||||
mvprog=${MVPROG-mv}
|
||||
rmprog=${RMPROG-rm}
|
||||
stripprog=${STRIPPROG-strip}
|
||||
|
||||
posix_mkdir=
|
||||
|
||||
# Desired mode of installed file.
|
||||
mode=0755
|
||||
|
||||
chgrpcmd=
|
||||
chmodcmd=$chmodprog
|
||||
chowncmd=
|
||||
mvcmd=$mvprog
|
||||
rmcmd="$rmprog -f"
|
||||
stripcmd=
|
||||
|
||||
src=
|
||||
dst=
|
||||
dir_arg=
|
||||
dst_arg=
|
||||
|
||||
copy_on_change=false
|
||||
is_target_a_directory=possibly
|
||||
|
||||
usage="\
|
||||
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
|
||||
or: $0 [OPTION]... SRCFILES... DIRECTORY
|
||||
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
|
||||
or: $0 [OPTION]... -d DIRECTORIES...
|
||||
|
||||
In the 1st form, copy SRCFILE to DSTFILE.
|
||||
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
|
||||
In the 4th, create DIRECTORIES.
|
||||
|
||||
Options:
|
||||
--help display this help and exit.
|
||||
--version display version info and exit.
|
||||
|
||||
-c (ignored)
|
||||
-C install only if different (preserve the last data modification time)
|
||||
-d create directories instead of installing files.
|
||||
-g GROUP $chgrpprog installed files to GROUP.
|
||||
-m MODE $chmodprog installed files to MODE.
|
||||
-o USER $chownprog installed files to USER.
|
||||
-s $stripprog installed files.
|
||||
-t DIRECTORY install into DIRECTORY.
|
||||
-T report an error if DSTFILE is a directory.
|
||||
|
||||
Environment variables override the default commands:
|
||||
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
|
||||
RMPROG STRIPPROG
|
||||
"
|
||||
|
||||
while test $# -ne 0; do
|
||||
case $1 in
|
||||
-c) ;;
|
||||
|
||||
-C) copy_on_change=true;;
|
||||
|
||||
-d) dir_arg=true;;
|
||||
|
||||
-g) chgrpcmd="$chgrpprog $2"
|
||||
shift;;
|
||||
|
||||
--help) echo "$usage"; exit $?;;
|
||||
|
||||
-m) mode=$2
|
||||
case $mode in
|
||||
*' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*)
|
||||
echo "$0: invalid mode: $mode" >&2
|
||||
exit 1;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-o) chowncmd="$chownprog $2"
|
||||
shift;;
|
||||
|
||||
-s) stripcmd=$stripprog;;
|
||||
|
||||
-t)
|
||||
is_target_a_directory=always
|
||||
dst_arg=$2
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
shift;;
|
||||
|
||||
-T) is_target_a_directory=never;;
|
||||
|
||||
--version) echo "$0 $scriptversion"; exit $?;;
|
||||
|
||||
--) shift
|
||||
break;;
|
||||
|
||||
-*) echo "$0: invalid option: $1" >&2
|
||||
exit 1;;
|
||||
|
||||
*) break;;
|
||||
esac
|
||||
shift
|
||||
done
|
||||
|
||||
# We allow the use of options -d and -T together, by making -d
|
||||
# take the precedence; this is for compatibility with GNU install.
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
if test -n "$dst_arg"; then
|
||||
echo "$0: target directory not allowed when installing a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
|
||||
# When -d is used, all remaining arguments are directories to create.
|
||||
# When -t is used, the destination is already specified.
|
||||
# Otherwise, the last argument is the destination. Remove it from $@.
|
||||
for arg
|
||||
do
|
||||
if test -n "$dst_arg"; then
|
||||
# $@ is not empty: it contains at least $arg.
|
||||
set fnord "$@" "$dst_arg"
|
||||
shift # fnord
|
||||
fi
|
||||
shift # arg
|
||||
dst_arg=$arg
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $dst_arg in
|
||||
-* | [=\(\)!]) dst_arg=./$dst_arg;;
|
||||
esac
|
||||
done
|
||||
fi
|
||||
|
||||
if test $# -eq 0; then
|
||||
if test -z "$dir_arg"; then
|
||||
echo "$0: no input file specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
# It's OK to call 'install-sh -d' without argument.
|
||||
# This can happen when creating conditional directories.
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
if test $# -gt 1 || test "$is_target_a_directory" = always; then
|
||||
if test ! -d "$dst_arg"; then
|
||||
echo "$0: $dst_arg: Is not a directory." >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -z "$dir_arg"; then
|
||||
do_exit='(exit $ret); exit $ret'
|
||||
trap "ret=129; $do_exit" 1
|
||||
trap "ret=130; $do_exit" 2
|
||||
trap "ret=141; $do_exit" 13
|
||||
trap "ret=143; $do_exit" 15
|
||||
|
||||
# Set umask so as not to create temps with too-generous modes.
|
||||
# However, 'strip' requires both read and write access to temps.
|
||||
case $mode in
|
||||
# Optimize common cases.
|
||||
*644) cp_umask=133;;
|
||||
*755) cp_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw='% 200'
|
||||
fi
|
||||
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
|
||||
*)
|
||||
if test -z "$stripcmd"; then
|
||||
u_plus_rw=
|
||||
else
|
||||
u_plus_rw=,u+rw
|
||||
fi
|
||||
cp_umask=$mode$u_plus_rw;;
|
||||
esac
|
||||
fi
|
||||
|
||||
for src
|
||||
do
|
||||
# Protect names problematic for 'test' and other utilities.
|
||||
case $src in
|
||||
-* | [=\(\)!]) src=./$src;;
|
||||
esac
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
dst=$src
|
||||
dstdir=$dst
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
else
|
||||
|
||||
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
|
||||
# might cause directories to be created, which would be especially bad
|
||||
# if $src (and thus $dsttmp) contains '*'.
|
||||
if test ! -f "$src" && test ! -d "$src"; then
|
||||
echo "$0: $src does not exist." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test -z "$dst_arg"; then
|
||||
echo "$0: no destination specified." >&2
|
||||
exit 1
|
||||
fi
|
||||
dst=$dst_arg
|
||||
|
||||
# If destination is a directory, append the input filename; won't work
|
||||
# if double slashes aren't ignored.
|
||||
if test -d "$dst"; then
|
||||
if test "$is_target_a_directory" = never; then
|
||||
echo "$0: $dst_arg: Is a directory" >&2
|
||||
exit 1
|
||||
fi
|
||||
dstdir=$dst
|
||||
dst=$dstdir/`basename "$src"`
|
||||
dstdir_status=0
|
||||
else
|
||||
dstdir=`dirname "$dst"`
|
||||
test -d "$dstdir"
|
||||
dstdir_status=$?
|
||||
fi
|
||||
fi
|
||||
|
||||
obsolete_mkdir_used=false
|
||||
|
||||
if test $dstdir_status != 0; then
|
||||
case $posix_mkdir in
|
||||
'')
|
||||
# Create intermediate dirs using mode 755 as modified by the umask.
|
||||
# This is like FreeBSD 'install' as of 1997-10-28.
|
||||
umask=`umask`
|
||||
case $stripcmd.$umask in
|
||||
# Optimize common cases.
|
||||
*[2367][2367]) mkdir_umask=$umask;;
|
||||
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
|
||||
|
||||
*[0-7])
|
||||
mkdir_umask=`expr $umask + 22 \
|
||||
- $umask % 100 % 40 + $umask % 20 \
|
||||
- $umask % 10 % 4 + $umask % 2
|
||||
`;;
|
||||
*) mkdir_umask=$umask,go-w;;
|
||||
esac
|
||||
|
||||
# With -d, create the new directory with the user-specified mode.
|
||||
# Otherwise, rely on $mkdir_umask.
|
||||
if test -n "$dir_arg"; then
|
||||
mkdir_mode=-m$mode
|
||||
else
|
||||
mkdir_mode=
|
||||
fi
|
||||
|
||||
posix_mkdir=false
|
||||
case $umask in
|
||||
*[123567][0-7][0-7])
|
||||
# POSIX mkdir -p sets u+wx bits regardless of umask, which
|
||||
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
|
||||
;;
|
||||
*)
|
||||
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
|
||||
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
|
||||
|
||||
if (umask $mkdir_umask &&
|
||||
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
|
||||
then
|
||||
if test -z "$dir_arg" || {
|
||||
# Check for POSIX incompatibilities with -m.
|
||||
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
|
||||
# other-writable bit of parent directory when it shouldn't.
|
||||
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
|
||||
ls_ld_tmpdir=`ls -ld "$tmpdir"`
|
||||
case $ls_ld_tmpdir in
|
||||
d????-?r-*) different_mode=700;;
|
||||
d????-?--*) different_mode=755;;
|
||||
*) false;;
|
||||
esac &&
|
||||
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
|
||||
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
|
||||
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
|
||||
}
|
||||
}
|
||||
then posix_mkdir=:
|
||||
fi
|
||||
rmdir "$tmpdir/d" "$tmpdir"
|
||||
else
|
||||
# Remove any dirs left behind by ancient mkdir implementations.
|
||||
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
|
||||
fi
|
||||
trap '' 0;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
if
|
||||
$posix_mkdir && (
|
||||
umask $mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
|
||||
)
|
||||
then :
|
||||
else
|
||||
|
||||
# The umask is ridiculous, or mkdir does not conform to POSIX,
|
||||
# or it failed possibly due to a race condition. Create the
|
||||
# directory the slow way, step by step, checking for races as we go.
|
||||
|
||||
case $dstdir in
|
||||
/*) prefix='/';;
|
||||
[-=\(\)!]*) prefix='./';;
|
||||
*) prefix='';;
|
||||
esac
|
||||
|
||||
oIFS=$IFS
|
||||
IFS=/
|
||||
set -f
|
||||
set fnord $dstdir
|
||||
shift
|
||||
set +f
|
||||
IFS=$oIFS
|
||||
|
||||
prefixes=
|
||||
|
||||
for d
|
||||
do
|
||||
test X"$d" = X && continue
|
||||
|
||||
prefix=$prefix$d
|
||||
if test -d "$prefix"; then
|
||||
prefixes=
|
||||
else
|
||||
if $posix_mkdir; then
|
||||
(umask=$mkdir_umask &&
|
||||
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
|
||||
# Don't fail if two instances are running concurrently.
|
||||
test -d "$prefix" || exit 1
|
||||
else
|
||||
case $prefix in
|
||||
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
|
||||
*) qprefix=$prefix;;
|
||||
esac
|
||||
prefixes="$prefixes '$qprefix'"
|
||||
fi
|
||||
fi
|
||||
prefix=$prefix/
|
||||
done
|
||||
|
||||
if test -n "$prefixes"; then
|
||||
# Don't fail if two instances are running concurrently.
|
||||
(umask $mkdir_umask &&
|
||||
eval "\$doit_exec \$mkdirprog $prefixes") ||
|
||||
test -d "$dstdir" || exit 1
|
||||
obsolete_mkdir_used=true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$dir_arg"; then
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
|
||||
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
|
||||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
|
||||
else
|
||||
|
||||
# Make a couple of temp file names in the proper directory.
|
||||
dsttmp=$dstdir/_inst.$$_
|
||||
rmtmp=$dstdir/_rm.$$_
|
||||
|
||||
# Trap to clean up those temp files at exit.
|
||||
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
|
||||
|
||||
# Copy the file name to the temp name.
|
||||
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
|
||||
|
||||
# and set any options; do chmod last to preserve setuid bits.
|
||||
#
|
||||
# If any of these fail, we abort the whole thing. If we want to
|
||||
# ignore errors from any of these, just make sure not to ignore
|
||||
# errors from the above "$doit $cpprog $src $dsttmp" command.
|
||||
#
|
||||
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
|
||||
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
|
||||
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
|
||||
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
|
||||
|
||||
# If -C, don't bother to copy if it wouldn't change the file.
|
||||
if $copy_on_change &&
|
||||
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
|
||||
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
|
||||
set -f &&
|
||||
set X $old && old=:$2:$4:$5:$6 &&
|
||||
set X $new && new=:$2:$4:$5:$6 &&
|
||||
set +f &&
|
||||
test "$old" = "$new" &&
|
||||
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
|
||||
then
|
||||
rm -f "$dsttmp"
|
||||
else
|
||||
# Rename the file to the real destination.
|
||||
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
|
||||
|
||||
# The rename failed, perhaps because mv can't rename something else
|
||||
# to itself, or perhaps because mv is so ancient that it does not
|
||||
# support -f.
|
||||
{
|
||||
# Now remove or move aside any old file at destination location.
|
||||
# We try this two ways since rm can't unlink itself on some
|
||||
# systems and the destination file might be busy for other
|
||||
# reasons. In this case, the final cleanup might fail but the new
|
||||
# file should still install successfully.
|
||||
{
|
||||
test ! -f "$dst" ||
|
||||
$doit $rmcmd -f "$dst" 2>/dev/null ||
|
||||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
|
||||
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
|
||||
} ||
|
||||
{ echo "$0: cannot unlink or rename $dst" >&2
|
||||
(exit 1); exit 1
|
||||
}
|
||||
} &&
|
||||
|
||||
# Now rename the file to the real destination.
|
||||
$doit $mvcmd "$dsttmp" "$dst"
|
||||
}
|
||||
fi || exit 1
|
||||
|
||||
trap '' 0
|
||||
fi
|
||||
done
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,18 @@
|
|||
--- config/ltmain.sh
|
||||
+++ config/ltmain.sh
|
||||
@@ -6417,8 +6417,14 @@
|
||||
func_source "$lib"
|
||||
|
||||
# Convert "-framework foo" to "foo.ltframework"
|
||||
+ # and "-pthread" to "-Wl,-pthread" if NAG compiler
|
||||
if test -n "$inherited_linker_flags"; then
|
||||
- tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
|
||||
+ case "$CC" in
|
||||
+ *nagfor*)
|
||||
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g' | $SED 's/-pthread/-Wl,-pthread/g'`;;
|
||||
+ *)
|
||||
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`;;
|
||||
+ esac
|
||||
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
|
||||
case " $new_inherited_linker_flags " in
|
||||
*" $tmp_inherited_linker_flag "*) ;;
|
|
@ -0,0 +1,11 @@
|
|||
--- config/ltmain.sh
|
||||
+++ config/ltmain.sh
|
||||
@@ -4765,7 +4765,7 @@
|
||||
# -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
|
||||
# @file GCC response files
|
||||
-64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
|
||||
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
|
||||
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp|-tp=*)
|
||||
func_quote_for_eval "$arg"
|
||||
arg="$func_quote_for_eval_result"
|
||||
func_append compile_command " $arg"
|
|
@ -0,0 +1,437 @@
|
|||
# Helper functions for option handling. -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 8 ltoptions.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
|
||||
|
||||
|
||||
# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ------------------------------------------
|
||||
m4_define([_LT_MANGLE_OPTION],
|
||||
[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
|
||||
# ---------------------------------------
|
||||
# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
|
||||
# matching handler defined, dispatch to it. Other OPTION-NAMEs are
|
||||
# saved as a flag.
|
||||
m4_define([_LT_SET_OPTION],
|
||||
[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
|
||||
m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
_LT_MANGLE_DEFUN([$1], [$2]),
|
||||
[m4_warning([Unknown $1 option '$2'])])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
|
||||
# ------------------------------------------------------------
|
||||
# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
|
||||
m4_define([_LT_IF_OPTION],
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
|
||||
|
||||
|
||||
# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
|
||||
# -------------------------------------------------------
|
||||
# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
|
||||
# are set.
|
||||
m4_define([_LT_UNLESS_OPTIONS],
|
||||
[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
|
||||
[m4_define([$0_found])])])[]dnl
|
||||
m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
|
||||
])[]dnl
|
||||
])
|
||||
|
||||
|
||||
# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
|
||||
# ----------------------------------------
|
||||
# OPTION-LIST is a space-separated list of Libtool options associated
|
||||
# with MACRO-NAME. If any OPTION has a matching handler declared with
|
||||
# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
|
||||
# the unknown option and exit.
|
||||
m4_defun([_LT_SET_OPTIONS],
|
||||
[# Set options
|
||||
m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
|
||||
[_LT_SET_OPTION([$1], _LT_Option)])
|
||||
|
||||
m4_if([$1],[LT_INIT],[
|
||||
dnl
|
||||
dnl Simply set some default values (i.e off) if boolean options were not
|
||||
dnl specified:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
|
||||
])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
|
||||
])
|
||||
dnl
|
||||
dnl If no reference was made to various pairs of opposing options, then
|
||||
dnl we run the default mode handler for the pair. For example, if neither
|
||||
dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
|
||||
dnl archives by default:
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
|
||||
[_LT_ENABLE_FAST_INSTALL])
|
||||
_LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
|
||||
[_LT_WITH_AIX_SONAME([aix])])
|
||||
])
|
||||
])# _LT_SET_OPTIONS
|
||||
|
||||
|
||||
## --------------------------------- ##
|
||||
## Macros to handle LT_INIT options. ##
|
||||
## --------------------------------- ##
|
||||
|
||||
# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
|
||||
# -----------------------------------------
|
||||
m4_define([_LT_MANGLE_DEFUN],
|
||||
[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
|
||||
|
||||
|
||||
# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
|
||||
# -----------------------------------------------
|
||||
m4_define([LT_OPTION_DEFINE],
|
||||
[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
|
||||
])# LT_OPTION_DEFINE
|
||||
|
||||
|
||||
# dlopen
|
||||
# ------
|
||||
LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_DLOPEN],
|
||||
[_LT_SET_OPTION([LT_INIT], [dlopen])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'dlopen' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
|
||||
|
||||
|
||||
# win32-dll
|
||||
# ---------
|
||||
# Declare package support for building win32 dll's.
|
||||
LT_OPTION_DEFINE([LT_INIT], [win32-dll],
|
||||
[enable_win32_dll=yes
|
||||
|
||||
case $host in
|
||||
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(OBJDUMP, objdump, false)
|
||||
;;
|
||||
esac
|
||||
|
||||
test -z "$AS" && AS=as
|
||||
_LT_DECL([], [AS], [1], [Assembler program])dnl
|
||||
|
||||
test -z "$DLLTOOL" && DLLTOOL=dlltool
|
||||
_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
|
||||
|
||||
test -z "$OBJDUMP" && OBJDUMP=objdump
|
||||
_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
|
||||
])# win32-dll
|
||||
|
||||
AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
|
||||
[AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||
_LT_SET_OPTION([LT_INIT], [win32-dll])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'win32-dll' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
|
||||
|
||||
|
||||
# _LT_ENABLE_SHARED([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-shared flag, and supports the 'shared' and
|
||||
# 'disable-shared' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_SHARED],
|
||||
[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([shared],
|
||||
[AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
|
||||
[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_shared=yes ;;
|
||||
no) enable_shared=no ;;
|
||||
*)
|
||||
enable_shared=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_shared=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
|
||||
|
||||
_LT_DECL([build_libtool_libs], [enable_shared], [0],
|
||||
[Whether or not to build shared libraries])
|
||||
])# _LT_ENABLE_SHARED
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_SHARED],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-shared])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
|
||||
AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_SHARED], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_SHARED], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_STATIC([DEFAULT])
|
||||
# ----------------------------
|
||||
# implement the --enable-static flag, and support the 'static' and
|
||||
# 'disable-static' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_STATIC],
|
||||
[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([static],
|
||||
[AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
|
||||
[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_static=yes ;;
|
||||
no) enable_static=no ;;
|
||||
*)
|
||||
enable_static=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_static=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_static=]_LT_ENABLE_STATIC_DEFAULT)
|
||||
|
||||
_LT_DECL([build_old_libs], [enable_static], [0],
|
||||
[Whether or not to build static libraries])
|
||||
])# _LT_ENABLE_STATIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
|
||||
|
||||
# Old names:
|
||||
AC_DEFUN([AC_ENABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
|
||||
])
|
||||
|
||||
AC_DEFUN([AC_DISABLE_STATIC],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-static])
|
||||
])
|
||||
|
||||
AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
|
||||
AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AM_ENABLE_STATIC], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_STATIC], [])
|
||||
|
||||
|
||||
|
||||
# _LT_ENABLE_FAST_INSTALL([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --enable-fast-install flag, and support the 'fast-install'
|
||||
# and 'disable-fast-install' LT_INIT options.
|
||||
# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'.
|
||||
m4_define([_LT_ENABLE_FAST_INSTALL],
|
||||
[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
|
||||
AC_ARG_ENABLE([fast-install],
|
||||
[AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
|
||||
[optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
|
||||
[p=${PACKAGE-default}
|
||||
case $enableval in
|
||||
yes) enable_fast_install=yes ;;
|
||||
no) enable_fast_install=no ;;
|
||||
*)
|
||||
enable_fast_install=no
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for pkg in $enableval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$pkg" = "X$p"; then
|
||||
enable_fast_install=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
|
||||
|
||||
_LT_DECL([fast_install], [enable_fast_install], [0],
|
||||
[Whether or not to optimize for fast installation])dnl
|
||||
])# _LT_ENABLE_FAST_INSTALL
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
|
||||
|
||||
# Old names:
|
||||
AU_DEFUN([AC_ENABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
AU_DEFUN([AC_DISABLE_FAST_INSTALL],
|
||||
[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you put
|
||||
the 'disable-fast-install' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
|
||||
dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
|
||||
|
||||
|
||||
# _LT_WITH_AIX_SONAME([DEFAULT])
|
||||
# ----------------------------------
|
||||
# implement the --with-aix-soname flag, and support the `aix-soname=aix'
|
||||
# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
|
||||
# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'.
|
||||
m4_define([_LT_WITH_AIX_SONAME],
|
||||
[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
|
||||
shared_archive_member_spec=
|
||||
case $host,$enable_shared in
|
||||
power*-*-aix[[5-9]]*,yes)
|
||||
AC_MSG_CHECKING([which variant of shared library versioning to provide])
|
||||
AC_ARG_WITH([aix-soname],
|
||||
[AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
|
||||
[shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
|
||||
[case $withval in
|
||||
aix|svr4|both)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([Unknown argument to --with-aix-soname])
|
||||
;;
|
||||
esac
|
||||
lt_cv_with_aix_soname=$with_aix_soname],
|
||||
[AC_CACHE_VAL([lt_cv_with_aix_soname],
|
||||
[lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
|
||||
with_aix_soname=$lt_cv_with_aix_soname])
|
||||
AC_MSG_RESULT([$with_aix_soname])
|
||||
if test aix != "$with_aix_soname"; then
|
||||
# For the AIX way of multilib, we name the shared archive member
|
||||
# based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
|
||||
# and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
|
||||
# Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
|
||||
# the AIX toolchain works better with OBJECT_MODE set (default 32).
|
||||
if test 64 = "${OBJECT_MODE-32}"; then
|
||||
shared_archive_member_spec=shr_64
|
||||
else
|
||||
shared_archive_member_spec=shr
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
with_aix_soname=aix
|
||||
;;
|
||||
esac
|
||||
|
||||
_LT_DECL([], [shared_archive_member_spec], [0],
|
||||
[Shared archive member basename, for filename based shared library versioning on AIX])dnl
|
||||
])# _LT_WITH_AIX_SONAME
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
|
||||
|
||||
|
||||
# _LT_WITH_PIC([MODE])
|
||||
# --------------------
|
||||
# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
|
||||
# LT_INIT options.
|
||||
# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'.
|
||||
m4_define([_LT_WITH_PIC],
|
||||
[AC_ARG_WITH([pic],
|
||||
[AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
|
||||
[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
|
||||
[lt_p=${PACKAGE-default}
|
||||
case $withval in
|
||||
yes|no) pic_mode=$withval ;;
|
||||
*)
|
||||
pic_mode=default
|
||||
# Look at the argument we got. We use all the common list separators.
|
||||
lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
|
||||
for lt_pkg in $withval; do
|
||||
IFS=$lt_save_ifs
|
||||
if test "X$lt_pkg" = "X$lt_p"; then
|
||||
pic_mode=yes
|
||||
fi
|
||||
done
|
||||
IFS=$lt_save_ifs
|
||||
;;
|
||||
esac],
|
||||
[pic_mode=m4_default([$1], [default])])
|
||||
|
||||
_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
|
||||
])# _LT_WITH_PIC
|
||||
|
||||
LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
|
||||
LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
|
||||
|
||||
# Old name:
|
||||
AU_DEFUN([AC_LIBTOOL_PICMODE],
|
||||
[_LT_SET_OPTION([LT_INIT], [pic-only])
|
||||
AC_DIAGNOSE([obsolete],
|
||||
[$0: Remove this warning and the call to _LT_SET_OPTION when you
|
||||
put the 'pic-only' option into LT_INIT's first parameter.])
|
||||
])
|
||||
|
||||
dnl aclocal-1.4 backwards compatibility:
|
||||
dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
|
||||
|
||||
## ----------------- ##
|
||||
## LTDL_INIT Options ##
|
||||
## ----------------- ##
|
||||
|
||||
m4_define([_LTDL_MODE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
|
||||
[m4_define([_LTDL_MODE], [nonrecursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [recursive],
|
||||
[m4_define([_LTDL_MODE], [recursive])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [subproject],
|
||||
[m4_define([_LTDL_MODE], [subproject])])
|
||||
|
||||
m4_define([_LTDL_TYPE], [])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [installable],
|
||||
[m4_define([_LTDL_TYPE], [installable])])
|
||||
LT_OPTION_DEFINE([LTDL_INIT], [convenience],
|
||||
[m4_define([_LTDL_TYPE], [convenience])])
|
|
@ -0,0 +1,124 @@
|
|||
# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Gary V. Vaughan, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 6 ltsugar.m4
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
|
||||
|
||||
|
||||
# lt_join(SEP, ARG1, [ARG2...])
|
||||
# -----------------------------
|
||||
# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
|
||||
# associated separator.
|
||||
# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
|
||||
# versions in m4sugar had bugs.
|
||||
m4_define([lt_join],
|
||||
[m4_if([$#], [1], [],
|
||||
[$#], [2], [[$2]],
|
||||
[m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
m4_define([_lt_join],
|
||||
[m4_if([$#$2], [2], [],
|
||||
[m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
|
||||
|
||||
|
||||
# lt_car(LIST)
|
||||
# lt_cdr(LIST)
|
||||
# ------------
|
||||
# Manipulate m4 lists.
|
||||
# These macros are necessary as long as will still need to support
|
||||
# Autoconf-2.59, which quotes differently.
|
||||
m4_define([lt_car], [[$1]])
|
||||
m4_define([lt_cdr],
|
||||
[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
|
||||
[$#], 1, [],
|
||||
[m4_dquote(m4_shift($@))])])
|
||||
m4_define([lt_unquote], $1)
|
||||
|
||||
|
||||
# lt_append(MACRO-NAME, STRING, [SEPARATOR])
|
||||
# ------------------------------------------
|
||||
# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
|
||||
# Note that neither SEPARATOR nor STRING are expanded; they are appended
|
||||
# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
|
||||
# No SEPARATOR is output if MACRO-NAME was previously undefined (different
|
||||
# than defined and empty).
|
||||
#
|
||||
# This macro is needed until we can rely on Autoconf 2.62, since earlier
|
||||
# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
|
||||
m4_define([lt_append],
|
||||
[m4_define([$1],
|
||||
m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
|
||||
|
||||
|
||||
|
||||
# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
|
||||
# ----------------------------------------------------------
|
||||
# Produce a SEP delimited list of all paired combinations of elements of
|
||||
# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
|
||||
# has the form PREFIXmINFIXSUFFIXn.
|
||||
# Needed until we can rely on m4_combine added in Autoconf 2.62.
|
||||
m4_define([lt_combine],
|
||||
[m4_if(m4_eval([$# > 3]), [1],
|
||||
[m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
|
||||
[[m4_foreach([_Lt_prefix], [$2],
|
||||
[m4_foreach([_Lt_suffix],
|
||||
]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
|
||||
[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
|
||||
|
||||
|
||||
# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
|
||||
# -----------------------------------------------------------------------
|
||||
# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
|
||||
# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
|
||||
m4_define([lt_if_append_uniq],
|
||||
[m4_ifdef([$1],
|
||||
[m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
|
||||
[lt_append([$1], [$2], [$3])$4],
|
||||
[$5])],
|
||||
[lt_append([$1], [$2], [$3])$4])])
|
||||
|
||||
|
||||
# lt_dict_add(DICT, KEY, VALUE)
|
||||
# -----------------------------
|
||||
m4_define([lt_dict_add],
|
||||
[m4_define([$1($2)], [$3])])
|
||||
|
||||
|
||||
# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
|
||||
# --------------------------------------------
|
||||
m4_define([lt_dict_add_subkey],
|
||||
[m4_define([$1($2:$3)], [$4])])
|
||||
|
||||
|
||||
# lt_dict_fetch(DICT, KEY, [SUBKEY])
|
||||
# ----------------------------------
|
||||
m4_define([lt_dict_fetch],
|
||||
[m4_ifval([$3],
|
||||
m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
|
||||
m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
|
||||
|
||||
|
||||
# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
|
||||
# -----------------------------------------------------------------
|
||||
m4_define([lt_if_dict_fetch],
|
||||
[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
|
||||
[$5],
|
||||
[$6])])
|
||||
|
||||
|
||||
# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
|
||||
# --------------------------------------------------------------
|
||||
m4_define([lt_dict_filter],
|
||||
[m4_if([$5], [], [],
|
||||
[lt_join(m4_quote(m4_default([$4], [[, ]])),
|
||||
lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
|
||||
[lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
|
||||
])
|
|
@ -0,0 +1,23 @@
|
|||
# ltversion.m4 -- version numbers -*- Autoconf -*-
|
||||
#
|
||||
# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# @configure_input@
|
||||
|
||||
# serial 4179 ltversion.m4
|
||||
# This file is part of GNU Libtool
|
||||
|
||||
m4_define([LT_PACKAGE_VERSION], [2.4.6])
|
||||
m4_define([LT_PACKAGE_REVISION], [2.4.6])
|
||||
|
||||
AC_DEFUN([LTVERSION_VERSION],
|
||||
[macro_version='2.4.6'
|
||||
macro_revision='2.4.6'
|
||||
_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
|
||||
_LT_DECL(, macro_revision, 0)
|
||||
])
|
|
@ -0,0 +1,99 @@
|
|||
# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
|
||||
#
|
||||
# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software
|
||||
# Foundation, Inc.
|
||||
# Written by Scott James Remnant, 2004.
|
||||
#
|
||||
# This file is free software; the Free Software Foundation gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
|
||||
# serial 5 lt~obsolete.m4
|
||||
|
||||
# These exist entirely to fool aclocal when bootstrapping libtool.
|
||||
#
|
||||
# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
|
||||
# which have later been changed to m4_define as they aren't part of the
|
||||
# exported API, or moved to Autoconf or Automake where they belong.
|
||||
#
|
||||
# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
|
||||
# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
|
||||
# using a macro with the same name in our local m4/libtool.m4 it'll
|
||||
# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
|
||||
# and doesn't know about Autoconf macros at all.)
|
||||
#
|
||||
# So we provide this file, which has a silly filename so it's always
|
||||
# included after everything else. This provides aclocal with the
|
||||
# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
|
||||
# because those macros already exist, or will be overwritten later.
|
||||
# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
|
||||
#
|
||||
# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
|
||||
# Yes, that means every name once taken will need to remain here until
|
||||
# we give up compatibility with versions before 1.7, at which point
|
||||
# we need to keep only those names which we still refer to.
|
||||
|
||||
# This is to help aclocal find these macros, as it can't see m4_define.
|
||||
AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
|
||||
|
||||
m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
|
||||
m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
|
||||
m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
|
||||
m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
|
||||
m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
|
||||
m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
|
||||
m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
|
||||
m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
|
||||
m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
|
||||
m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
|
||||
m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
|
||||
m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
|
||||
m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
|
||||
m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
|
||||
m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
|
||||
m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
|
||||
m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
|
||||
m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
|
||||
m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
|
||||
m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
|
||||
m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
|
||||
m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
|
||||
m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
|
||||
m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
|
||||
m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
|
||||
m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
|
||||
m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
|
||||
m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
|
||||
m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
|
||||
m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
|
||||
m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
|
||||
m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
|
||||
m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
|
||||
m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
|
||||
m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
|
||||
m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])])
|
||||
m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
|
||||
m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
|
||||
m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])])
|
||||
m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])])
|
||||
m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])])
|
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/env perl
|
||||
#
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2015 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Subroutine to generate a bunch of Fortran declarations and symbols
|
||||
#
|
||||
|
||||
use strict;
|
||||
|
||||
use Getopt::Long;
|
||||
|
||||
my $package_name;
|
||||
my $package_version;
|
||||
my $ompi_date;
|
||||
my $opal_date;
|
||||
my $orte_date;
|
||||
my $cxx = '1';
|
||||
my $fortran = '1';
|
||||
my $f08 = '1';
|
||||
my $input;
|
||||
my $output;
|
||||
my $help_arg = 0;
|
||||
|
||||
&Getopt::Long::Configure("bundling");
|
||||
my $ok = Getopt::Long::GetOptions("package-name=s" => \$package_name,
|
||||
"package-version=s" => \$package_version,
|
||||
"ompi-date=s" => \$ompi_date,
|
||||
"opal-date=s" => \$opal_date,
|
||||
"orte-date=s" => \$orte_date,
|
||||
"cxx!" => \$cxx,
|
||||
"fortran!" => \$fortran,
|
||||
"f08!" => \$f08,
|
||||
"input=s" => \$input,
|
||||
"output=s" => \$output);
|
||||
|
||||
if ($help_arg || !$ok ||
|
||||
!defined($input) ||
|
||||
!defined($output) ||
|
||||
!defined($package_name) ||
|
||||
!defined($package_version) ||
|
||||
!defined($ompi_date) ||
|
||||
!defined($opal_date) ||
|
||||
!defined($orte_date)) {
|
||||
print "Usage: $0 --package-name=<package name> --package-version=<package version> --ompi-date=<ompi date> --opal-date=<opal date> --orte-date=<orte date> --input=<input file> --output=<output file> [--nocxx] [ --nofortran] [--nof08]\n";
|
||||
exit(1 - $ok);
|
||||
}
|
||||
|
||||
open(FILE, $input) ||
|
||||
die "Can't open $input";
|
||||
my $file;
|
||||
$file .= $_
|
||||
while(<FILE>);
|
||||
close(FILE);
|
||||
|
||||
$file =~ s/#PACKAGE_NAME#/$package_name/g;
|
||||
$file =~ s/#PACKAGE_VERSION#/$package_version/g;
|
||||
$file =~ s/#OMPI_DATE#/$ompi_date/g;
|
||||
$file =~ s/#OPAL_DATE#/$opal_date/g;
|
||||
$file =~ s/#ORTE_DATE#/$orte_date/g;
|
||||
|
||||
if ($cxx == 0) {
|
||||
$file =~ s/\n\.SH C\+\+ Syntax.+?\n\.SH/\n\.SH/s;
|
||||
}
|
||||
|
||||
if ($fortran == 0) {
|
||||
$file =~ s/\n\.SH Fortran Syntax.+?\n\.SH/\n\.SH/s;
|
||||
}
|
||||
|
||||
if ($f08 == 0) {
|
||||
$file =~ s/\n\.SH Fortran 2008 Syntax.+?\n\.SH/\n\.SH/s;
|
||||
}
|
||||
|
||||
open(FILE, ">$output") ||
|
||||
die "Can't open $output";
|
||||
print FILE $file;
|
||||
close(FILE);
|
||||
|
||||
exit(0);
|
||||
|
|
@ -0,0 +1,215 @@
|
|||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # UTC
|
||||
|
||||
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# As a special exception to the GNU General Public License, if you
|
||||
# distribute this file as part of a program that contains a
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
if test $# -eq 0; then
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
|
||||
--is-lightweight)
|
||||
# Used by our autoconf macros to check whether the available missing
|
||||
# script is modern enough.
|
||||
exit 0
|
||||
;;
|
||||
|
||||
--run)
|
||||
# Back-compat with the calling convention used by older automake.
|
||||
shift
|
||||
;;
|
||||
|
||||
-h|--h|--he|--hel|--help)
|
||||
echo "\
|
||||
$0 [OPTION]... PROGRAM [ARGUMENT]...
|
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
|
||||
to PROGRAM being missing or too old.
|
||||
|
||||
Options:
|
||||
-h, --help display this help and exit
|
||||
-v, --version output version information and exit
|
||||
|
||||
Supported PROGRAM values:
|
||||
aclocal autoconf autoheader autom4te automake makeinfo
|
||||
bison yacc flex lex help2man
|
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
|
||||
'g' are ignored when checking the name.
|
||||
|
||||
Send bug reports to <bug-automake@gnu.org>."
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version)
|
||||
echo "missing $scriptversion (GNU Automake)"
|
||||
exit $?
|
||||
;;
|
||||
|
||||
-*)
|
||||
echo 1>&2 "$0: unknown '$1' option"
|
||||
echo 1>&2 "Try '$0 --help' for more information"
|
||||
exit 1
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
# Run the given program, remember its exit status.
|
||||
"$@"; st=$?
|
||||
|
||||
# If it succeeded, we are done.
|
||||
test $st -eq 0 && exit 0
|
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was
|
||||
# passed; such an option is passed most likely to detect whether the
|
||||
# program is present and works.
|
||||
case $2 in --version|--help) exit $st;; esac
|
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user
|
||||
# tries to use an ancient version of a tool on a file that requires a
|
||||
# minimum version.
|
||||
if test $st -eq 63; then
|
||||
msg="probably too old"
|
||||
elif test $st -eq 127; then
|
||||
# Program was missing.
|
||||
msg="missing on your system"
|
||||
else
|
||||
# Program was found and executed, but failed. Give up.
|
||||
exit $st
|
||||
fi
|
||||
|
||||
perl_URL=http://www.perl.org/
|
||||
flex_URL=http://flex.sourceforge.net/
|
||||
gnu_software_URL=http://www.gnu.org/software
|
||||
|
||||
program_details ()
|
||||
{
|
||||
case $1 in
|
||||
aclocal|automake)
|
||||
echo "The '$1' program is part of the GNU Automake package:"
|
||||
echo "<$gnu_software_URL/automake>"
|
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/autoconf>"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
autoconf|autom4te|autoheader)
|
||||
echo "The '$1' program is part of the GNU Autoconf package:"
|
||||
echo "<$gnu_software_URL/autoconf/>"
|
||||
echo "It also requires GNU m4 and Perl in order to run:"
|
||||
echo "<$gnu_software_URL/m4/>"
|
||||
echo "<$perl_URL>"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice ()
|
||||
{
|
||||
# Normalize program name to check for.
|
||||
normalized_program=`echo "$1" | sed '
|
||||
s/^gnu-//; t
|
||||
s/^gnu//; t
|
||||
s/^g//; t'`
|
||||
|
||||
printf '%s\n' "'$1' is $msg."
|
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
|
||||
case $normalized_program in
|
||||
autoconf*)
|
||||
echo "You should only need it if you modified 'configure.ac',"
|
||||
echo "or m4 files included by it."
|
||||
program_details 'autoconf'
|
||||
;;
|
||||
autoheader*)
|
||||
echo "You should only need it if you modified 'acconfig.h' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'autoheader'
|
||||
;;
|
||||
automake*)
|
||||
echo "You should only need it if you modified 'Makefile.am' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'automake'
|
||||
;;
|
||||
aclocal*)
|
||||
echo "You should only need it if you modified 'acinclude.m4' or"
|
||||
echo "$configure_deps."
|
||||
program_details 'aclocal'
|
||||
;;
|
||||
autom4te*)
|
||||
echo "You might have modified some maintainer files that require"
|
||||
echo "the 'autom4te' program to be rebuilt."
|
||||
program_details 'autom4te'
|
||||
;;
|
||||
bison*|yacc*)
|
||||
echo "You should only need it if you modified a '.y' file."
|
||||
echo "You may want to install the GNU Bison package:"
|
||||
echo "<$gnu_software_URL/bison/>"
|
||||
;;
|
||||
lex*|flex*)
|
||||
echo "You should only need it if you modified a '.l' file."
|
||||
echo "You may want to install the Fast Lexical Analyzer package:"
|
||||
echo "<$flex_URL>"
|
||||
;;
|
||||
help2man*)
|
||||
echo "You should only need it if you modified a dependency" \
|
||||
"of a man page."
|
||||
echo "You may want to install the GNU Help2man package:"
|
||||
echo "<$gnu_software_URL/help2man/>"
|
||||
;;
|
||||
makeinfo*)
|
||||
echo "You should only need it if you modified a '.texi' file, or"
|
||||
echo "any other file indirectly affecting the aspect of the manual."
|
||||
echo "You might want to install the Texinfo package:"
|
||||
echo "<$gnu_software_URL/texinfo/>"
|
||||
echo "The spurious makeinfo call might also be the consequence of"
|
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
|
||||
echo "want to install GNU make:"
|
||||
echo "<$gnu_software_URL/make/>"
|
||||
;;
|
||||
*)
|
||||
echo "You might have modified some files without having the proper"
|
||||
echo "tools for further handling them. Check the 'README' file, it"
|
||||
echo "often tells you about the needed prerequisites for installing"
|
||||
echo "this package. You may also peek at any GNU archive site, in"
|
||||
echo "case some other package contains this missing '$1' program."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \
|
||||
-e '2,$s/^/ /' >&2
|
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program
|
||||
# not found, 63 for a program that failed due to version mismatch).
|
||||
exit $st
|
||||
|
||||
# Local variables:
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
|
@ -0,0 +1,69 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2018 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2018 University of Houston. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_GPFS(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if GPFS support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_GPFS],[
|
||||
|
||||
check_gpfs_CPPFLAGS=
|
||||
check_gpfs_LDFLAGS=
|
||||
check_gpfs_LIBS=
|
||||
|
||||
check_gpfs_save_LIBS="$LIBS"
|
||||
check_gpfs_save_LDFLAGS="$LDFLAGS"
|
||||
check_gpfs_save_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
check_gpfs_configuration="none"
|
||||
ompi_check_gpfs_happy="yes"
|
||||
|
||||
# Get some configuration information
|
||||
AC_ARG_WITH([gpfs],
|
||||
[AC_HELP_STRING([--with-gpfs(=DIR)],
|
||||
[Build Gpfs support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([gpfs], [$with_gpfs], [include/gpfs.h])
|
||||
|
||||
AS_IF([test "$with_gpfs" = "no"],
|
||||
[ompi_check_gpfs_happy="no"],
|
||||
[AS_IF([test -z "$with_gpfs" || test "$with_gpfs" = "yes"],
|
||||
[ompi_check_gpfs_dir="/usr"],
|
||||
[ompi_check_gpfs_dir=$with_gpfs])
|
||||
|
||||
if test -e "$ompi_check_gpfs_dir/lib64" ; then
|
||||
ompi_check_gpfs_libdir="$ompi_check_gpfs_dir/lib64"
|
||||
else
|
||||
ompi_check_gpfs_libdir="$ompi_check_gpfs_dir/lib"
|
||||
fi
|
||||
|
||||
# Add correct -I and -L flags
|
||||
OPAL_CHECK_PACKAGE([$1], [gpfs.h], [gpfs], [gpfs_lib_init],
|
||||
[], [$ompi_check_gpfs_dir], [$ompi_check_gpfs_libdir],
|
||||
[ompi_check_gpfs_happy="yes"],
|
||||
[ompi_check_gpfs_happy="no"])
|
||||
])
|
||||
|
||||
AS_IF([test "$ompi_check_gpfs_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test ! -z "$with_gpfs" && test "$with_gpfs" != "no"],
|
||||
[AC_MSG_ERROR([GPFS support requested but not found. Aborting])])
|
||||
$3])
|
||||
])
|
|
@ -0,0 +1,62 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2018 DataDirect Networks. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_IME(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if IME support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_IME],[
|
||||
|
||||
check_ime_CPPFLAGS=
|
||||
check_ime_LDFLAGS=
|
||||
check_ime_LIBS=
|
||||
|
||||
check_ime_configuration="none"
|
||||
ompi_check_ime_happy="yes"
|
||||
|
||||
|
||||
# Get some configuration information
|
||||
AC_ARG_WITH([ime],
|
||||
[AC_HELP_STRING([--with-ime(=DIR)],
|
||||
[Build IME support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([ime], [$with_ime], [include/ime_native.h])
|
||||
|
||||
AS_IF([test "$with_ime" = "no"],
|
||||
[ompi_check_ime_happy="no"],
|
||||
[AS_IF([test -z "$with_ime"],
|
||||
[ompi_check_ime_dir="/usr/local"],
|
||||
[ompi_check_ime_dir=$with_ime])
|
||||
|
||||
if test -e "$ompi_check_ime_dir/lib64" ; then
|
||||
ompi_check_ime_libdir="$ompi_check_ime_dir/lib64"
|
||||
else
|
||||
ompi_check_ime_libdir="$ompi_check_ime_dir/lib"
|
||||
fi
|
||||
|
||||
# Add correct -I and -L flags
|
||||
OPAL_CHECK_PACKAGE([$1], [ime_native.h], [im_client], [ime_client_native2_init], [],
|
||||
[$ompi_check_ime_dir], [$ompi_check_ime_libdir],
|
||||
[ompi_check_ime_happy="yes"],
|
||||
[OPAL_CHECK_PACKAGE([$1], [ime_native.h], [im_client], [ime_native_init], [],
|
||||
[$ompi_check_ime_dir], [$ompi_check_ime_libdir],
|
||||
[ompi_check_ime_happy="yes"],
|
||||
[ompi_check_ime_happy="no"])
|
||||
])
|
||||
])
|
||||
|
||||
AS_IF([test "$ompi_check_ime_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test ! -z "$with_ime" && test "$with_ime" != "no"],
|
||||
[echo IME support not found])
|
||||
$3])
|
||||
|
||||
])
|
||||
|
|
@ -0,0 +1,70 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2011 Mellanox Technologies. All rights reserved.
|
||||
dnl Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_FCA(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if fca support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_FCA],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_check_fca_libs ompi_check_fca_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
|
||||
|
||||
AC_ARG_WITH([fca],
|
||||
[AC_HELP_STRING([--with-fca(=DIR)],
|
||||
[Build fca (Mellanox Fabric Collective Accelerator) support, optionally adding
|
||||
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
|
||||
|
||||
AS_IF([test "$with_fca" != "no"],
|
||||
[ompi_check_fca_libs=fca
|
||||
AS_IF([test ! -z "$with_fca" && test "$with_fca" != "yes"],
|
||||
[ompi_check_fca_dir=$with_fca
|
||||
AC_SUBST([coll_fca_HOME], "$ompi_check_fca_dir")],
|
||||
[AC_SUBST([coll_fca_HOME], "/")])
|
||||
|
||||
CPPFLAGS_save=$CPPFLAGS
|
||||
LDFLAGS_save=$LDFLAGS
|
||||
LIBS_save=$LIBS
|
||||
|
||||
|
||||
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
|
||||
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
|
||||
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[fca/fca_api.h],
|
||||
[$ompi_check_fca_libs],
|
||||
[fca_get_version],
|
||||
[],
|
||||
[$ompi_check_fca_dir],
|
||||
[],
|
||||
[ompi_check_fca_happy="yes"],
|
||||
[ompi_check_fca_happy="no"])
|
||||
|
||||
CPPFLAGS=$CPPFLAGS_save
|
||||
LDFLAGS=$LDFLAGS_save
|
||||
LIBS=$LIBS_save],
|
||||
[ompi_check_fca_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_fca_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([fca driver does not currently support progress threads. Disabling FCA.])
|
||||
ompi_check_fca_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_fca_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test ! -z "$with_fca" && test "$with_fca" != "no"],
|
||||
[AC_MSG_ERROR([FCA support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2011 Mellanox Technologies. All rights reserved.
|
||||
dnl Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_HCOLL(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if hcoll support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_HCOLL],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_check_hcoll_dir ompi_check_hcoll_libs ompi_check_hcoll_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
|
||||
|
||||
AC_ARG_WITH([hcoll],
|
||||
[AC_HELP_STRING([--with-hcoll(=DIR)],
|
||||
[Build hcoll (Mellanox Hierarchical Collectives) support, optionally adding
|
||||
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
|
||||
|
||||
AS_IF([test "$with_hcoll" != "no"],
|
||||
[ompi_check_hcoll_libs=hcoll
|
||||
AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "yes"],
|
||||
[ompi_check_hcoll_dir=$with_hcoll])
|
||||
|
||||
CPPFLAGS_save=$CPPFLAGS
|
||||
LDFLAGS_save=$LDFLAGS
|
||||
LIBS_save=$LIBS
|
||||
|
||||
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
|
||||
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
|
||||
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[hcoll/api/hcoll_api.h],
|
||||
[$ompi_check_hcoll_libs],
|
||||
[hcoll_get_version],
|
||||
[],
|
||||
[$ompi_check_hcoll_dir],
|
||||
[],
|
||||
[ompi_check_hcoll_happy="yes"],
|
||||
[ompi_check_hcoll_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_hcoll_happy" = "yes"],
|
||||
[
|
||||
CPPFLAGS=$coll_hcoll_CPPFLAGS
|
||||
LDFLAGS=$coll_hcoll_LDFLAGS
|
||||
LIBS=$coll_hcoll_LIBS
|
||||
AC_CHECK_FUNCS(hcoll_context_free, [], [])
|
||||
],
|
||||
[])
|
||||
|
||||
CPPFLAGS=$CPPFLAGS_save
|
||||
LDFLAGS=$LDFLAGS_save
|
||||
LIBS=$LIBS_save],
|
||||
[ompi_check_hcoll_happy=no])
|
||||
|
||||
AS_IF([test "$ompi_check_hcoll_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([hcoll driver does not currently support progress threads. Disabling HCOLL.])
|
||||
ompi_check_hcoll_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_hcoll_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test ! -z "$with_hcoll" && test "$with_hcoll" != "no"],
|
||||
[AC_MSG_ERROR([HCOLL support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
|
@ -0,0 +1,98 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
|
||||
dnl Copyright (c) 2008-2018 University of Houston. All rights reserved.
|
||||
dnl Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2020 Triad National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_LUSTRE(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if LUSTRE support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_LUSTRE],[
|
||||
|
||||
check_lustre_CPPFLAGS=
|
||||
check_lustre_LDFLAGS=
|
||||
check_lustre_LIBS=
|
||||
|
||||
check_lustre_save_LIBS="$LIBS"
|
||||
check_lustre_save_LDFLAGS="$LDFLAGS"
|
||||
check_lustre_save_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
ompi_check_lustre_happy="yes"
|
||||
|
||||
# Get some configuration information
|
||||
AC_ARG_WITH([lustre],
|
||||
[AC_HELP_STRING([--with-lustre(=DIR)],
|
||||
[Build Lustre support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([lustre], [$with_lustre], [include/lustre/lustreapi.h])
|
||||
|
||||
AS_IF([test "$with_lustre" = "no"],
|
||||
[ompi_check_lustre_happy=no])
|
||||
|
||||
AS_IF([test "$ompi_check_lustre_happy" != "no" ],
|
||||
[AC_MSG_CHECKING([looking for lustre libraries and header files in])
|
||||
AS_IF([test "$with_lustre" != "yes"],
|
||||
[ompi_check_lustre_dir=$with_lustre
|
||||
AC_MSG_RESULT([($ompi_check_lustre_dir)])],
|
||||
[AC_MSG_RESULT([(default search paths)])])
|
||||
AS_IF([test -n "$with_lustre_libdir" && \
|
||||
test "$with_lustre_libdir" != "yes"],
|
||||
[ompi_check_lustre_libdir=$with_lustre_libdir])
|
||||
])
|
||||
|
||||
AS_IF([test "$ompi_check_lustre_happy" != "no" ],
|
||||
[OPAL_CHECK_PACKAGE([$1], [lustre/lustreapi.h], [lustreapi], [llapi_file_create],
|
||||
[], [$ompi_check_lustre_dir], [$ompi_check_lustre_libdir],
|
||||
[ompi_check_lustre_happy="yes"],
|
||||
[ompi_check_lustre_happy="no"])])
|
||||
|
||||
AS_IF([test "$ompi_check_lustre_happy" = "yes"],
|
||||
[AC_MSG_CHECKING([for required lustre data structures])
|
||||
cat > conftest.c <<EOF
|
||||
#include "lustre/lustreapi.h"
|
||||
void alloc_lum()
|
||||
{
|
||||
int v1, v3;
|
||||
v1 = sizeof(struct lov_user_md_v1) +
|
||||
LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1);
|
||||
v3 = sizeof(struct lov_user_md_v3) +
|
||||
LOV_MAX_STRIPE_COUNT * sizeof(struct lov_user_ost_data_v1);
|
||||
}
|
||||
EOF
|
||||
|
||||
# Try the compile
|
||||
OPAL_LOG_COMMAND(
|
||||
[$CC $CFLAGS -I$ompi_check_lustre_dir/include -c conftest.c],
|
||||
[ompi_check_lustre_struct_happy="yes"],
|
||||
[ompi_check_lustre_struct_happy="no"
|
||||
ompi_check_lustre_happy="no"]
|
||||
)
|
||||
rm -f conftest.c conftest.o
|
||||
AC_MSG_RESULT([$ompi_check_lustre_struct_happy])])
|
||||
|
||||
AS_IF([test "$ompi_check_lustre_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test -n "$with_lustre" && test "$with_lustre" != "no"],
|
||||
[AC_MSG_ERROR([Lustre support requested but not found. Aborting])])
|
||||
$3])
|
||||
])
|
|
@ -0,0 +1,94 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2001-2011 Mellanox Technologies Ltd. ALL RIGHTS RESERVED.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_MXM(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if MXM support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_MXM],[
|
||||
if test -z "$ompi_check_mxm_happy" ; then
|
||||
AC_ARG_WITH([mxm],
|
||||
[AC_HELP_STRING([--with-mxm(=DIR)],
|
||||
[Build Mellanox Messaging support, optionally adding
|
||||
DIR/include and DIR/lib or DIR/lib64 to the search path for headers and libraries])])
|
||||
AC_ARG_WITH([mxm-libdir],
|
||||
[AC_HELP_STRING([--with-mxm-libdir=DIR],
|
||||
[Search for Mellanox MXM libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([mxm-libdir], [$with_mxm_libdir], [libmxm.*])
|
||||
|
||||
ompi_check_mxm_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_mxm_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_mxm_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_mxm" != "no"],
|
||||
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "yes"],
|
||||
[
|
||||
ompi_check_mxm_dir="$with_mxm"
|
||||
])
|
||||
AS_IF([test ! -z "$with_mxm_libdir" && test "$with_mxm_libdir" != "yes"],
|
||||
[ompi_check_mxm_libdir="$with_mxm_libdir"])
|
||||
|
||||
OPAL_CHECK_PACKAGE([ompi_check_mxm],
|
||||
[mxm/api/mxm_api.h],
|
||||
[mxm],
|
||||
[mxm_cleanup],
|
||||
[],
|
||||
[$ompi_check_mxm_dir],
|
||||
[$ompi_check_mxm_libdir],
|
||||
[ompi_check_mxm_happy="yes"],
|
||||
[ompi_check_mxm_happy="no"])],
|
||||
[ompi_check_mxm_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_mxm_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_mxm_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_mxm_$1_save_LIBS"
|
||||
|
||||
AC_MSG_CHECKING(for MXM version compatibility)
|
||||
AC_REQUIRE_CPP
|
||||
old_CFLAGS="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -I$ompi_check_mxm_dir/include"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <mxm/api/mxm_version.h>]],
|
||||
[[
|
||||
#ifndef MXM_VERSION
|
||||
#error "MXM Version is less than 2.1, please upgrade"
|
||||
#endif
|
||||
#
|
||||
#if MXM_API < MXM_VERSION(2,1)
|
||||
#error "MXM Version is less than 2.1, please upgrade"
|
||||
#endif
|
||||
]])],
|
||||
[ompi_mxm_version_ok="yes"],
|
||||
[ompi_mxm_version_ok="no"])
|
||||
|
||||
AC_MSG_RESULT([$ompi_mxm_version_ok])
|
||||
CFLAGS=$old_CFLAGS
|
||||
|
||||
AS_IF([test "$ompi_mxm_version_ok" = "no"], [ompi_check_mxm_happy="no"])
|
||||
|
||||
OPAL_SUMMARY_ADD([[Transports]],[[Mellanox MXM]],[$1],[$ompi_check_mxm_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_mxm_happy" = "yes"],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_mxm_LDFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_mxm_LIBS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_mxm_CPPFLAGS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_mxm" && test "$with_mxm" != "no"],
|
||||
[AC_MSG_ERROR([MXM support requested but not found. Aborting])])
|
||||
$3])
|
||||
])
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2006 QLogic Corp. All rights reserved.
|
||||
dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2016 Intel Corporation. All rights reserved.
|
||||
dnl
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_PSM(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if PSM support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_PSM],[
|
||||
if test -z "$ompi_check_psm_happy" ; then
|
||||
AC_ARG_WITH([psm],
|
||||
[AC_HELP_STRING([--with-psm(=DIR)],
|
||||
[Build PSM (Qlogic InfiniPath) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([psm], [$with_psm], [include/psm.h])
|
||||
AC_ARG_WITH([psm-libdir],
|
||||
[AC_HELP_STRING([--with-psm-libdir=DIR],
|
||||
[Search for PSM (QLogic InfiniPath PSM) libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([psm-libdir], [$with_psm_libdir], [libpsm_infinipath.*])
|
||||
|
||||
ompi_check_psm_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_psm_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_psm_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_psm" != "no"],
|
||||
[AS_IF([test ! -z "$with_psm" && test "$with_psm" != "yes"],
|
||||
[ompi_check_psm_dir="$with_psm"])
|
||||
AS_IF([test ! -z "$with_psm_libdir" && test "$with_psm_libdir" != "yes"],
|
||||
[ompi_check_psm_libdir="$with_psm_libdir"])
|
||||
|
||||
OPAL_CHECK_PACKAGE([ompi_check_psm],
|
||||
[psm.h],
|
||||
[psm_infinipath],
|
||||
[psm_finalize],
|
||||
[],
|
||||
[$ompi_check_psm_dir],
|
||||
[$ompi_check_psm_libdir],
|
||||
[ompi_check_psm_happy="yes"],
|
||||
[ompi_check_psm_happy="no"])],
|
||||
[ompi_check_psm_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_psm_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_psm_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_psm_$1_save_LIBS"
|
||||
|
||||
AS_IF([test "$ompi_check_psm_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([PSM driver does not currently support progress threads. Disabling BTL.])
|
||||
ompi_check_psm_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_psm_happy" = "yes"],
|
||||
[AC_CHECK_HEADERS(
|
||||
glob.h,
|
||||
[],
|
||||
[AC_MSG_WARN([glob.h not found. Can not build component.])
|
||||
ompi_check_psm_happy="no"])])
|
||||
|
||||
OPAL_SUMMARY_ADD([[Transports]],[[Intel TrueScale (PSM)]],[$1],[$ompi_check_psm_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_psm_happy" = "yes"],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_psm_LDFLAGS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_psm_CPPFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_psm_LIBS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_psm" && test "$with_psm" != "no"],
|
||||
[AC_MSG_ERROR([PSM support requested but not found. Aborting])])
|
||||
$3])
|
||||
])
|
||||
|
|
@ -0,0 +1,110 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006 QLogic Corp. All rights reserved.
|
||||
# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2016 Intel Corporation. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2021 Triad National Security, LLC. All rights
|
||||
# reserved.
|
||||
#
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# OMPI_CHECK_PSM2(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if PSM2 support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_PSM2],[
|
||||
if test -z "$ompi_check_psm2_happy" ; then
|
||||
AC_ARG_WITH([psm2],
|
||||
[AC_HELP_STRING([--with-psm2(=DIR)],
|
||||
[Build PSM2 (Intel PSM2) support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([psm2], [$with_psm2], [include/psm2.h])
|
||||
AC_ARG_WITH([psm2-libdir],
|
||||
[AC_HELP_STRING([--with-psm2-libdir=DIR],
|
||||
[Search for PSM (Intel PSM2) libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([psm2-libdir], [$with_psm2_libdir], [libpsm2.*])
|
||||
|
||||
AC_ARG_ENABLE([psm2-version-check],
|
||||
[AC_HELP_STRING([--disable-psm2-version-check],
|
||||
[Disable PSM2 version checking. Not recommended to disable. (default: enabled)])])
|
||||
|
||||
ompi_check_psm2_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_psm2_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_psm2_$1_save_LIBS="$LIBS"
|
||||
|
||||
AS_IF([test "$with_psm2" != "no"],
|
||||
[AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "yes"],
|
||||
[ompi_check_psm2_dir="$with_psm2"])
|
||||
AS_IF([test ! -z "$with_psm2_libdir" && test "$with_psm2_libdir" != "yes"],
|
||||
[ompi_check_psm2_libdir="$with_psm2_libdir"])
|
||||
|
||||
OPAL_CHECK_PACKAGE([ompi_check_psm2],
|
||||
[psm2.h],
|
||||
[psm2],
|
||||
[psm2_mq_irecv2],
|
||||
[],
|
||||
[$ompi_check_psm2_dir],
|
||||
[$ompi_check_psm2_libdir],
|
||||
[ompi_check_psm2_happy="yes"],
|
||||
[ompi_check_psm2_happy="no"])],
|
||||
[ompi_check_psm2_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_psm2_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([PSM2 driver does not currently support progress threads. Disabling MTL.])
|
||||
ompi_check_psm2_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
|
||||
[AC_CHECK_HEADERS(
|
||||
glob.h,
|
||||
[],
|
||||
[AC_MSG_WARN([glob.h not found. Can not build component.])
|
||||
ompi_check_psm2_happy="no"])])
|
||||
|
||||
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
|
||||
[AS_IF([ test ! -z "$ompi_check_psm2_dir"],
|
||||
[CPPFLAGS="-I $ompi_check_psm2_dir/include $CPPFLAGS"])
|
||||
AC_CHECK_DECL([PSM2_LIB_REFCOUNT_CAP],
|
||||
[AC_DEFINE([HAVE_PSM2_LIB_REFCOUNT_CAP], [1],
|
||||
[have PSM2_LIB_REFCOUNT_CAP in psm2.h])],
|
||||
[AS_IF([test "x$enable_psm2_version_check" != "xno"],
|
||||
[ompi_check_psm2_happy="no"
|
||||
AC_MSG_WARN([PSM2 needs to be version 11.2.173 or later. Disabling MTL.])]
|
||||
)],
|
||||
[#include <psm2.h>])]
|
||||
)
|
||||
|
||||
CPPFLAGS="$ompi_check_psm2_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_psm2_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_psm2_$1_save_LIBS"
|
||||
|
||||
OPAL_SUMMARY_ADD([[Transports]],[[Intel Omnipath (PSM2)]],[$1],[$ompi_check_psm2_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$ompi_check_psm2_happy" = "yes"],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_psm2_LDFLAGS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_psm2_CPPFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_psm2_LIBS"
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_psm2" && test "$with_psm2" != "no"],
|
||||
[AC_MSG_ERROR([PSM2 support requested but not found. Aborting])])
|
||||
$3])
|
||||
])
|
|
@ -0,0 +1,71 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008-2018 University of Houston. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_PVFS2(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if PVFS2 support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_PVFS2],[
|
||||
|
||||
check_pvfs2_CPPFLAGS=
|
||||
check_pvfs2_LDFLAGS=
|
||||
check_pvfs2_LIBS=
|
||||
|
||||
check_pvfs2_configuration="none"
|
||||
ompi_check_pvfs2_happy="yes"
|
||||
|
||||
|
||||
# Get some configuration information
|
||||
AC_ARG_WITH([pvfs2],
|
||||
[AC_HELP_STRING([--with-pvfs2(=DIR)],
|
||||
[Build Pvfs2 support, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries])])
|
||||
OPAL_CHECK_WITHDIR([pvfs2], [$with_pvfs2], [include/pvfs2.h])
|
||||
|
||||
AS_IF([test "$with_pvfs2" = "no"],
|
||||
[ompi_check_pvfs2_happy="no"],
|
||||
[AS_IF([test -z "$with_pvfs2"],
|
||||
[ompi_check_pvfs2_dir="/usr/local"],
|
||||
[ompi_check_pvfs2_dir=$with_pvfs2])
|
||||
|
||||
if test -e "$ompi_check_pvfs2_dir/lib64" ; then
|
||||
ompi_check_pvfs2_libdir="$ompi_check_pvfs2_dir/lib64"
|
||||
else
|
||||
ompi_check_pvfs2_libdir="$ompi_check_pvfs2_dir/lib"
|
||||
fi
|
||||
|
||||
# Add correct -I and -L flags
|
||||
OPAL_CHECK_PACKAGE([$1], [pvfs2.h], [pvfs2], [PVFS_util_resolve], [],
|
||||
[$ompi_check_pvfs2_dir], [$ompi_check_pvfs2_libdir],
|
||||
[ompi_check_pvfs2_happy="yes"],
|
||||
[ompi_check_pvfs2_happy="no"])
|
||||
])
|
||||
|
||||
AS_IF([test "$ompi_check_pvfs2_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test ! -z "$with_pvfs2" && test "$with_pvfs2" != "no"],
|
||||
[echo PVFS2 support not found])
|
||||
$3])
|
||||
|
||||
])
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2021 Mellanox Technologies. All rights reserved.
|
||||
dnl Copyright (c) 2013-2021 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_CHECK_UCC(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if ucc support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_UCC],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_check_ucc_dir ompi_check_ucc_happy CPPFLAGS_save LDFLAGS_save LIBS_save])
|
||||
|
||||
AC_ARG_WITH([ucc],
|
||||
[AS_HELP_STRING([--with-ucc(=DIR)],
|
||||
[Build UCC (Unified Collective Communication)])])
|
||||
|
||||
AS_IF([test "$with_ucc" != "no"],
|
||||
[AS_IF([test -n "$with_ucc" && test "$with_ucc" != "yes"],
|
||||
[ompi_check_ucc_dir=$with_ucc])
|
||||
|
||||
CPPFLAGS_save=$CPPFLAGS
|
||||
LDFLAGS_save=$LDFLAGS
|
||||
LIBS_save=$LIBS
|
||||
|
||||
OPAL_LOG_MSG([$1_CPPFLAGS : $$1_CPPFLAGS], 1)
|
||||
OPAL_LOG_MSG([$1_LDFLAGS : $$1_LDFLAGS], 1)
|
||||
OPAL_LOG_MSG([$1_LIBS : $$1_LIBS], 1)
|
||||
|
||||
OPAL_CHECK_PACKAGE([$1],
|
||||
[ucc/api/ucc.h],
|
||||
[ucc],
|
||||
[ucc_init_version],
|
||||
[],
|
||||
[$ompi_check_ucc_dir],
|
||||
[],
|
||||
[ompi_check_ucc_happy="yes"],
|
||||
[ompi_check_ucc_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_ucc_happy" = "yes"],
|
||||
[
|
||||
CPPFLAGS=$coll_ucc_CPPFLAGS
|
||||
LDFLAGS=$coll_ucc_LDFLAGS
|
||||
LIBS=$coll_ucc_LIBS
|
||||
AC_CHECK_FUNCS(ucc_comm_free, [], [])
|
||||
],
|
||||
[])
|
||||
|
||||
CPPFLAGS=$CPPFLAGS_save
|
||||
LDFLAGS=$LDFLAGS_save
|
||||
LIBS=$LIBS_save],
|
||||
[ompi_check_ucc_happy=no])
|
||||
|
||||
AS_IF([test "$ompi_check_ucc_happy" = "yes" && test "$enable_progress_threads" = "yes"],
|
||||
[AC_MSG_WARN([ucc driver does not currently support progress threads. Disabling UCC.])
|
||||
ompi_check_ucc_happy="no"])
|
||||
|
||||
AS_IF([test "$ompi_check_ucc_happy" = "yes"],
|
||||
[$2],
|
||||
[AS_IF([test -n "$with_ucc" && test "$with_ucc" != "no"],
|
||||
[AC_MSG_ERROR([UCC support requested but not found. Aborting])])
|
||||
$3])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
|
@ -0,0 +1,179 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (C) 2015-2017 Mellanox Technologies, Inc.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2016 Cisco Systems, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# OMPI_CHECK_UCX(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if UCX support can be found. sets prefix_{CPPFLAGS,
|
||||
# LDFLAGS, LIBS} as needed and runs action-if-found if there is
|
||||
# support, otherwise executes action-if-not-found
|
||||
AC_DEFUN([OMPI_CHECK_UCX],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_check_ucx_dir])
|
||||
|
||||
AS_IF([test -z "$ompi_check_ucx_happy"],
|
||||
[AC_ARG_WITH([ucx],
|
||||
[AC_HELP_STRING([--with-ucx(=DIR)],
|
||||
[Build with Unified Communication X library support])])
|
||||
OPAL_CHECK_WITHDIR([ucx], [$with_ucx], [include/ucp/api/ucp.h])
|
||||
AC_ARG_WITH([ucx-libdir],
|
||||
[AC_HELP_STRING([--with-ucx-libdir=DIR],
|
||||
[Search for Unified Communication X libraries in DIR])])
|
||||
OPAL_CHECK_WITHDIR([ucx-libdir], [$with_ucx_libdir], [libucp.*])
|
||||
|
||||
AS_IF([test "$with_ucx" != "no"],
|
||||
[AS_IF([test -n "$with_ucx" && test "$with_ucx" != "yes"],
|
||||
[ompi_check_ucx_dir="$with_ucx"],
|
||||
[PKG_CHECK_MODULES_STATIC([ucx],[ucx],
|
||||
[ompi_check_ucx_dir=`$PKG_CONFIG --variable=prefix ucx`
|
||||
AS_IF([test "$ompi_check_ucx_dir" = "/usr"],
|
||||
[ompi_check_ucx_dir=])],
|
||||
[true])])
|
||||
ompi_check_ucx_happy="no"
|
||||
AS_IF([test -z "$ompi_check_ucx_dir"],
|
||||
[OPAL_CHECK_PACKAGE([ompi_check_ucx],
|
||||
[ucp/api/ucp.h],
|
||||
[ucp],
|
||||
[ucp_cleanup],
|
||||
[-luct -lucm -lucs],
|
||||
[],
|
||||
[],
|
||||
[ompi_check_ucx_happy="yes"],
|
||||
[ompi_check_ucx_happy="no"])
|
||||
AS_IF([test "$ompi_check_ucx_happy" = yes],
|
||||
[AC_MSG_CHECKING(for UCX version compatibility)
|
||||
AC_REQUIRE_CPP
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <uct/api/version.h>]],[[]])],
|
||||
[ompi_check_ucx_happy="yes"],
|
||||
[ompi_check_ucx_happy="no"])
|
||||
|
||||
AC_MSG_RESULT([$ompi_check_ucx_happy])])
|
||||
AS_IF([test "$ompi_check_ucx_happy" = "no"],
|
||||
[ompi_check_ucx_dir=/opt/ucx])])
|
||||
AS_IF([test "$ompi_check_ucx_happy" != yes],
|
||||
[AS_IF([test -n "$with_ucx_libdir"],
|
||||
[ompi_check_ucx_libdir="$with_ucx_libdir"],
|
||||
[files=`ls $ompi_check_ucx_dir/lib64/libucp.* 2> /dev/null | wc -l`
|
||||
AS_IF([test "$files" -gt 0],
|
||||
[ompi_check_ucx_libdir=$ompi_check_ucx_dir/lib64],
|
||||
[ompi_check_ucx_libdir=$ompi_check_ucx_dir/lib])])
|
||||
|
||||
ompi_check_ucx_$1_save_CPPFLAGS="$CPPFLAGS"
|
||||
ompi_check_ucx_$1_save_LDFLAGS="$LDFLAGS"
|
||||
ompi_check_ucx_$1_save_LIBS="$LIBS"
|
||||
|
||||
OPAL_CHECK_PACKAGE([ompi_check_ucx],
|
||||
[ucp/api/ucp.h],
|
||||
[ucp],
|
||||
[ucp_cleanup],
|
||||
[-luct -lucm -lucs],
|
||||
[$ompi_check_ucx_dir],
|
||||
[$ompi_check_ucx_libdir],
|
||||
[ompi_check_ucx_happy="yes"],
|
||||
[ompi_check_ucx_happy="no"])
|
||||
|
||||
CPPFLAGS="$ompi_check_ucx_$1_save_CPPFLAGS"
|
||||
LDFLAGS="$ompi_check_ucx_$1_save_LDFLAGS"
|
||||
LIBS="$ompi_check_ucx_$1_save_LIBS"
|
||||
|
||||
AS_IF([test "$ompi_check_ucx_happy" = yes],
|
||||
[AC_MSG_CHECKING(for UCX version compatibility)
|
||||
AC_REQUIRE_CPP
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
CPPFLAGS="$CPPFLAGS -I$ompi_check_ucx_dir/include"
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <uct/api/version.h>]],[[]])],
|
||||
[ompi_check_ucx_happy="yes"],
|
||||
[ompi_check_ucx_happy="no"])
|
||||
|
||||
AC_MSG_RESULT([$ompi_check_ucx_happy])
|
||||
CPPFLAGS=$old_CPPFLAGS])])
|
||||
|
||||
old_CPPFLAGS="$CPPFLAGS"
|
||||
AS_IF([test -n "$ompi_check_ucx_dir"],
|
||||
[CPPFLAGS="$CPPFLAGS -I$ompi_check_ucx_dir/include"])
|
||||
# Turn off UCX version v1.8 due to issue #8321
|
||||
AC_MSG_CHECKING([UCX version])
|
||||
AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#include <ucp/api/ucp_version.h>
|
||||
#if (UCP_API_MAJOR == 1) && (UCP_API_MINOR == 8)
|
||||
#error "Invalid version"
|
||||
#endif], [])],
|
||||
[AC_MSG_RESULT([ok (not 1.8.x)])],
|
||||
[AC_MSG_RESULT([bad (1.8.x)])
|
||||
AC_MSG_WARN([UCX support skipped because version 1.8.x was found, which has a known catastrophic issue.])
|
||||
AC_MSG_WARN([Please upgrade to UCX version 1.9 or higher.])
|
||||
ompi_check_ucx_happy=no])
|
||||
AS_IF([test "$ompi_check_ucx_happy" = yes],
|
||||
[
|
||||
AC_CHECK_DECLS([ucp_tag_send_nbr],
|
||||
[AC_DEFINE([HAVE_UCP_TAG_SEND_NBR],[1],
|
||||
[have ucp_tag_send_nbr()])], [],
|
||||
[#include <ucp/api/ucp.h>])
|
||||
AC_CHECK_DECLS([ucp_ep_flush_nb, ucp_worker_flush_nb,
|
||||
ucp_request_check_status, ucp_put_nb, ucp_get_nb,
|
||||
ucp_put_nbx, ucp_get_nbx, ucp_atomic_op_nbx,
|
||||
ucp_ep_flush_nbx],
|
||||
[], [],
|
||||
[#include <ucp/api/ucp.h>])
|
||||
AC_CHECK_DECLS([ucm_test_events,
|
||||
ucm_test_external_events],
|
||||
[], [],
|
||||
[#include <ucm/api/ucm.h>])
|
||||
AC_CHECK_DECLS([UCP_ATOMIC_POST_OP_AND,
|
||||
UCP_ATOMIC_POST_OP_OR,
|
||||
UCP_ATOMIC_POST_OP_XOR,
|
||||
UCP_ATOMIC_FETCH_OP_FAND,
|
||||
UCP_ATOMIC_FETCH_OP_FOR,
|
||||
UCP_ATOMIC_FETCH_OP_FXOR,
|
||||
UCP_PARAM_FIELD_ESTIMATED_NUM_PPN,
|
||||
UCP_WORKER_FLAG_IGNORE_REQUEST_LEAK,
|
||||
UCP_OP_ATTR_FLAG_MULTI_SEND],
|
||||
[], [],
|
||||
[#include <ucp/api/ucp.h>])
|
||||
AC_CHECK_DECLS([UCP_WORKER_ATTR_FIELD_ADDRESS_FLAGS],
|
||||
[AC_DEFINE([HAVE_UCP_WORKER_ADDRESS_FLAGS], [1],
|
||||
[have worker address attribute])], [],
|
||||
[#include <ucp/api/ucp.h>])
|
||||
AC_CHECK_DECLS([UCP_ATTR_FIELD_MEMORY_TYPES],
|
||||
[AC_DEFINE([HAVE_UCP_ATTR_MEMORY_TYPES], [1],
|
||||
[have memory types attribute])], [],
|
||||
[#include <ucp/api/ucp.h>])
|
||||
AC_CHECK_DECLS([ucp_tag_send_nbx,
|
||||
ucp_tag_send_sync_nbx,
|
||||
ucp_tag_recv_nbx],
|
||||
[], [],
|
||||
[#include <ucp/api/ucp.h>])
|
||||
AC_CHECK_TYPES([ucp_request_param_t],
|
||||
[], [],
|
||||
[[#include <ucp/api/ucp.h>]])
|
||||
])
|
||||
CPPFLAGS=$old_CPPFLAGS
|
||||
|
||||
OPAL_SUMMARY_ADD([[Transports]],[[Open UCX]],[$1],[$ompi_check_ucx_happy])])])
|
||||
|
||||
AS_IF([test "$ompi_check_ucx_happy" = "yes"],
|
||||
[$1_CPPFLAGS="[$]$1_CPPFLAGS $ompi_check_ucx_CPPFLAGS"
|
||||
$1_LDFLAGS="[$]$1_LDFLAGS $ompi_check_ucx_LDFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $ompi_check_ucx_LIBS"
|
||||
AC_DEFINE([HAVE_UCX], [1], [have ucx])
|
||||
$2],
|
||||
[AS_IF([test ! -z "$with_ucx" && test "$with_ucx" != "no"],
|
||||
[AC_MSG_ERROR([UCX support requested but not found. Aborting])])
|
||||
AC_DEFINE([HAVE_UCX], [0], [have ucx])
|
||||
$3])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2009-2019 Cisco Systems, Inc. All rights reserved
|
||||
# Copyright (c) 2017-2018 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2018 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
AC_DEFUN([OMPI_CONFIG_FILES],[
|
||||
AC_CONFIG_FILES([
|
||||
ompi/Makefile
|
||||
ompi/etc/Makefile
|
||||
ompi/include/Makefile
|
||||
ompi/include/mpif.h
|
||||
ompi/include/mpif-config.h
|
||||
|
||||
ompi/datatype/Makefile
|
||||
ompi/debuggers/Makefile
|
||||
|
||||
ompi/mpi/c/Makefile
|
||||
ompi/mpi/c/profile/Makefile
|
||||
ompi/mpi/cxx/Makefile
|
||||
ompi/mpi/fortran/base/Makefile
|
||||
ompi/mpi/fortran/mpif-h/Makefile
|
||||
ompi/mpi/fortran/mpif-h/profile/Makefile
|
||||
ompi/mpi/fortran/use-mpi-tkr/Makefile
|
||||
ompi/mpi/fortran/use-mpi-tkr/fortran_sizes.h
|
||||
ompi/mpi/fortran/use-mpi-tkr/fortran_kinds.sh
|
||||
ompi/mpi/fortran/use-mpi-ignore-tkr/Makefile
|
||||
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-interfaces.h
|
||||
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-file-interfaces.h
|
||||
ompi/mpi/fortran/use-mpi-ignore-tkr/mpi-ignore-tkr-removed-interfaces.h
|
||||
ompi/mpi/fortran/use-mpi-f08/Makefile
|
||||
ompi/mpi/fortran/use-mpi-f08/base/Makefile
|
||||
ompi/mpi/fortran/use-mpi-f08/bindings/Makefile
|
||||
ompi/mpi/fortran/use-mpi-f08/mod/Makefile
|
||||
ompi/mpi/fortran/mpiext-use-mpi/Makefile
|
||||
ompi/mpi/fortran/mpiext-use-mpi-f08/Makefile
|
||||
ompi/mpi/tool/Makefile
|
||||
ompi/mpi/tool/profile/Makefile
|
||||
|
||||
ompi/tools/ompi_info/Makefile
|
||||
ompi/tools/wrappers/Makefile
|
||||
ompi/tools/wrappers/mpicc-wrapper-data.txt
|
||||
ompi/tools/wrappers/mpic++-wrapper-data.txt
|
||||
ompi/tools/wrappers/mpifort-wrapper-data.txt
|
||||
ompi/tools/wrappers/ompi.pc
|
||||
ompi/tools/wrappers/ompi-c.pc
|
||||
ompi/tools/wrappers/ompi-cxx.pc
|
||||
ompi/tools/wrappers/ompi-fort.pc
|
||||
ompi/tools/wrappers/mpijavac.pl
|
||||
ompi/tools/mpisync/Makefile
|
||||
])
|
||||
])
|
|
@ -0,0 +1,269 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2006-2017 Cisco Systems, Inc. All rights reserved
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2009 IBM Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2009-2018 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2013 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_CONFIGURE_OPTIONS],[
|
||||
opal_show_subtitle "OMPI Configuration options"
|
||||
|
||||
#
|
||||
# Disable MPI layer?
|
||||
#
|
||||
AC_ARG_ENABLE([mpi],
|
||||
[AC_HELP_STRING([--disable-mpi],
|
||||
[Disable building the MPI layer (default:enabled)])])
|
||||
|
||||
#
|
||||
# Do we want to enable MPI interface warnings (e.g. deprecated
|
||||
# functionality and others)?
|
||||
#
|
||||
# This was disabled by default in v1.5, but will be enabled by default
|
||||
# in 1.7 and beyond.
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([if want compile-time warnings inside of mpi.h])
|
||||
AC_ARG_ENABLE(mpi-interface-warning,
|
||||
AC_HELP_STRING([--enable-mpi-interface-warning],
|
||||
[enable compile-time warnings when deprecated MPI functions are used (default: enabled)]))
|
||||
if test "$enable_mpi_interface_warning" != "no"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
OMPI_WANT_MPI_INTERFACE_WARNING=1
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
OMPI_WANT_MPI_INTERFACE_WARNING=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_WANT_MPI_INTERFACE_WARNING], [$OMPI_WANT_MPI_INTERFACE_WARNING],
|
||||
[Enable warnings when using deprecated MPI functions])
|
||||
|
||||
#
|
||||
# Sparse Groups
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([if want sparse process groups])
|
||||
AC_ARG_ENABLE(sparse-groups,
|
||||
AC_HELP_STRING([--enable-sparse-groups],
|
||||
[enable sparse process groups (default: not enabled)]))
|
||||
if test "$enable_sparse_groups" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
GROUP_SPARSE=1
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
GROUP_SPARSE=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_GROUP_SPARSE],$GROUP_SPARSE,
|
||||
[Whether we want sparse process groups])
|
||||
|
||||
|
||||
#
|
||||
# Do we want to enable peruse interface?
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([if want peruse support])
|
||||
AC_ARG_ENABLE(peruse,
|
||||
AC_HELP_STRING([--enable-peruse],
|
||||
[enable PERUSE interface (default: disabled)]))
|
||||
if test "$enable_peruse" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
WANT_PERUSE=1
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
WANT_PERUSE=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_WANT_PERUSE],
|
||||
[$WANT_PERUSE],
|
||||
[if the peruse interface should be enabled])
|
||||
AM_CONDITIONAL(WANT_PERUSE, test "$WANT_PERUSE" = "1")
|
||||
|
||||
#
|
||||
# Fortran MPI bindings
|
||||
#
|
||||
AC_MSG_CHECKING([if want Fortran MPI bindings])
|
||||
AC_ARG_ENABLE(mpi-fortran,
|
||||
AC_HELP_STRING([--enable-mpi-fortran],
|
||||
[specify which Fortran MPI bindings to build: yes, none (or no), best-effort, mpifh (build only mpif.h support), usempi (build mpif.h and the mpi module), or usempif08 (or all, build mpifh, the mpi module, and the mpi_f08 module) (default: "yes" if Fortran compiler found)]))
|
||||
|
||||
# These are the 4 monotonically-rising values indicating levels of
|
||||
# Fortran bindings support.
|
||||
OMPI_FORTRAN_NO_BINDINGS=0
|
||||
OMPI_FORTRAN_MPIFH_BINDINGS=1
|
||||
OMPI_FORTRAN_USEMPI_BINDINGS=2
|
||||
OMPI_FORTRAN_USEMPIF08_BINDINGS=3
|
||||
|
||||
# Set this variable to minimum the level of Fortran bindings support
|
||||
# that is *required* (i.e., if we can't achieve this level, then
|
||||
# configure should abort).
|
||||
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
|
||||
# Set this variable to the highest level of Fortran bindings support
|
||||
# that should be attempted. This value will never be <=
|
||||
# $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS.
|
||||
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
|
||||
|
||||
case "x$enable_mpi_fortran" in
|
||||
x|xbest-effort)
|
||||
AC_MSG_RESULT([ (try)])
|
||||
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
|
||||
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
|
||||
;;
|
||||
|
||||
xyes)
|
||||
AC_MSG_RESULT([yes (default)])
|
||||
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
|
||||
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
|
||||
;;
|
||||
|
||||
xall|xusempif08)
|
||||
AC_MSG_RESULT([all (usempif08)])
|
||||
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
|
||||
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
|
||||
;;
|
||||
|
||||
xno|xnone)
|
||||
AC_MSG_RESULT([no (none)])
|
||||
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
|
||||
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
|
||||
;;
|
||||
|
||||
xmpifh)
|
||||
AC_MSG_RESULT([yes (mpif.h)])
|
||||
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
|
||||
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
|
||||
;;
|
||||
|
||||
xusempi)
|
||||
AC_MSG_RESULT([yes (mpif.h, mpi module)])
|
||||
OMPI_MIN_REQUIRED_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
|
||||
OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
|
||||
;;
|
||||
|
||||
*)
|
||||
AC_MSG_RESULT([unknown: $binding])
|
||||
AC_MSG_WARN([--enable-mpi-fortran supports only one of the following values: yes, all, none, best-effort, mpifh, usempi, or usempif08])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
;;
|
||||
esac
|
||||
|
||||
#
|
||||
# C++
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([if want C++ bindings])
|
||||
AC_ARG_ENABLE(mpi-cxx,
|
||||
AC_HELP_STRING([--enable-mpi-cxx],
|
||||
[enable C++ MPI bindings (default: disabled)]))
|
||||
if test "$enable_mpi_cxx" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
WANT_MPI_CXX_SUPPORT=1
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
WANT_MPI_CXX_SUPPORT=0
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([if want MPI::SEEK_SET support])
|
||||
AC_ARG_ENABLE([mpi-cxx-seek],
|
||||
[AC_HELP_STRING([--enable-mpi-cxx-seek],
|
||||
[enable support for MPI::SEEK_SET, MPI::SEEK_END, and MPI::SEEK_POS in C++ bindings (default: enabled)])])
|
||||
if test "$enable_mpi_cxx_seek" != "no" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
OMPI_WANT_MPI_CXX_SEEK=1
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
OMPI_WANT_MPI_CXX_SEEK=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_WANT_MPI_CXX_SEEK], [$OMPI_WANT_MPI_CXX_SEEK],
|
||||
[do we want to try to work around C++ bindings SEEK_* issue?])
|
||||
|
||||
# Remove these when we finally kill them once and for all
|
||||
AC_ARG_ENABLE([mpi1-compatibility],
|
||||
[AC_HELP_STRING([--enable-mpi1-compatibility],
|
||||
[Enable support for MPI-1.x functions removed from the current MPI standard (MPI-3.x). This option will go away in a future release of Open MPI (default: disabled)])])
|
||||
|
||||
if test "x$enable_mpi1_compatibility" = "xyes" ; then
|
||||
ompi_mpi1_support=1
|
||||
else
|
||||
ompi_mpi1_support=0
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED([OMPI_ENABLE_MPI1_COMPAT], [$ompi_mpi1_support], [whether we want MPI-1.x support])
|
||||
AC_SUBST([OMPI_ENABLE_MPI1_COMPAT], [$ompi_mpi1_support])
|
||||
AM_CONDITIONAL([OMPI_ENABLE_MPI1_COMPAT],[test $ompi_mpi1_support = 1])
|
||||
|
||||
AC_ARG_ENABLE([grequest-extensions],
|
||||
[AC_HELP_STRING([--enable-grequest-extensions],
|
||||
[Enable support for Grequest extensions (default: disabled)])])
|
||||
|
||||
if test "x$enable_grequest_extensions" = "xyes" ; then
|
||||
ompi_grequest_extensions=1
|
||||
else
|
||||
ompi_grequest_extensions=0
|
||||
fi
|
||||
|
||||
|
||||
AC_DEFINE_UNQUOTED([OMPI_ENABLE_GREQUEST_EXTENSIONS], [$ompi_grequest_extensions], [whether we support Grequest extensions])
|
||||
AC_SUBST([OMPI_ENABLE_GREQUEST_EXTENSIONS], [$ompi_grequest_extensions])
|
||||
AM_CONDITIONAL([OMPI_ENABLE_GREQUEST_EXTENSIONS],[test $ompi_grequest_extensions = 1])
|
||||
|
||||
#
|
||||
# Do we want to disable MPI parameter checking at run-time?
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([if want run-time MPI parameter checking])
|
||||
AC_ARG_WITH(mpi-param-check,
|
||||
AC_HELP_STRING([--with-mpi-param-check(=VALUE)],
|
||||
[behavior of MPI function parameter checking. Valid values are: always, never, runtime. If --with-mpi-param-check is specified with no VALUE argument, it is equivalent to a VALUE of "always"; --without-mpi-param-check is equivalent to "never" (default: runtime).]))
|
||||
mpi_param_check=ompi_mpi_param_check
|
||||
if test "$with_mpi_param_check" = "no" || \
|
||||
test "$with_mpi_param_check" = "never"; then
|
||||
mpi_param_check=0
|
||||
ompi_param_check=0
|
||||
AC_MSG_RESULT([never])
|
||||
elif test "$with_mpi_param_check" = "yes" || \
|
||||
test "$with_mpi_param_check" = "always"; then
|
||||
mpi_param_check=1
|
||||
ompi_param_check=1
|
||||
AC_MSG_RESULT([always])
|
||||
elif test "$with_mpi_param_check" = "runtime" || \
|
||||
test -z "$with_mpi_params_check"; then
|
||||
ompi_param_check=1
|
||||
AC_MSG_RESULT([runtime])
|
||||
else
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([*** Unrecognized --with-mpi-param-check value])
|
||||
AC_MSG_WARN([*** See "configure --help" output])
|
||||
AC_MSG_WARN([*** Defaulting to "runtime"])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK, $mpi_param_check,
|
||||
[Whether we want to check MPI parameters always, never, or decide at run-time])
|
||||
AC_DEFINE_UNQUOTED(OMPI_PARAM_CHECK, $ompi_param_check,
|
||||
[Whether we want to check MPI parameters never or possible (an integer constant)])
|
||||
|
||||
AC_ARG_ENABLE([io-ompio],
|
||||
[AC_HELP_STRING([--disable-io-ompio],
|
||||
[Disable the ompio MPI-IO component])])
|
||||
|
||||
])dnl
|
||||
|
|
@ -0,0 +1,140 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2007-2010 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# OMPI_CONTRIB
|
||||
#
|
||||
# configure the contributed software components. Currently fairly
|
||||
# hard-wired, but someday should be much more like OMPI_MCA. See
|
||||
# https://svn.open-mpi.org/trac/ompi/ticket/1162.
|
||||
#
|
||||
# USAGE:
|
||||
# OMPI_CONTRIB()
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([OMPI_CONTRIB],[
|
||||
dnl for OPAL_CONFIGURE_USER env variable
|
||||
AC_REQUIRE([OPAL_CONFIGURE_SETUP])
|
||||
|
||||
# Option to not build some of the contributed software packages
|
||||
AC_ARG_ENABLE([contrib-no-build],
|
||||
AC_HELP_STRING([--enable-contrib-no-build=LIST],
|
||||
[Comma-separated list of contributed package names that will not be built. Possible values: ompi_mpicontrib_list. Example: "--enable-contrib-no-build=foo,bar" will disable building both the "foo" and "bar" contributed software packages (default: none -- i.e., build all possible contrib packages)]))
|
||||
|
||||
# Parse the list to see what we should not build
|
||||
opal_show_subtitle "Configuring contributed software packages"
|
||||
AC_MSG_CHECKING([which contributed software packages should be disabled])
|
||||
if test "$enable_contrib_no_build" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_ERROR([*** The enable-contrib-no-build flag requires an explicit list
|
||||
*** of packages to not build. For example, --enable-contrib-no-build=libompitrace])
|
||||
else
|
||||
ifs_save="$IFS"
|
||||
IFS="${IFS}$PATH_SEPARATOR,"
|
||||
msg=
|
||||
for item in $enable_contrib_no_build; do
|
||||
str="`echo DISABLE_contrib_${item}=1 | sed s/-/_/g`"
|
||||
eval $str
|
||||
msg="$item $msg"
|
||||
done
|
||||
IFS="$ifs_save"
|
||||
fi
|
||||
AC_MSG_RESULT([$msg])
|
||||
unset msg
|
||||
|
||||
# List of contrib subdirs to traverse into
|
||||
OMPI_CONTRIB_SUBDIRS=
|
||||
OMPI_CONTRIB_DIST_SUBDIRS=
|
||||
OMPI_MPI_CONTRIBS=
|
||||
|
||||
# Cycle through each of the software packages and
|
||||
# configure them if not disabled.
|
||||
m4_foreach(software, [ompi_mpicontrib_list],
|
||||
[_OMPI_CONTRIB_CONFIGURE(software)])
|
||||
|
||||
# Setup the top-level glue
|
||||
AC_DEFINE_UNQUOTED([OMPI_MPI_CONTRIBS], ["$OMPI_MPI_CONTRIBS"],
|
||||
[Contributed software packages built with Open MPI])
|
||||
AC_SUBST(OMPI_CONTRIB_SUBDIRS)
|
||||
AC_SUBST(OMPI_CONTRIB_DIST_SUBDIRS)
|
||||
])dnl
|
||||
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# _OMPI_CONTRIB_SOFTWARE
|
||||
#
|
||||
# Setup a specific contributed software package. This is a subroutine
|
||||
# because the work to setup each package is essentially the same.
|
||||
# Currently assumes that there is a configure.m4 file in the
|
||||
# contributed software directory. May someday be expanded to handle
|
||||
# other things.
|
||||
#
|
||||
# USAGE:
|
||||
# _OMPI_CONTRIB_SOFTARE([package_name])
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([_OMPI_CONTRIB_CONFIGURE],[
|
||||
|
||||
opal_show_subsubsubtitle "$1 (m4 configuration macro)"
|
||||
|
||||
# Put in a convenient enable/disable switch (it's a little more
|
||||
# user friendly than
|
||||
# --enable-contrib-no-build=<comma_delimited_list>, although each
|
||||
# works just as well as the other).
|
||||
AC_ARG_ENABLE([$1],
|
||||
[AS_HELP_STRING([--disable-$1],
|
||||
[disable support for contributed package $1 (default: enabled)])])
|
||||
AS_IF([test "x$enable_$1" = xno], [DISABLE_contrib_$1=yes])
|
||||
|
||||
OMPI_CONTRIB_HAPPY=0
|
||||
if test "$DISABLE_contrib_$1" = "" && test "$DISABLE_contrib_all" = ""; then
|
||||
OMPI_contrib_$1_CONFIG([OMPI_CONTRIB_HAPPY=1], [])
|
||||
AC_MSG_CHECKING([if contributed component $1 can compile])
|
||||
if test "$OMPI_CONTRIB_HAPPY" = "1"; then
|
||||
OMPI_CONTRIB_SUBDIRS="$OMPI_CONTRIB_SUBDIRS contrib/$1"
|
||||
OMPI_CONTRIB_DIST_SUBDIRS="$OMPI_CONTRIB_DIST_SUBDIRS contrib/$1"
|
||||
if test "$OMPI_MPI_CONTRIBS" = ""; then
|
||||
OMPI_MPI_CONTRIBS=$1
|
||||
else
|
||||
OMPI_MPI_CONTRIBS="$1, $OMPI_MPI_CONTRIBS"
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
# If this component was requested via command line switch, then abort.
|
||||
if test "x$enable_$1" = xyes ; then
|
||||
AC_MSG_WARN([Contributed component "$1" failed to configure properly])
|
||||
AC_MSG_WARN([This component was requested via command line switch])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([disabled via command line switch])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED(OMPI_ENABLE_CONTRIB_$1, [$OMPI_CONTRIB_HAPPY],
|
||||
[Enable contributed software package $1])
|
||||
unset OMPI_CONTRIB_HAPPY
|
||||
])dnl
|
|
@ -0,0 +1,94 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_CXX_FIND_EXCEPTION_FLAGS],[
|
||||
#
|
||||
# Arguments: none
|
||||
#
|
||||
# Dependencies: none
|
||||
#
|
||||
# Get the exception handling flags for the C++ compiler. Leaves
|
||||
# CXXFLAGS undisturbed.
|
||||
# Provides --with-exflags command line argument for configure as well.
|
||||
#
|
||||
# Sets OMPI_CXX_EXCEPTION_CXXFLAGS and OMPI_CXX_EXCEPTION_LDFLAGS as
|
||||
# appropriate.
|
||||
# Must call AC_SUBST manually
|
||||
#
|
||||
|
||||
# Command line flags
|
||||
|
||||
AC_ARG_WITH(exflags,
|
||||
AC_HELP_STRING([--with-exflags],
|
||||
[Specify flags necessary to enable C++ exceptions]),
|
||||
ompi_force_exflags="$withval")
|
||||
|
||||
ompi_CXXFLAGS_SAVE="$CXXFLAGS"
|
||||
AC_MSG_CHECKING([for compiler exception flags])
|
||||
|
||||
# See which flags to use
|
||||
|
||||
if test "$ompi_force_exflags" != ""; then
|
||||
|
||||
# If the user supplied flags, use those
|
||||
|
||||
ompi_exflags="$ompi_force_exflags"
|
||||
elif test "$GXX" = "yes"; then
|
||||
|
||||
# g++ has changed their flags a few times. Sigh.
|
||||
|
||||
CXXFLAGS="$CXXFLAGS -fexceptions"
|
||||
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[try { int i = 0; } catch(...) { int j = 2; }]])], ompi_happy=1, ompi_happy=0)
|
||||
|
||||
if test "$ompi_happy" = "1"; then
|
||||
ompi_exflags="-fexceptions";
|
||||
else
|
||||
CXXFLAGS="$CXXFLAGS_SAVE -fhandle-exceptions"
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[try { int i = 0; } catch(...) { int j = 2; }]])], ompi_happy=1, ompi_happy=0)
|
||||
if test "$ompi_happy" = "1"; then
|
||||
ompi_exflags="-fhandle-exceptions";
|
||||
fi
|
||||
fi
|
||||
AC_LANG_RESTORE
|
||||
elif test "`basename $CXX`" = "KCC"; then
|
||||
|
||||
# KCC flags
|
||||
|
||||
ompi_exflags="--exceptions"
|
||||
fi
|
||||
CXXFLAGS="$ompi_CXXFLAGS_SAVE"
|
||||
|
||||
# Save the result
|
||||
|
||||
OMPI_CXX_EXCEPTIONS_CXXFLAGS="$ompi_exflags"
|
||||
OMPI_CXX_EXCEPTIONS_LDFLAGS="$ompi_exflags"
|
||||
if test "$ompi_exflags" = ""; then
|
||||
AC_MSG_RESULT([none necessary])
|
||||
else
|
||||
AC_MSG_RESULT([$ompi_exflags])
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
|
||||
unset ompi_force_exflags ompi_CXXFLAGS_SAVE ompi_exflags ompi_happy])dnl
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_CXX_FIND_TEMPLATE_PARAMETERS],[
|
||||
#
|
||||
# Arguments: none
|
||||
#
|
||||
# Dependencies: None
|
||||
#
|
||||
# Get the C++ compiler template parameters.
|
||||
#
|
||||
# Adds to CXXFLAGS
|
||||
|
||||
AC_MSG_CHECKING([for C++ compiler template parameters])
|
||||
if test "$BASECXX" = "KCC"; then
|
||||
new_flags="--one_instantiation_per_object"
|
||||
CXXFLAGS="$CXXFLAGS $new_flags"
|
||||
else
|
||||
new_flags="none needed"
|
||||
fi
|
||||
AC_MSG_RESULT([$new_flags])
|
||||
|
||||
#
|
||||
# Clean up
|
||||
#
|
||||
unset new_flags
|
||||
])
|
|
@ -0,0 +1,172 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_CXX_FIND_TEMPLATE_REPOSITORY],[
|
||||
AC_REQUIRE([AC_PROG_GREP])
|
||||
|
||||
#
|
||||
# Arguments: None
|
||||
#
|
||||
# Dependencies: None
|
||||
#
|
||||
# See if the compiler makes template repository directories
|
||||
# Warning: this is a really screwy example! -JMS
|
||||
#
|
||||
# Sets OMPI_CXX_TEMPLATE_REPOSITORY to the template repository, or blank.
|
||||
# Must call AC_SUBST manually
|
||||
#
|
||||
AC_CACHE_CHECK([for C++ template_repository_directory],
|
||||
[ompi_cv_cxx_template_repository],
|
||||
[_OMPI_CXX_FIND_TEMPLATE_REPOSITORY])
|
||||
|
||||
if test "$ompi_cv_cxx_template_repository" = "not used" ; then
|
||||
OMPI_CXX_TEMPLATE_REPOSITORY=
|
||||
elif test "$ompi_cv_cxx_template_repository" = "templates not supported" ; then
|
||||
OMPI_CXX_TEMPLATE_REPOSITORY=
|
||||
else
|
||||
OMPI_CXX_TEMPLATE_REPOSITORY="$ompi_cv_cxx_template_repository"
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([_OMPI_CXX_FIND_TEMPLATE_REPOSITORY],[
|
||||
# Find the repository
|
||||
mkdir conf_tmp_$$
|
||||
cd conf_tmp_$$
|
||||
cat > conftest.h <<EOF
|
||||
template <class T>
|
||||
class foo {
|
||||
public:
|
||||
foo(T yow) : data(yow) { yow.member(3); };
|
||||
void member(int i);
|
||||
private:
|
||||
T data;
|
||||
};
|
||||
|
||||
class bar {
|
||||
public:
|
||||
bar(int i) { data = i; };
|
||||
void member(int j) { data = data * j; };
|
||||
|
||||
private:
|
||||
int data;
|
||||
};
|
||||
EOF
|
||||
|
||||
cat > conftest2.C <<EOF
|
||||
#include "conftest.h"
|
||||
|
||||
void
|
||||
some_other_function(void)
|
||||
{
|
||||
foo<bar> var1(6);
|
||||
foo< foo<bar> > var2(var1);
|
||||
}
|
||||
EOF
|
||||
|
||||
cat > conftest1.C <<EOF
|
||||
#include "conftest.h"
|
||||
|
||||
void some_other_function(void);
|
||||
|
||||
template <class T>
|
||||
void
|
||||
foo<T>::member(int i)
|
||||
{
|
||||
i += 2;
|
||||
}
|
||||
|
||||
int
|
||||
main()
|
||||
{
|
||||
foo<bar> var1(6);
|
||||
foo< foo<bar> > var2(var1);
|
||||
|
||||
some_other_function();
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
|
||||
ompi_template_failed=
|
||||
echo configure:__oline__: $CXX $CXXFLAGS -c conftest1.C >&5
|
||||
$CXX $CXXFLAGS -c conftest1.C >&5 2>&5
|
||||
if test ! -f conftest1.o ; then
|
||||
ompi_cv_cxx_template_repository="templates not supported"
|
||||
echo configure:__oline__: here is the program that failed: >&5
|
||||
cat conftest1.C >&5
|
||||
echo configure:__oline__: here is conftest.h: >&5
|
||||
cat conftest.h >&5
|
||||
ompi_template_failed=1
|
||||
else
|
||||
echo configure:__oline__: $CXX $CXXFLAGS -c conftest2.C >&5
|
||||
$CXX $CXXFLAGS -c conftest2.C >&5 2>&5
|
||||
if test ! -f conftest2.o ; then
|
||||
ompi_cv_cxx_template_repository=
|
||||
echo configure:__oline__: here is the program that failed: >&5
|
||||
cat conftest2.C >&5
|
||||
echo configure:__oline__: here is conftest.h: >&5
|
||||
cat conftest.h >&5
|
||||
else
|
||||
rm -rf conftest*
|
||||
|
||||
for ompi_file in `ls`
|
||||
do
|
||||
if test "$ompi_file" != "." && test "$ompi_file" != ".."; then
|
||||
# Is it a directory?
|
||||
if test -d "$ompi_file"; then
|
||||
ompi_template_dir="$ompi_file $ompi_template_dir"
|
||||
|
||||
# Or is it a file?
|
||||
else
|
||||
name="`echo $ompi_file | cut -d. -f1`"
|
||||
|
||||
temp_mask=
|
||||
if test "$name" = "main" || test "$name" = "other"; then
|
||||
temp_mask="`echo $ompi_file | cut -d. -f2`"
|
||||
if test "$ompi_template_filemask" = ""; then
|
||||
ompi_template_filemask="$temp_mask";
|
||||
elif test "`echo $ompi_template_filemask | $GREP $temp_mask`" = ""; then
|
||||
ompi_template_filemask="$ompi_template_filemask $temp_mask"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
if test "$ompi_template_filemask" != ""; then
|
||||
temp_mask=
|
||||
for mask in $ompi_template_filemask
|
||||
do
|
||||
temp_mask="*.$mask $temp_mask"
|
||||
done
|
||||
ompi_template_filemask=$temp_mask
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
ompi_cv_cxx_template_repository="$ompi_template_dir $ompi_template_filemask"
|
||||
|
||||
if test "`echo $ompi_cv_cxx_template_repository`" = ""; then
|
||||
ompi_cv_cxx_template_repository="not used"
|
||||
fi
|
||||
cd ..
|
||||
rm -rf conf_tmp_$$
|
||||
|
||||
# Clean up
|
||||
unset ompi_file ompi_template_failed ompi_template_dir])
|
|
@ -0,0 +1,44 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_CXX_HAVE_EXCEPTIONS],[
|
||||
#
|
||||
# Arguments: None
|
||||
#
|
||||
# Dependencies: None
|
||||
#
|
||||
# Check to see if the C++ compiler can handle exceptions
|
||||
#
|
||||
# Sets OMPI_CXX_EXCEPTIONS to 1 if compiler has exceptions, 0 if not
|
||||
#
|
||||
|
||||
AC_MSG_CHECKING([for throw/catch])
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_CPLUSPLUS
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int i=1; throw(i);]])],
|
||||
OMPI_CXX_EXCEPTIONS=1, OMPI_CXX_EXCPTIONS=0)
|
||||
if test "$OMPI_CXX_EXCEPTIONS" = "1"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
AC_LANG_RESTORE])dnl
|
|
@ -0,0 +1,48 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2013 Sandia National Laboratories. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_REQUIRE_ENDPOINT_TAG_INIT], [
|
||||
ompi_endpoint_tag_counter=0
|
||||
])
|
||||
|
||||
|
||||
# OMPI_REQUIRE_ENDPOINT_TAG(tag_name)
|
||||
# -----------------------------------
|
||||
# This component requires an endpoint tag (storage space in the
|
||||
# ompi_proc_t structure) for a tag named tag_name. If tag_name
|
||||
# already has a tag index, this function is a no-op.
|
||||
AC_DEFUN([OMPI_REQUIRE_ENDPOINT_TAG], [
|
||||
AC_REQUIRE([OMPI_REQUIRE_ENDPOINT_TAG_INIT])
|
||||
AC_MSG_CHECKING([for index in endpoint array for tag $1])
|
||||
AS_IF([test -z "$OMPI_PROC_ENDPOINT_TAG_$1"],
|
||||
[OMPI_PROC_ENDPOINT_TAG_$1=$ompi_endpoint_tag_counter
|
||||
AC_DEFINE_UNQUOTED([OMPI_PROC_ENDPOINT_TAG_$1], [$OMPI_PROC_ENDPOINT_TAG_$1],
|
||||
[Index into endpoint array for $1])
|
||||
ompi_endpoint_tag_counter=`expr $ompi_endpoint_tag_counter + 1`])
|
||||
AC_MSG_RESULT([$OMPI_PROC_ENDPOINT_TAG_$1])
|
||||
])
|
||||
|
||||
|
||||
AC_DEFUN([OMPI_REQUIRE_ENDPOINT_TAG_FINI], [
|
||||
dnl AC_ARG_ENABLE([dynamic-endpoint-information],
|
||||
dnl [AC_HELP_STRING([--disable-dynamic-endpoint-information],
|
||||
dnl [Disable support for dynamic endpoint information storage. This saves a considerable amount of memory for large processes, but makes loading outside components which require endpoint storage impossible.])])
|
||||
dnl AS_IF([test "$enable_endpoint_information" != "no"],
|
||||
dnl [OMPI_REQUIRE_ENDPOINT_TAG(DYNAMIC)])
|
||||
|
||||
AC_MSG_CHECKING([for size of endpoint array])
|
||||
AS_IF([test -z "$ompi_endpoint_tag_counter" || test "$ompi_endpoint_tag_counter" = "0"],
|
||||
[AC_MSG_ERROR([Endpoint index count is 0. This means no MPI communication would be possible. Aborting.])])
|
||||
AC_MSG_RESULT([$ompi_endpoint_tag_counter])
|
||||
AC_DEFINE_UNQUOTED([OMPI_PROC_ENDPOINT_TAG_MAX], [$ompi_endpoint_tag_counter],
|
||||
[Maximum number of endpoint entries to be attached to an ompi_proc_t])
|
||||
])
|
|
@ -0,0 +1,815 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2009-2017 Cisco Systems, Inc. All rights reserved
|
||||
dnl Copyright (c) 2011-2012 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2017 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2018 FUJITSU LIMITED. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# OMPI_EXT
|
||||
#
|
||||
# configure the Interface Extensions [similar to MCA version]. Works hand in
|
||||
# hand with Open MPI's autogen.pl, requiring it's specially formatted lists
|
||||
# of frameworks, components, etc.
|
||||
#
|
||||
# USAGE:
|
||||
# OMPI_EXT()
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([OMPI_EXT],[
|
||||
dnl for OPAL_CONFIGURE_USER env variable
|
||||
AC_REQUIRE([OPAL_CONFIGURE_SETUP])
|
||||
|
||||
# Note that we do not build DSO's here -- we *only* build convenience
|
||||
# libraries that get slurped into higher-level libraries
|
||||
#
|
||||
# [default -- no option given] = No extensions built
|
||||
# --enable-mpi-ext=[,]*EXTENSION[,]*
|
||||
#
|
||||
AC_ARG_ENABLE(mpi-ext,
|
||||
AC_HELP_STRING([--enable-mpi-ext[=LIST]],
|
||||
[Comma-separated list of extensions that should be built. Possible values: ompi_mpiext_list. Example: "--enable-mpi-ext=foo,bar" will enable building the MPI extensions "foo" and "bar". If LIST is empty or the special value "all", then all available MPI extensions will be built (default: all).]))
|
||||
|
||||
# print some nice messages about what we're about to do...
|
||||
AC_MSG_CHECKING([for available MPI Extensions])
|
||||
AC_MSG_RESULT([ompi_mpiext_list])
|
||||
|
||||
AC_MSG_CHECKING([which MPI extension should be enabled])
|
||||
if test "$enable_mpi_ext" = "" || \
|
||||
test "$enable_mpi_ext" = "yes" || \
|
||||
test "$enable_mpi_ext" = "all"; then
|
||||
enable_mpi_ext=all
|
||||
msg="All Available Extensions"
|
||||
str="`echo ENABLE_EXT_ALL=1`"
|
||||
eval $str
|
||||
else
|
||||
ifs_save="$IFS"
|
||||
IFS="${IFS}$PATH_SEPARATOR,"
|
||||
msg=
|
||||
for item in $enable_mpi_ext; do
|
||||
type="`echo $item | cut -s -f1 -d-`"
|
||||
if test -z $type ; then
|
||||
type=$item
|
||||
fi
|
||||
str="`echo ENABLE_${type}=1 | sed s/-/_/g`"
|
||||
eval $str
|
||||
msg="$item $msg"
|
||||
done
|
||||
IFS="$ifs_save"
|
||||
fi
|
||||
AC_MSG_RESULT([$msg])
|
||||
unset msg
|
||||
|
||||
m4_ifdef([ompi_mpiext_list], [],
|
||||
[m4_fatal([Could not find MPI Extensions list. Aborting.])])
|
||||
|
||||
EXT_CONFIGURE
|
||||
])
|
||||
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# EXT_CONFIGURE
|
||||
#
|
||||
# USAGE:
|
||||
# EXT_CONFIGURE()
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([EXT_CONFIGURE],[
|
||||
outdir=ompi/include
|
||||
|
||||
# first create the output include directory
|
||||
mkdir -p $outdir
|
||||
|
||||
###############
|
||||
# C Bindings
|
||||
###############
|
||||
|
||||
# remove any previously generated #include files
|
||||
mpi_ext_h=$outdir/mpi-ext.h
|
||||
rm -f $mpi_ext_h
|
||||
|
||||
# Create the final mpi-ext.h file.
|
||||
cat > $mpi_ext_h <<EOF
|
||||
/*
|
||||
* \$HEADER\$
|
||||
*/
|
||||
|
||||
#ifndef OMPI_MPI_EXT_H
|
||||
#define OMPI_MPI_EXT_H 1
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define OMPI_HAVE_MPI_EXT 1
|
||||
|
||||
EOF
|
||||
|
||||
###############
|
||||
# mpif.h Bindings
|
||||
###############
|
||||
|
||||
# remove any previously generated #include files
|
||||
mpif_ext_h=$outdir/mpif-ext.h
|
||||
rm -f $mpif_ext_h
|
||||
|
||||
# Create the final mpif-ext.h file.
|
||||
cat > $mpif_ext_h <<EOF
|
||||
! -*- fortran -*-
|
||||
! \$HEADER\$
|
||||
!
|
||||
! *** THIS FILE IS AUTOMATICALLY GENERATED!
|
||||
! *** Any manual edits will be lost!
|
||||
!
|
||||
integer OMPI_HAVE_MPI_EXT
|
||||
parameter (OMPI_HAVE_MPI_EXT=1)
|
||||
!
|
||||
EOF
|
||||
|
||||
###############
|
||||
# "use mpi" Bindings
|
||||
###############
|
||||
|
||||
# Although Fortran module files are essentially compiled header
|
||||
# files, we don't create them in ompi/include, like we do for
|
||||
# mpi.h and mpif.h. Instead, we build them down in ompi/fortran,
|
||||
# when we build the rest of the Fortran modules. Indeed, in the
|
||||
# "use mpi" case, it needs some of the same internal modules that
|
||||
# the mpi_f08 module itself needs. So the mpi_f08_ext module has
|
||||
# to be built *after* the mpi_f08 module (so that all the internal
|
||||
# modules it needs are already built).
|
||||
|
||||
# remove any previously generated #include files
|
||||
outdir=ompi/mpi/fortran/mpiext-use-mpi
|
||||
mkdir -p $outdir
|
||||
mpiusempi_ext_h=$outdir/mpi-ext-module.F90
|
||||
rm -f $mpiusempi_ext_h
|
||||
|
||||
# Create the final mpiusempi-ext.h file.
|
||||
cat > $mpiusempi_ext_h <<EOF
|
||||
! -*- fortran -*-
|
||||
! \$HEADER\$
|
||||
!
|
||||
! *** THIS FILE IS AUTOMATICALLY GENERATED!
|
||||
! *** Any manual edits will be lost!
|
||||
!
|
||||
#include "ompi/mpi/fortran/configure-fortran-output.h"
|
||||
|
||||
module mpi_ext
|
||||
! Even though this is not a useful parameter (cannot be used as a
|
||||
! preprocessor catch) define it to keep the linker from complaining
|
||||
! during the build.
|
||||
integer OMPI_HAVE_MPI_EXT
|
||||
parameter (OMPI_HAVE_MPI_EXT=1)
|
||||
!
|
||||
EOF
|
||||
|
||||
# Make an AM conditional to see whether we're building the mpi_ext
|
||||
# module. Note that we only build it if we support the ignore-tkr
|
||||
# mpi module.
|
||||
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \
|
||||
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
|
||||
[OMPI_BUILD_FORTRAN_USEMPI_EXT=1],
|
||||
[OMPI_BUILD_FORTRAN_USEMPI_EXT=0])
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_EXT,
|
||||
[test $OMPI_BUILD_FORTRAN_USEMPI_EXT -eq 1])
|
||||
|
||||
###############
|
||||
# "use mpi_f08" Bindings
|
||||
###############
|
||||
|
||||
# See note above: we generate the mpi_f08_ext module in
|
||||
# ompi/mpi/fortran/mpiext-use-mpi-f08
|
||||
|
||||
# remove any previously generated #include files
|
||||
outdir=ompi/mpi/fortran/mpiext-use-mpi-f08
|
||||
mkdir -p $outdir
|
||||
mpiusempif08_ext_h=$outdir/mpi-f08-ext-module.F90
|
||||
rm -f $mpiusempif08_ext_h
|
||||
|
||||
# Create the final mpiusempi-ext.h file.
|
||||
cat > $mpiusempif08_ext_h <<EOF
|
||||
! -*- fortran -*-
|
||||
! \$HEADER\$
|
||||
!
|
||||
! *** THIS FILE IS AUTOMATICALLY GENERATED!
|
||||
! *** Any manual edits will be lost!
|
||||
!
|
||||
#include "ompi/mpi/fortran/configure-fortran-output.h"
|
||||
|
||||
module mpi_f08_ext
|
||||
! Even though this is not a useful parameter (cannot be used as a
|
||||
! preprocessor catch) define it to keep the linker from complaining
|
||||
! during the build.
|
||||
integer OMPI_HAVE_MPI_EXT
|
||||
parameter (OMPI_HAVE_MPI_EXT=1)
|
||||
!
|
||||
EOF
|
||||
|
||||
# Only build this mpi_f08_ext module if we're building the "use
|
||||
# mpi_f08" module
|
||||
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[OMPI_BUILD_FORTRAN_USEMPIF08_EXT=1],
|
||||
[OMPI_BUILD_FORTRAN_USEMPIF08_EXT=0])
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPIF08_EXT,
|
||||
[test $OMPI_BUILD_FORTRAN_USEMPIF08_EXT -eq 1])
|
||||
|
||||
# Make an AM conditional to see whether we're building either the
|
||||
# mpi_ext or mpi_f08_Ext modules.
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_OR_USEMPIF08_EXT,
|
||||
[test $OMPI_BUILD_FORTRAN_USEMPI_EXT -eq 1 || \
|
||||
test $OMPI_BUILD_FORTRAN_USEMPIF08_EXT -eq 1])
|
||||
|
||||
#
|
||||
# Process each component
|
||||
#
|
||||
|
||||
# remove any previously generated #include files
|
||||
outfile_real=ompi/mpiext/static-components.h
|
||||
outfile=$outfile_real.new
|
||||
rm -f $outfile $outfile.struct $outfile.extern
|
||||
$MKDIR_P ompi/mpiext
|
||||
touch $outfile.struct $outfile.extern
|
||||
|
||||
m4_foreach(extension, [ompi_mpiext_list],
|
||||
[m4_ifval(extension,
|
||||
[EXT_CONFIGURE_M4_CONFIG_COMPONENT(extension,
|
||||
[OMPI_MPIEXT_ALL],
|
||||
[OMPI_MPIEXT_C],
|
||||
[OMPI_MPIEXT_MPIFH],
|
||||
[OMPI_MPIEXT_USEMPI],
|
||||
[OMPI_MPIEXT_USEMPIF08])])])
|
||||
|
||||
###############
|
||||
# C Bindings
|
||||
###############
|
||||
# Create the final mpi-ext.h file.
|
||||
cat >> $mpi_ext_h <<EOF
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* OMPI_MPI_EXT_H */
|
||||
|
||||
EOF
|
||||
|
||||
###############
|
||||
# mpif.h Bindings
|
||||
###############
|
||||
# Create the final mpif-ext.h file.
|
||||
cat >> $mpif_ext_h <<EOF
|
||||
!
|
||||
EOF
|
||||
|
||||
###############
|
||||
# "use mpi" Bindings
|
||||
###############
|
||||
# Create the final mpiusempi-ext.h file.
|
||||
cat >> $mpiusempi_ext_h <<EOF
|
||||
!
|
||||
end module mpi_ext
|
||||
EOF
|
||||
|
||||
###############
|
||||
# "use mpi_f08" Bindings
|
||||
###############
|
||||
# Create the final mpiusempi-ext.h file.
|
||||
cat >> $mpiusempif08_ext_h <<EOF
|
||||
!
|
||||
end module mpi_f08_ext
|
||||
EOF
|
||||
|
||||
# Create the final .h file that will be included in the type's
|
||||
# top-level glue. This lists all the static components. We don't
|
||||
# need to do this for "common".
|
||||
if test "$2" != "common"; then
|
||||
cat > $outfile <<EOF
|
||||
/*
|
||||
* \$HEADER\$
|
||||
*/
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
`cat $outfile.extern`
|
||||
|
||||
const ompi_mpiext_component_t *ompi_mpiext_components[[]] = {
|
||||
`cat $outfile.struct`
|
||||
NULL
|
||||
};
|
||||
|
||||
#if defined(c_plusplus) || defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
EOF
|
||||
# Only replace the header file if a) it doesn't previously
|
||||
# exist, or b) the contents are different. Do this to not
|
||||
# trigger recompilation of certain .c files just because the
|
||||
# timestamp changed on $outfile_real (similar to the way AC
|
||||
# handles AC_CONFIG_HEADER files).
|
||||
diff $outfile $outfile_real > /dev/null 2>&1
|
||||
if test "$?" != "0"; then
|
||||
mv $outfile $outfile_real
|
||||
else
|
||||
rm -f $outfile
|
||||
fi
|
||||
fi
|
||||
rm -f $outfile.struct $outfile.extern
|
||||
|
||||
# We have all the results we need. Now put them in various
|
||||
# variables/defines so that others can see the results.
|
||||
|
||||
OMPI_EXT_MAKE_DIR_LIST(OMPI_MPIEXT_ALL_SUBDIRS, $OMPI_MPIEXT_ALL)
|
||||
|
||||
OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_C, $OMPI_MPIEXT_C, c, c)
|
||||
OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_MPIFH, $OMPI_MPIEXT_MPIFH, mpif-h, mpifh)
|
||||
OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_USEMPI, $OMPI_MPIEXT_USEMPI, use-mpi, usempi)
|
||||
OMPI_EXT_MAKE_LISTS(OMPI_MPIEXT_USEMPIF08, $OMPI_MPIEXT_USEMPIF08, use-mpi-f08, usempif08)
|
||||
|
||||
comps=`echo $OMPI_MPIEXT_C | sed -e 's/^[ \t]*//;s/[ \t]*$//;s/ /, /g'`
|
||||
AC_DEFINE_UNQUOTED([OMPI_MPIEXT_COMPONENTS], ["$comps"],
|
||||
[MPI Extensions included in libmpi])
|
||||
])
|
||||
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# EXT_CONFIGURE_M4_CONFIG_COMPONENT
|
||||
#
|
||||
#
|
||||
# USAGE:
|
||||
# EXT_CONFIGURE_M4_CONFIG_COMPONENT((1) component_name,
|
||||
# (2) all_components_variable,
|
||||
# (3) c_components_variable,
|
||||
# (4) mpifh_components_variable,
|
||||
# (5) usempi_components_variable,
|
||||
# (6) usempif08_components_variable)
|
||||
#
|
||||
# - component_name is a single, naked string (no prefix)
|
||||
# - all others are naked component names (e.g., "example"). If an
|
||||
# extension is named in that variable, it means that that extension
|
||||
# has bindings of that flavor.
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([EXT_CONFIGURE_M4_CONFIG_COMPONENT],[
|
||||
opal_show_subsubsubtitle "MPI Extension $1"
|
||||
|
||||
EXT_COMPONENT_BUILD_CHECK($1, [should_build=1], [should_build=0])
|
||||
|
||||
# try to configure the component
|
||||
m4_ifdef([OMPI_MPIEXT_$1_CONFIG], [],
|
||||
[m4_fatal([Could not find OMPI_MPIEXT_]$1[_CONFIG macro for ]$1[ component])])
|
||||
|
||||
OMPI_MPIEXT_$1_CONFIG([should_build=${should_build}], [should_build=0])
|
||||
|
||||
AS_IF([test $should_build -eq 1],
|
||||
[EXT_PROCESS_COMPONENT([$1], [$2], [$3], [$4], [$5], [$6])],
|
||||
[EXT_PROCESS_DEAD_COMPONENT([$1], [$2])])
|
||||
])
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# EXT_PROCESS_COMPONENT
|
||||
#
|
||||
# does all setup work for given component. It should be known before
|
||||
# calling that this component can build properly (and exists)
|
||||
#
|
||||
# USAGE:
|
||||
# EXT_CONFIGURE_ALL_CONFIG_COMPONENTS((1) component_name
|
||||
# (2) all_components_variable,
|
||||
# (3) c_components_variable,
|
||||
# (4) mpifh_components_variable,
|
||||
# (5) usempi_components_variable,
|
||||
# (6) usempif08_components_variable)
|
||||
#
|
||||
# C bindings are mandatory. Other bindings are optional / built if
|
||||
# they are found. Here's the files that the m4 expects:
|
||||
#
|
||||
#--------------------
|
||||
#
|
||||
# C:
|
||||
# - c/mpiext_<component>_c.h: is installed to
|
||||
# <includedir>/openmpi/mpiext/mpiext_<component>_c.h and is included in
|
||||
# mpi_ext.h
|
||||
# - c/libmpiext_<component>.la: convneience library slurped into libmpi.la
|
||||
#
|
||||
# mpi.f.h:
|
||||
# - mpif-h/mpiext_<component>_mpifh.h: is installed to
|
||||
# <includedir>openmpi/mpiext/mpiext_<component>_mpifh.h and is included mpi
|
||||
# mpif_ext.h
|
||||
# - mpif-h/libmpiext_<component>_mpifh.la: convenience library slurped
|
||||
# into libmpi_mpifh.la
|
||||
#
|
||||
# If the ..._mpifh.h file exists, it is assumed that "make all" will
|
||||
# build the .la file. And therefore we'll include full support for
|
||||
# the mpif.h bindings for this extension in OMPI.
|
||||
#
|
||||
#--------------------
|
||||
#
|
||||
# use mpi:
|
||||
# - use-mpi/mpiext_<component>_usempi.h: included in the mpi_ext module
|
||||
#
|
||||
# Only supported when the ignore-tkr mpi module is built (this
|
||||
# currently means: when you don't use gfortran).
|
||||
#
|
||||
# If the ..._usempi.h file exists, it is assumed that we'll include
|
||||
# full support for the mpi_ext bindings for this extension in OMPI.
|
||||
#
|
||||
# NO LIBRARY IS SUPPORTED FOR THE mpi MODULE BINDINGS! It is assumed
|
||||
# that all required symbols will be in the
|
||||
# libmpiext_<component>_mpifh.la library, and all that this set of
|
||||
# bindings does it give strong type checking to those subroutines.
|
||||
#
|
||||
#--------------------
|
||||
#
|
||||
# use mpi_f08:
|
||||
# - use-mpi-f08/mpiext_<component>_usempif08.h: included in the mpi_ext module
|
||||
# - use-mpi-f08/libmpiext_<component>_usempif08.la: convenience
|
||||
# library slurped into libmpi_usempif08.la
|
||||
#
|
||||
# Only supported when the non-descriptor-based mpi_f08 module is built
|
||||
# (this currently means: when you don't use gfortran).
|
||||
#
|
||||
# If the ..._usempif08.h file exists, it is assumed that "make all"
|
||||
# will build the .la file. And therefore we'll include full support
|
||||
# for the mpi_f08 bindings for this extension in OMPI.
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([EXT_PROCESS_COMPONENT],[
|
||||
component=$1
|
||||
|
||||
# Output pretty results
|
||||
AC_MSG_CHECKING([if MPI Extension $component can compile])
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
tmp[=]m4_translit([$1],[a-z],[A-Z])
|
||||
component_define="OMPI_HAVE_MPI_EXT_${tmp}"
|
||||
|
||||
###############
|
||||
# C Bindings
|
||||
###############
|
||||
test_header="${srcdir}/ompi/mpiext/${component}/c/mpiext_${component}_c.h"
|
||||
|
||||
AC_MSG_CHECKING([if MPI Extension $component has C bindings])
|
||||
|
||||
AS_IF([test ! -e "$test_header" && test ! -e "$test_header.in"],
|
||||
[ # There *must* be C bindings
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([C bindings for MPI extensions are required])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
AC_MSG_RESULT([yes (required)])
|
||||
|
||||
# Save the list of headers and convenience libraries that this
|
||||
# component will output
|
||||
$2="$$2 $component"
|
||||
$3="$$3 $component"
|
||||
|
||||
# JMS Where is this needed?
|
||||
EXT_C_HEADERS="$EXT_C_HEADERS mpiext/c/mpiext_${component}_c.h"
|
||||
|
||||
component_header="mpiext_${component}_c.h"
|
||||
|
||||
cat >> $mpi_ext_h <<EOF
|
||||
/* Enabled Extension: $component */
|
||||
#define $component_define 1
|
||||
#include "openmpi/mpiext/$component_header"
|
||||
|
||||
EOF
|
||||
|
||||
###############
|
||||
# mpif.h bindings
|
||||
###############
|
||||
#
|
||||
# Test if this extension has mpif.h bindings
|
||||
# If not, skip this step.
|
||||
#
|
||||
test_header="${srcdir}/ompi/mpiext/$component/mpif-h/mpiext_${component}_mpifh.h"
|
||||
enabled_mpifh=0
|
||||
|
||||
AC_MSG_CHECKING([if MPI Extension $component has mpif.h bindings])
|
||||
|
||||
if test -e "$test_header" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
enabled_mpifh=1
|
||||
|
||||
EXT_MPIFH_HEADERS="$EXT_MPIFH_HEADERS mpiext/mpiext_${component}_mpifh.h"
|
||||
$4="$$4 $component"
|
||||
|
||||
# Per https://github.com/open-mpi/ompi/pull/6030, we will end
|
||||
# up putting a user-visible Fortran "include" statement in the
|
||||
# installed mpif-ext.h file, and we therefore have to ensure
|
||||
# that the total length of the line is <=72 characters. Doing
|
||||
# a little math here:
|
||||
#
|
||||
# leading indent spaces: 6 chars
|
||||
# "include '": 9 chars
|
||||
# "openmpi/mpiext/mpiext_NAME_mpifh.h": without NAME, 30 chars
|
||||
# trailing "'": 1 char
|
||||
#
|
||||
# 6+9+30+1 = 46 chars overhead.
|
||||
# 72-46 = 26 characters left for NAME.
|
||||
#
|
||||
# It would be exceedingly unusual to have an MPI extension
|
||||
# name > 26 characters. But just in case, put a check here
|
||||
# to make sure: error out if the MPI extension name is > 26
|
||||
# characters (because otherwise it'll just be a really weird /
|
||||
# hard to diagnose compile error when a user tries to compile
|
||||
# a Fortran MPI application that includes `mpif-ext.h`).
|
||||
len=`echo $component | wc -c`
|
||||
result=`expr $len \> 26`
|
||||
AS_IF([test $result -eq 1],
|
||||
[AC_MSG_WARN([MPI extension name too long: $component])
|
||||
AC_MSG_WARN([For esoteric reasons, MPI Extensions with mpif.h bindings must have a name that is <= 26 characters])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
component_header="mpiext_${component}_mpifh.h"
|
||||
|
||||
cat >> $mpif_ext_h <<EOF
|
||||
!
|
||||
! Enabled Extension: $component
|
||||
!
|
||||
integer $component_define
|
||||
parameter ($component_define=1)
|
||||
|
||||
include 'openmpi/mpiext/$component_header'
|
||||
|
||||
EOF
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
cat >> $mpif_ext_h <<EOF
|
||||
!
|
||||
! Enabled Extension: $component
|
||||
! No mpif.h bindings available
|
||||
!
|
||||
integer $component_define
|
||||
parameter ($component_define=0)
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
###############
|
||||
# "use mpi" bindings
|
||||
###############
|
||||
#
|
||||
# Test if this extension has "use mpi" bindings
|
||||
# If not, skip this step.
|
||||
#
|
||||
test_header="${srcdir}/ompi/mpiext/$component/use-mpi/mpiext_${component}_usempi.h"
|
||||
|
||||
AC_MSG_CHECKING([if MPI Extension $component has "use mpi" bindings])
|
||||
|
||||
if test -e "$test_header" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
EXT_USEMPI_HEADERS="$EXT_USEMPI_HEADERS mpiext/$component/use-mpi/mpiext_${component}_usempi.h"
|
||||
$5="$$5 $component"
|
||||
component_header="mpiext_${component}_usempi.h"
|
||||
|
||||
cat >> $mpiusempi_ext_h <<EOF
|
||||
!
|
||||
! Enabled Extension: $component
|
||||
!
|
||||
EOF
|
||||
#
|
||||
# Include the mpif.h header if it is available. Cannot do
|
||||
# this from inside the usempi.h since, for VPATH builds, the
|
||||
# srcdir is needed to find the header.
|
||||
#
|
||||
if test "$enabled_mpifh" = 1; then
|
||||
mpifh_component_header="mpiext_${component}_mpifh.h"
|
||||
cat >> $mpiusempi_ext_h <<EOF
|
||||
#include "${srcdir}/ompi/mpiext/$component/mpif-h/$mpifh_component_header"
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat >> $mpiusempi_ext_h <<EOF
|
||||
#include "${srcdir}/ompi/mpiext/$component/use-mpi/$component_header"
|
||||
|
||||
EOF
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
cat >> $mpiusempi_ext_h <<EOF
|
||||
!
|
||||
! Enabled Extension: $component
|
||||
! No "use mpi" bindings available
|
||||
!
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
###############
|
||||
# "use mpi_f08" bindings
|
||||
###############
|
||||
#
|
||||
# Test if this extension has "use mpi_f08" bindings
|
||||
# If not, skip this step.
|
||||
#
|
||||
test_header="${srcdir}/ompi/mpiext/$component/use-mpi-f08/mpiext_${component}_usempif08.h"
|
||||
|
||||
AC_MSG_CHECKING([if MPI Extension $component has "use mpi_f08" bindings])
|
||||
|
||||
if test -e "$test_header" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
EXT_USEMPIF08_HEADERS="$EXT_USEMPIF08_HEADERS mpiext/$component/use-mpi-f08/mpiext_${component}_usempif08.h"
|
||||
$6="$$6 $component"
|
||||
|
||||
component_header="mpiext_${component}_usempif08.h"
|
||||
|
||||
cat >> $mpiusempif08_ext_h <<EOF
|
||||
!
|
||||
! Enabled Extension: $component
|
||||
!
|
||||
EOF
|
||||
#
|
||||
# Include the mpif.h header if it is available. Cannot do
|
||||
# this from inside the usempif08.h since, for VPATH builds,
|
||||
# the srcdir is needed to find the header.
|
||||
#
|
||||
if test "$enabled_mpifh" = 1; then
|
||||
mpifh_component_header="mpiext_${component}_mpifh.h"
|
||||
cat >> $mpiusempif08_ext_h <<EOF
|
||||
#include "${srcdir}/ompi/mpiext/$component/mpif-h/$mpifh_component_header"
|
||||
EOF
|
||||
fi
|
||||
|
||||
cat >> $mpiusempif08_ext_h <<EOF
|
||||
#include "${srcdir}/ompi/mpiext/$component/use-mpi-f08/$component_header"
|
||||
|
||||
EOF
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
|
||||
cat >> $mpiusempif08_ext_h <<EOF
|
||||
!
|
||||
! Enabled Extension: $component
|
||||
! No "use mpi_f08" bindings available
|
||||
!
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
m4_ifdef([OMPI_MPIEXT_]$1[_NEED_INIT],
|
||||
[echo "extern const ompi_mpiext_component_t ompi_mpiext_${component};" >> $outfile.extern
|
||||
echo " &ompi_mpiext_${component}, " >> $outfile.struct])
|
||||
|
||||
# now add the flags that were set in the environment variables
|
||||
# framework_component_FOO (for example, the flags set by
|
||||
# m4_configure components)
|
||||
m4_foreach(flags, [LDFLAGS, LIBS],
|
||||
[AS_IF([test "$mpiext_$1_WRAPPER_EXTRA_]flags[" = ""],
|
||||
[OPAL_FLAGS_APPEND_UNIQ([ompi_mca_wrapper_extra_]m4_tolower(flags), [$mpiext_$1_]flags)],
|
||||
[OPAL_FLAGS_APPEND_UNIQ([ompi_mca_wrapper_extra_]m4_tolower(flags), [$mpiext_$1_WRAPPER_EXTRA_]flags)])
|
||||
])
|
||||
|
||||
AS_IF([test "$mpiext_$1_WRAPPER_EXTRA_CPPFLAGS" != ""],
|
||||
[OPAL_FLAGS_APPEND_UNIQ([ompi_mca_wrapper_extra_cppflags], [$mpiext_$1_WRAPPER_EXTRA_CPPFLAGS])])
|
||||
])
|
||||
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# EXT_PROCESS_DEAD_COMPONENT
|
||||
#
|
||||
# process a component that can not be built. Do the last minute checks
|
||||
# to make sure the user isn't doing something stupid.
|
||||
#
|
||||
# USAGE:
|
||||
# EXT_PROCESS_DEAD_COMPONENT((1) component_name,
|
||||
# (2) all_components_variable)
|
||||
#
|
||||
# NOTE: component_name will not be determined until run time.
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([EXT_PROCESS_DEAD_COMPONENT],[
|
||||
AC_MSG_CHECKING([if MPI Extension $1 can compile])
|
||||
|
||||
# Need to add this component to the "all" list so that it is
|
||||
# included in DIST SUBDIRS
|
||||
$2="$$2 $1"
|
||||
|
||||
AC_MSG_RESULT([no])
|
||||
])
|
||||
|
||||
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# EXT_COMPONENT_BUILD_CHECK
|
||||
#
|
||||
# checks the standard rules of component building to see if the
|
||||
# given component should be built.
|
||||
#
|
||||
# USAGE:
|
||||
# EXT_COMPONENT_BUILD_CHECK(component,
|
||||
# action-if-build, action-if-not-build)
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([EXT_COMPONENT_BUILD_CHECK],[
|
||||
AC_REQUIRE([AC_PROG_GREP])
|
||||
|
||||
component=$1
|
||||
component_path="$srcdir/ompi/mpiext/$component"
|
||||
want_component=0
|
||||
|
||||
# build if:
|
||||
# - the component type is direct and we are that component
|
||||
# - there is no ompi_ignore file
|
||||
# - there is an ompi_ignore, but there is an empty ompi_unignore
|
||||
# - there is an ompi_ignore, but username is in ompi_unignore
|
||||
if test -d $component_path ; then
|
||||
# decide if we want the component to be built or not. This
|
||||
# is spread out because some of the logic is a little complex
|
||||
# and test's syntax isn't exactly the greatest. We want to
|
||||
# build the component by default.
|
||||
want_component=1
|
||||
if test -f $component_path/.ompi_ignore ; then
|
||||
# If there is an ompi_ignore file, don't build
|
||||
# the component. Note that this decision can be
|
||||
# overridden by the unignore logic below.
|
||||
want_component=0
|
||||
fi
|
||||
if test -f $component_path/.ompi_unignore ; then
|
||||
# if there is an empty ompi_unignore, that is
|
||||
# equivalent to having your userid in the unignore file.
|
||||
# If userid is in the file, unignore the ignore file.
|
||||
if test ! -s $component_path/.ompi_unignore ; then
|
||||
want_component=1
|
||||
elif test ! -z "`$GREP $OPAL_CONFIGURE_USER $component_path/.ompi_unignore`" ; then
|
||||
want_component=1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# if we asked for everything, then allow it to build if able
|
||||
str="ENABLED_COMPONENT_CHECK=\$ENABLE_EXT_ALL"
|
||||
eval $str
|
||||
if test ! "$ENABLED_COMPONENT_CHECK" = "1" ; then
|
||||
# if we were explicitly disabled, don't build :)
|
||||
str="ENABLED_COMPONENT_CHECK=\$ENABLE_${component}"
|
||||
eval $str
|
||||
if test ! "$ENABLED_COMPONENT_CHECK" = "1" ; then
|
||||
want_component=0
|
||||
fi
|
||||
fi
|
||||
|
||||
AS_IF([test "$want_component" = "1"], [$2], [$3])
|
||||
])
|
||||
|
||||
|
||||
# OMPI_EXT_MAKE_DIR_LIST(subst'ed variable, shell list)
|
||||
#
|
||||
# Prefix every extension name with "mpiext/" and AC subst it.
|
||||
# -------------------------------------------------------------------------
|
||||
AC_DEFUN([OMPI_EXT_MAKE_DIR_LIST],[
|
||||
$1=
|
||||
for item in $2 ; do
|
||||
$1="$$1 mpiext/$item"
|
||||
done
|
||||
AC_SUBST($1)
|
||||
])
|
||||
|
||||
# OMPI_EXT_MAKE_LISTS((1) subst'ed variable prefix,
|
||||
# (2) shell list,
|
||||
# (3) bindings dir name,
|
||||
# (4) bindings suffix)
|
||||
#
|
||||
# Prefix every extension name with "mpiext/".
|
||||
# -------------------------------------------------------------------------
|
||||
AC_DEFUN([OMPI_EXT_MAKE_LISTS],[
|
||||
# Make the directory list
|
||||
tmp=
|
||||
for item in $2 ; do
|
||||
tmp="$tmp mpiext/$item/$3"
|
||||
done
|
||||
$1_DIRS=$tmp
|
||||
AC_SUBST($1_DIRS)
|
||||
|
||||
# Make the list of libraries
|
||||
tmp=
|
||||
for item in $2 ; do
|
||||
tmp="$tmp "'$(top_builddir)'"/ompi/mpiext/$item/$3/libmpiext_${item}_$4.la"
|
||||
done
|
||||
$1_LIBS=$tmp
|
||||
AC_SUBST($1_LIBS)
|
||||
])
|
|
@ -0,0 +1,245 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2014 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
# Copyright (c) 2014-2017 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# Copyright (c) 2015 Intel, Inc. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
AC_DEFUN([OMPI_FIND_MPI_AINT_COUNT_OFFSET],[
|
||||
_OMPI_FIND_MPI_AINT_TYPE
|
||||
_OMPI_FIND_MPI_COUNT_TYPE
|
||||
_OMPI_FIND_MPI_OFFSET_TYPE
|
||||
|
||||
if test "$ompi_fortran_happy" = "1" && \
|
||||
test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS"; then
|
||||
_OMPI_FIND_MPI_INTEGER_KIND
|
||||
_OMPI_FIND_MPI_ADDRESS_KIND
|
||||
_OMPI_FIND_MPI_COUNT_KIND
|
||||
_OMPI_FIND_MPI_OFFSET_KIND
|
||||
fi
|
||||
])
|
||||
|
||||
dnl #########################################################################
|
||||
|
||||
AC_DEFUN([_OMPI_FIND_MPI_AINT_TYPE], [
|
||||
# MPI_Aint type is ptrdiff_t; just use that.
|
||||
AC_MSG_CHECKING([for type of MPI_Aint])
|
||||
|
||||
MPI_AINT_TYPE=ptrdiff_t
|
||||
# Get the size of this type; we'll need it to figure out Fortran's
|
||||
# MPI_ADDRESS_KIND, later
|
||||
MPI_AINT_SIZE=$ac_cv_sizeof_ptrdiff_t
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_AINT_TYPE, [$MPI_AINT_TYPE],
|
||||
[Type of MPI_Aint])
|
||||
|
||||
AC_MSG_RESULT([$MPI_AINT_TYPE (size: $MPI_AINT_SIZE)])
|
||||
])
|
||||
|
||||
dnl #########################################################################
|
||||
|
||||
AC_DEFUN([_OMPI_FIND_MPI_COUNT_TYPE], [
|
||||
# Find the type of MPI_Count. Per MPI-3.0 2.5.8, it needs to be
|
||||
# as least as large as an int, MPI_Aint, and MPI_Offset (we'll
|
||||
# define MPI_Offset later to be the same as an MPI_Count).
|
||||
|
||||
# Note, however, that per
|
||||
# https://svn.open-mpi.org/trac/ompi/ticket/4205, MPI_Count cannot
|
||||
# be larger than a size_t (e.g., if you're compiling in 32 bit
|
||||
# more on a 64 bit platform, long long will be 8 bytes, but size_t
|
||||
# will only be 4 bytes). The entire BTL, PML, and convertor
|
||||
# infrastructure rely on sizeof(MPI_Count) being <=
|
||||
# sizeof(size_t). So artificially limit the size of MPI_Count, if
|
||||
# necessary.
|
||||
|
||||
# Also note: do not search for int64_t or int32_t, because using
|
||||
# these types mean that we would need to include <stdint.h> in
|
||||
# mpi.h, which we probably shouldn't do.
|
||||
|
||||
# Finally, note that MPI_Count has an impact on the extent of a
|
||||
# datatype, extent defined by the MPI standard as an MPI_Aint.
|
||||
# This MPI_Aint is also the largest different between two memory
|
||||
# pointers -- the well-known ptrdiff_t. There *are* systems where
|
||||
# the address space is 32 bit but the filesystem space is 64 bit
|
||||
# (e.g., BlueGene), and therefore MPI_Aint is 32 bit and
|
||||
# MPI_Offset (and therefore MPI_Count) is 64 bit. Open MPI
|
||||
# doesn't currently support this configuration -- re-tooling in
|
||||
# the convertor/PML/BML/BTL will be necessary before that can work
|
||||
# properly.
|
||||
|
||||
# Keep in mind, however, that while ptrdiff_t and size_t represent
|
||||
# similar concepts (length or displacement in memory), one is
|
||||
# slightly larger than the other (one is unsigned and the other
|
||||
# signed) and there is no requirement for them to be of the same
|
||||
# width. On systems with non-monolithic memory space, the scheme
|
||||
# we use below may not work. On systems with non-monolithic
|
||||
# memory space, the scheme we use below may not work. ...but such
|
||||
# systems are pretty rare today.
|
||||
|
||||
MPI_COUNT_TYPE=unknonwn
|
||||
AC_MSG_CHECKING([for type of MPI_Count])
|
||||
if test $ac_cv_type_long_long = yes && \
|
||||
test $ac_cv_sizeof_long_long -le $ac_cv_sizeof_size_t && \
|
||||
test $ac_cv_sizeof_long_long -ge $MPI_AINT_SIZE; then
|
||||
MPI_COUNT_TYPE="long long"
|
||||
MPI_COUNT_DATATYPE=MPI_LONG_LONG
|
||||
MPI_COUNT_SIZE=$ac_cv_sizeof_long_long
|
||||
elif test $ac_cv_sizeof_long -le $ac_cv_sizeof_size_t && \
|
||||
test $ac_cv_sizeof_long -ge $MPI_AINT_SIZE; then
|
||||
MPI_COUNT_TYPE=long
|
||||
MPI_COUNT_DATATYPE=MPI_LONG
|
||||
MPI_COUNT_SIZE=$ac_cv_sizeof_long
|
||||
elif test $ac_cv_sizeof_int -le $ac_cv_sizeof_size_t && \
|
||||
test $ac_cv_sizeof_int -ge $MPI_AINT_SIZE; then
|
||||
MPI_COUNT_TYPE=int
|
||||
MPI_COUNT_DATATYPE=MPI_INT
|
||||
MPI_COUNT_SIZE=$ac_cv_sizeof_int
|
||||
fi
|
||||
|
||||
if test "$MPI_COUNT_TYPE" = "unknown"; then
|
||||
AC_MSG_RESULT([not found])
|
||||
AC_MSG_WARN([*** Unable to find a good type for MPI_Count])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
if test $MPI_COUNT_SIZE -eq 8 ; then
|
||||
MPI_COUNT_MAX="0x7fffffffffffffffll"
|
||||
elif test $MPI_COUNT_SIZE -eq 4 ; then
|
||||
MPI_COUNT_MAX="0x7fffffffl"
|
||||
elif test $MPI_COUNT_SIZE -eq 2 ; then
|
||||
MPI_COUNT_MAX="0x7fff"
|
||||
else
|
||||
AC_MSG_RESULT([$MPI_COUNT_TYPE (size: $MPI_COUNT_SIZE)])
|
||||
AC_MSG_WARN([*** Configure cannot handle this size -- contact Open MPI developers])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_COUNT_SIZE, $MPI_COUNT_SIZE,
|
||||
[Size of the MPI_Count datatype])
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_COUNT_TYPE, $MPI_COUNT_TYPE,
|
||||
[Type of the MPI_Count datatype])
|
||||
AC_DEFINE_UNQUOTED(MPI_COUNT_MAX, $MPI_COUNT_MAX,
|
||||
[Maximum value for an MPI_Count])
|
||||
|
||||
AC_MSG_RESULT([$MPI_COUNT_TYPE (size: $MPI_COUNT_SIZE)])
|
||||
])
|
||||
|
||||
dnl #########################################################################
|
||||
|
||||
AC_DEFUN([_OMPI_FIND_MPI_OFFSET_TYPE], [
|
||||
# Just make MPI_Offset be the same as MPI_Count
|
||||
AC_MSG_CHECKING([for type of MPI_Offset])
|
||||
|
||||
MPI_OFFSET_TYPE=$MPI_COUNT_TYPE
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_TYPE, $MPI_OFFSET_TYPE,
|
||||
[Type of MPI_Offset])
|
||||
MPI_OFFSET_SIZE=$MPI_COUNT_SIZE
|
||||
AC_DEFINE_UNQUOTED(OMPI_MPI_OFFSET_SIZE, $MPI_OFFSET_SIZE,
|
||||
[Size of the MPI_Offset])
|
||||
AC_MSG_RESULT([$MPI_COUNT_TYPE (size: $MPI_OFFSET_SIZE)])
|
||||
|
||||
AC_MSG_CHECKING([for an MPI datatype for MPI_Offset])
|
||||
MPI_OFFSET_DATATYPE=$MPI_COUNT_DATATYPE
|
||||
AC_DEFINE_UNQUOTED(OMPI_OFFSET_DATATYPE, $MPI_OFFSET_DATATYPE,
|
||||
[MPI datatype corresponding to MPI_Offset])
|
||||
AC_MSG_RESULT([$MPI_OFFSET_DATATYPE])
|
||||
])
|
||||
|
||||
dnl #########################################################################
|
||||
|
||||
AC_DEFUN([_OMPI_FIND_MPI_INTEGER_KIND], [
|
||||
# Get the kind value for Fortran MPI_INTEGER_KIND (corresponding
|
||||
# to whatever is the same size as a F77 INTEGER -- for the
|
||||
# most-likely-will-never-occur case where F77 INTEGER is smaller
|
||||
# than an F90 INTEGER; see MPI-2 4.12.6.5. As with OMPI
|
||||
# FORTRAN_CHECK, use the official BIND(C) KIND names (see comment
|
||||
# in fortran_check.m4).
|
||||
AC_MSG_CHECKING([for MPI_INTEGER_KIND])
|
||||
if test $OMPI_SIZEOF_FORTRAN_INTEGER -eq 2; then
|
||||
OMPI_MPI_INTEGER_KIND=$OMPI_FORTRAN_C_INT16_T_KIND
|
||||
elif test $OMPI_SIZEOF_FORTRAN_INTEGER -eq 4; then
|
||||
OMPI_MPI_INTEGER_KIND=$OMPI_FORTRAN_C_INT32_T_KIND
|
||||
elif test $OMPI_SIZEOF_FORTRAN_INTEGER -eq 8; then
|
||||
OMPI_MPI_INTEGER_KIND=$OMPI_FORTRAN_C_INT64_T_KIND
|
||||
elif test $OMPI_SIZEOF_FORTRAN_INTEGER -eq 16; then
|
||||
AC_MSG_ERROR([Cannot support Fortran MPI_INTEGER_KIND!])
|
||||
fi
|
||||
AC_SUBST(OMPI_MPI_INTEGER_KIND)
|
||||
AC_MSG_RESULT([$OMPI_MPI_INTEGER_KIND])
|
||||
])
|
||||
|
||||
dnl #########################################################################
|
||||
|
||||
AC_DEFUN([_OMPI_FIND_MPI_ADDRESS_KIND], [
|
||||
# Get the kind value for Fortran MPI_ADDRESS_KIND (corresponding
|
||||
# to whatever is big enough to hold MPI_Aint).
|
||||
AC_MSG_CHECKING([for MPI_ADDRESS_KIND])
|
||||
if test $MPI_AINT_SIZE -eq 2 ; then
|
||||
OMPI_MPI_ADDRESS_KIND=$OMPI_FORTRAN_C_INT16_T_KIND
|
||||
elif test $MPI_AINT_SIZE -eq 4 ; then
|
||||
OMPI_MPI_ADDRESS_KIND=$OMPI_FORTRAN_C_INT32_T_KIND
|
||||
elif test $MPI_AINT_SIZE -eq 8 ; then
|
||||
OMPI_MPI_ADDRESS_KIND=$OMPI_FORTRAN_C_INT64_T_KIND
|
||||
elif test $MPI_AINT_SIZE -eq 16 ; then
|
||||
AC_MSG_ERROR([Cannot support Fortran MPI_ADDRESS_KIND!])
|
||||
fi
|
||||
AC_SUBST(OMPI_MPI_ADDRESS_KIND)
|
||||
AC_MSG_RESULT([$OMPI_MPI_ADDRESS_KIND])
|
||||
])
|
||||
|
||||
dnl #########################################################################
|
||||
|
||||
AC_DEFUN([_OMPI_FIND_MPI_COUNT_KIND], [
|
||||
# Get the kind value for Fortran MPI_COUNT_KIND (corresponding to
|
||||
# whatever is big enough to hold an MPI_Count)
|
||||
AC_MSG_CHECKING([for MPI_COUNT_KIND])
|
||||
if test $MPI_COUNT_SIZE -eq 2 ; then
|
||||
OMPI_MPI_COUNT_KIND=$OMPI_FORTRAN_C_INT16_T_KIND
|
||||
elif test $MPI_COUNT_SIZE -eq 4 ; then
|
||||
OMPI_MPI_COUNT_KIND=$OMPI_FORTRAN_C_INT32_T_KIND
|
||||
elif test $MPI_COUNT_SIZE -eq 8 ; then
|
||||
OMPI_MPI_COUNT_KIND=$OMPI_FORTRAN_C_INT64_T_KIND
|
||||
elif test $MPI_COUNT_SIZE -eq 16 ; then
|
||||
AC_MSG_ERROR([Cannot support Fortran MPI_COUNT_KIND!])
|
||||
fi
|
||||
AC_SUBST(OMPI_MPI_COUNT_KIND)
|
||||
AC_MSG_RESULT([$OMPI_MPI_COUNT_KIND])
|
||||
])
|
||||
|
||||
dnl #########################################################################
|
||||
|
||||
AC_DEFUN([_OMPI_FIND_MPI_OFFSET_KIND], [
|
||||
# Get the kind value for Fortran MPI_OFFSET_KIND (corresponding to
|
||||
# whatever is big enough to hold an MPI_Offset)
|
||||
AC_MSG_CHECKING([for MPI_OFFSET_KIND])
|
||||
if test $MPI_OFFSET_SIZE -eq 2 ; then
|
||||
OMPI_MPI_OFFSET_KIND=$OMPI_FORTRAN_C_INT16_T_KIND
|
||||
elif test $MPI_OFFSET_SIZE -eq 4 ; then
|
||||
OMPI_MPI_OFFSET_KIND=$OMPI_FORTRAN_C_INT32_T_KIND
|
||||
elif test $MPI_OFFSET_SIZE -eq 8 ; then
|
||||
OMPI_MPI_OFFSET_KIND=$OMPI_FORTRAN_C_INT64_T_KIND
|
||||
elif test $MPI_OFFSET_SIZE -eq 16 ; then
|
||||
AC_MSG_ERROR([Cannot support Fortran MPI_OFFSET_KIND!])
|
||||
fi
|
||||
AC_SUBST(OMPI_MPI_OFFSET_KIND)
|
||||
AC_MSG_RESULT([$OMPI_MPI_OFFSET_KIND])
|
||||
])
|
|
@ -0,0 +1,203 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
|
||||
# OMPI_FORTRAN_CHECK(Fortran type, c type required, types to search,
|
||||
# expected size, define ompi_fortran_<foo>_t or not))
|
||||
#----------------------------------------------------------
|
||||
# Check Fortran type, including:
|
||||
# - whether compiler supports or not
|
||||
# - size of type
|
||||
# - equal to expected size
|
||||
# - alignment
|
||||
# - associated C type
|
||||
#
|
||||
# types to search is a comma-seperated list of values
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK], [
|
||||
OPAL_VAR_SCOPE_PUSH([ofc_have_type ofc_type_size ofc_type_alignment ofc_c_type ofc_expected_size])
|
||||
|
||||
ofc_expected_size=$4
|
||||
ofc_define_type=$5
|
||||
ofc_have_type=0
|
||||
ofc_type_size=$ac_cv_sizeof_int
|
||||
ofc_type_alignment=$ac_cv_sizeof_int
|
||||
ofc_c_type=ompi_fortran_bogus_type_t
|
||||
ofc_type_kind=0
|
||||
|
||||
# Only check if we actually want the Fortran bindings / have a
|
||||
# Fortran compiler. This allows us to call this macro, even if
|
||||
# there is no Fortran compiler. If we have no Fortran compiler,
|
||||
# then just set a bunch of defaults.
|
||||
if test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS; then
|
||||
OMPI_FORTRAN_CHECK_TYPE([$1], [ofc_have_type=1], [ofc_have_type=0])
|
||||
else
|
||||
AC_MSG_CHECKING([if Fortran compiler supports $1])
|
||||
AC_MSG_RESULT([skipped])
|
||||
fi
|
||||
|
||||
if test "$ofc_have_type" = "1"; then
|
||||
# What is the size of this type?
|
||||
|
||||
# NOTE: Some Fortran compilers actually will return that a
|
||||
# type exists even if it doesn't support it -- the compiler
|
||||
# will automatically convert the unsupported type to a type
|
||||
# that it *does* support. For example, if you try to use
|
||||
# INTEGER*16 and the compiler doesn't support it, it may well
|
||||
# automatically convert it to INTEGER*8 for you (!). So we
|
||||
# have to check the actual size of the type once we determine
|
||||
# that the compiler doesn't error if we try to use it
|
||||
# (i.e,. the compiler *might* support that type). If the size
|
||||
# doesn't match the expected size, then the compiler doesn't
|
||||
# really support it.
|
||||
OMPI_FORTRAN_GET_SIZEOF([], [$1], [ofc_type_size])
|
||||
if test "$ofc_expected_size" != "-1" && test "$ofc_type_size" != "$ofc_expected_size"; then
|
||||
AC_MSG_WARN([*** Fortran $1 does not have expected size!])
|
||||
AC_MSG_WARN([*** Expected $ofc_expected_size, got $ofc_type_size])
|
||||
AC_MSG_WARN([*** Disabling MPI support for Fortran $1])
|
||||
ofc_have_type=0
|
||||
else
|
||||
# Look for a corresponding C type (will abort by itself if the
|
||||
# type isn't found and we need it)
|
||||
ofc_c_type=
|
||||
m4_ifval([$3], [OPAL_FIND_TYPE([$1], [$3], [$2], [$ofc_type_size], [ofc_c_type])
|
||||
if test -z "$ofc_c_type" ; then
|
||||
ofc_have_type=0
|
||||
fi])
|
||||
|
||||
# Get the alignment of the type
|
||||
if test "$ofc_have_type" = "1"; then
|
||||
OMPI_FORTRAN_GET_ALIGNMENT([$1], [ofc_type_alignment])
|
||||
|
||||
# Add it to the relevant list of types found
|
||||
if test "$ofc_expected_size" != "-1"; then
|
||||
ofc_letter=m4_translit(m4_bpatsubst($1, [^\(.\).+], [[\1]]), [a-z], [A-Z])
|
||||
ofc_str="OMPI_FORTRAN_${ofc_letter}KINDS=\"\$OMPI_FORTRAN_${ofc_letter}KINDS $ofc_type_size \""
|
||||
eval $ofc_str
|
||||
fi
|
||||
fi
|
||||
|
||||
# Get the kind of the type. We do this by looking at the
|
||||
# Fortran type's corresponding C type (which we figured
|
||||
# out above). Then we look a the official BIND(C) KIND
|
||||
# type for that type. The official BIND(C) types were
|
||||
# taken from table 15.2 of the Fortran 2008 standard,
|
||||
# published on 6 October as ISO/IEC 1539-1:2010 (this is
|
||||
# not a free document). A copy of this table is in the
|
||||
# file ompi/mpi/fortran/c_to_integer_kind_mapping.pdf.
|
||||
|
||||
# NOTE: Some of the values of these C_* constants *may be
|
||||
# negative* if the compiler doesn't support them. We have
|
||||
# already verified that both the Fortran and the C types
|
||||
# both exist. However, the compiler may still have -1 for
|
||||
# the C_<foo> constants if the C type is not the same
|
||||
# format as its corresponding Fortran type (e.g., Absoft's
|
||||
# "REAL*16" and "long double" are the same size, but not
|
||||
# the same format -- so the compiler is allowed to define
|
||||
# C_LONG_DOUBLE to -1).
|
||||
|
||||
AC_MSG_CHECKING([for corresponding KIND value of $1])
|
||||
case "$ofc_c_type" in
|
||||
char) ofc_type_kind=C_SIGNED_CHAR ;;
|
||||
double) ofc_type_kind=C_DOUBLE ;;
|
||||
float) ofc_type_kind=C_FLOAT ;;
|
||||
int) ofc_type_kind=C_INT ;;
|
||||
int16_t) ofc_type_kind=C_INT16_T ;;
|
||||
int32_t) ofc_type_kind=C_INT32_T ;;
|
||||
int64_t) ofc_type_kind=C_INT64_T ;;
|
||||
int8_t) ofc_type_kind=C_INT8_T ;;
|
||||
long) ofc_type_kind=C_LONG ;;
|
||||
long*double) ofc_type_kind=C_LONG_DOUBLE ;;
|
||||
long*long) ofc_type_kind=C_LONG_LONG ;;
|
||||
short) ofc_type_kind=C_SHORT ;;
|
||||
float*_Complex) ofc_type_kind=C_FLOAT_COMPLEX ;;
|
||||
double*_Complex) ofc_type_kind=C_DOUBLE_COMPLEX ;;
|
||||
long*double*_Complex) ofc_type_kind=C_LONG_DOUBLE_COMPLEX ;;
|
||||
*)
|
||||
# Skip types like "DOUBLE PRECISION"
|
||||
;;
|
||||
esac
|
||||
AS_IF([test "$ofc_type_kind" != ""],
|
||||
[AC_MSG_RESULT([$ofc_type_kind])],
|
||||
[AC_MSG_RESULT([<skipped>])])
|
||||
|
||||
# See if the value is -1. If so, then just say we don't
|
||||
# have a match. If the compiler doesn't support
|
||||
# ISO_C_BINDING, then we'll just fall back to a default
|
||||
# kind and hope for the best. :-\
|
||||
OMPI_FORTRAN_GET_KIND_VALUE([$ofc_type_kind], 4, [ofc_type_kind_value])
|
||||
AS_IF([test $ofc_type_kind_value -le 0],
|
||||
[ofc_have_type=0
|
||||
AC_MSG_WARN([Compiler $1 and $ofc_c_type mismatch; MPI datatype unsupported])])
|
||||
fi
|
||||
fi
|
||||
|
||||
# We always need these defines -- even if we don't have a given
|
||||
# type, there are some places in the code where we have to have
|
||||
# *something*. Note that the bpatsubst's are the same as used
|
||||
# above (see comment above), but we added a translit to make them
|
||||
# uppercase.
|
||||
|
||||
# If we got a pretty name, use that as the basis. If not, use the
|
||||
# first part of the provided fortran type (e.g.,
|
||||
# "logical(selected_int_kind(2))" -> logical1")
|
||||
|
||||
# Finally, note that it is necessary to use the Big Long Ugly m4
|
||||
# expressions in the AC_DEFINE_UNQUOTEDs. If you don't (e.g., put
|
||||
# the result of the BLUm4E in a shell variable and use that in
|
||||
# AC_DEFINE_UNQUOTED), autoheader won't put them in the
|
||||
# AC_CONFIG_HEADER (or AM_CONFIG_HEADER, in our case).
|
||||
AC_DEFINE_UNQUOTED([OMPI_HAVE_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
|
||||
[$ofc_have_type],
|
||||
[Whether we have Fortran $1 or not])
|
||||
AC_DEFINE_UNQUOTED([OMPI_SIZEOF_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
|
||||
[$ofc_type_size],
|
||||
[Size of Fortran $1])
|
||||
AC_DEFINE_UNQUOTED([OMPI_ALIGNMENT_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
|
||||
[$ofc_type_alignment],
|
||||
[Alignment of Fortran $1])
|
||||
AC_DEFINE_UNQUOTED([OMPI_KIND_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]),
|
||||
[$ofc_type_kind],
|
||||
[Fortrn KIND number for $1])
|
||||
if test "$3" != "" && test "$ofc_define_type" = "yes"; then
|
||||
AC_DEFINE_UNQUOTED([ompi_fortran_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [A-Z], [a-z])[_t],
|
||||
[$ofc_c_type],
|
||||
[C type corresponding to Fortran $1])
|
||||
fi
|
||||
|
||||
# Save some in shell variables for later use (e.g., need
|
||||
# OMPI_SIZEOF_FORTRAN_INTEGER in OMPI_FORTRAN_GET_HANDLE_MAX)
|
||||
[OMPI_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])[_C_TYPE=$ofc_c_type]
|
||||
[OMPI_KIND_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])[=$ofc_type_kind]
|
||||
[OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])[=$ofc_have_type]
|
||||
[OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])[=$ofc_type_size]
|
||||
[OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_])[=$ofc_type_alignment]
|
||||
|
||||
# Wow, this is sick. But it works! :-)
|
||||
AC_SUBST([OMPI_HAVE_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]))
|
||||
AC_SUBST([OMPI_KIND_FORTRAN_]m4_translit(m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]), [a-z], [A-Z]))
|
||||
AC_SUBST([OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]))
|
||||
AC_SUBST([OMPI_SIZEOF_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]))
|
||||
AC_SUBST([OMPI_ALIGNMENT_FORTRAN_]m4_bpatsubst(m4_bpatsubst([$1], [*], []), [[^a-zA-Z0-9_]], [_]))
|
||||
|
||||
# Clean up
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
|
@ -0,0 +1,47 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports the "abstract"
|
||||
# keyword in derived types or not.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_ABSTRACT([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_ABSTRACT],[
|
||||
AS_VAR_PUSHDEF([abstract_var], [ompi_cv_fortran_abstract])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports ABSTRACT], abstract_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[MODULE abstract_mod
|
||||
ABSTRACT INTERFACE
|
||||
SUBROUTINE binky
|
||||
END SUBROUTINE
|
||||
END INTERFACE
|
||||
END MODULE abstract_mod]])],
|
||||
[AS_VAR_SET(abstract_var, yes)],
|
||||
[AS_VAR_SET(abstract_var, no)])
|
||||
touch conftest_foo.mod
|
||||
rm -rf *.mod 2>/dev/null
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(abstract_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([abstract_var])dnl
|
||||
])
|
|
@ -0,0 +1,48 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports the "asynchronous"
|
||||
# keyword in derived types or not.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_ASYNCHRONOUS([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_ASYNCHRONOUS],[
|
||||
AS_VAR_PUSHDEF([asynchronous_var], [ompi_cv_fortran_asynchronous])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports ASYNCHRONOUS], asynchronous_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[MODULE asynch_mod
|
||||
INTERFACE
|
||||
SUBROUTINE binky(buf)
|
||||
REAL, DIMENSION(*), ASYNCHRONOUS :: buf
|
||||
END SUBROUTINE
|
||||
END INTERFACE
|
||||
END MODULE asynch_mod]])],
|
||||
[AS_VAR_SET(asynchronous_var, yes)],
|
||||
[AS_VAR_SET(asynchronous_var, no)])
|
||||
touch conftest_foo.mod
|
||||
rm -rf *.mod 2>/dev/null
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(asynchronous_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([asynchronous_var])dnl
|
||||
])
|
|
@ -0,0 +1,119 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports iso_c_binding or not
|
||||
#
|
||||
# OMPI_FORTRAN_CHECK_ISO_C_BINDING([action if found], [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_ISO_C_BINDING],[
|
||||
AS_VAR_PUSHDEF([iso_c_binding_var], [ompi_cv_fortran_have_iso_c_binding])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports ISO_C_BINDING], iso_c_binding_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program check_for_iso_c_binding
|
||||
use, intrinsic :: iso_c_binding
|
||||
type CType
|
||||
integer(C_INT) :: i
|
||||
end type
|
||||
end program]])],
|
||||
[AS_VAR_SET(iso_c_binding_var, yes)],
|
||||
[AS_VAR_SET(iso_c_binding_var, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(iso_c_binding_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([iso_c_binding_var])
|
||||
])
|
||||
|
||||
# Check for SUBROUTINE ... BIND(C)
|
||||
# OMPI_FORTRAN_CHECK_BIND_C_SUB([action if found], [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_BIND_C_SUB],[
|
||||
AS_VAR_PUSHDEF([bind_c_sub_var], [ompi_cv_fortran_have_bind_c_sub])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports SUBROUTINE BIND(C)], bind_c_sub_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program check_for_bind_c_sub
|
||||
use, intrinsic :: iso_c_binding
|
||||
interface
|
||||
subroutine foo(i) bind(c)
|
||||
integer :: i
|
||||
end subroutine foo
|
||||
end interface
|
||||
end program]])],
|
||||
[AS_VAR_SET(bind_c_sub_var, yes)],
|
||||
[AS_VAR_SET(bind_c_sub_var, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(bind_c_sub_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([bind_c_sub_var])
|
||||
])
|
||||
|
||||
# Check for TYPE, BIND(C) :: derived_type
|
||||
# OMPI_FORTRAN_CHECK_BIND_C_TYPE([action if found], [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_BIND_C_TYPE],[
|
||||
AS_VAR_PUSHDEF([bind_c_type_var], [ompi_cv_fortran_have_bind_c_type])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports TYPE, BIND(C)], bind_c_type_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[module bindc_test
|
||||
use, intrinsic :: iso_c_binding
|
||||
type, bind(c) :: foo
|
||||
integer :: value
|
||||
end type foo
|
||||
end module]])],
|
||||
[AS_VAR_SET(bind_c_type_var, yes)],
|
||||
[AS_VAR_SET(bind_c_type_var, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(bind_c_type_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([bind_c_type_var])dnl
|
||||
])
|
||||
|
||||
# Check for TYPE(type), BIND(C, name="name")
|
||||
# OMPI_FORTRAN_CHECK_BIND_C_TYPE_NAME([action if found], [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_BIND_C_TYPE_NAME],[
|
||||
AS_VAR_PUSHDEF([bind_c_type_name_var], [ompi_cv_fortran_have_bind_c_type_name])
|
||||
|
||||
# See comment in ompi_setup_mpi_fortran.m4: it is important that
|
||||
# the bind(c) name in this text is longer than 32 characters.
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports TYPE(type), BIND(C, NAME="name")], bind_c_type_name_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[module bindc_test
|
||||
use, intrinsic :: iso_c_binding
|
||||
type, bind(c) :: foo
|
||||
integer :: value
|
||||
end type foo
|
||||
|
||||
type(foo), bind(c, name="really_long_name_longer_than_32_chars") :: bar
|
||||
end module]])],
|
||||
[AS_VAR_SET(bind_c_type_name_var, yes)],
|
||||
[AS_VAR_SET(bind_c_type_name_var, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(bind_c_type_name_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([bind_c_type_name_var])dnl
|
||||
])
|
|
@ -0,0 +1,49 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2014 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler implements
|
||||
# TS 29113 subclause 8.1:
|
||||
# Removed restrictions on ISO_C_BINDING module procedures.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_C_FUNLOC([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_C_FUNLOC],[
|
||||
AS_VAR_PUSHDEF([c_funloc], [ompi_cv_fortran_c_funloc])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports C_FUNLOC/TS 29113], c_funloc,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program main
|
||||
abstract interface
|
||||
subroutine MPI_Comm_errhandler_function(comm, error_code)
|
||||
implicit none
|
||||
integer :: comm, error_code
|
||||
end subroutine
|
||||
end interface
|
||||
|
||||
contains
|
||||
|
||||
subroutine mysub(fn)
|
||||
use, intrinsic :: iso_c_binding, only : c_funloc, c_funptr
|
||||
procedure(MPI_Comm_errhandler_function) :: comm_errhandler_fn
|
||||
type(c_funptr) :: comm_errhandler_fn_c
|
||||
comm_errhandler_fn_c = c_funloc(comm_errhandler_fn)
|
||||
end subroutine mysub
|
||||
end program]])],
|
||||
[AS_VAR_SET(c_funloc, yes)],
|
||||
[AS_VAR_SET(c_funloc, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(c_funloc, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([c_funloc])dnl
|
||||
])
|
|
@ -0,0 +1,61 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
|
||||
# Does this compiler support the Fortran 2008 assumed rank syntax?
|
||||
|
||||
# OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK], [
|
||||
AS_VAR_PUSHDEF([fortran_f08_assumed_rank],
|
||||
[ompi_cv_fortran_f08_assumed_rank])
|
||||
|
||||
AC_CACHE_CHECK([Fortran compiler F08 assumed rank syntax],
|
||||
fortran_f08_assumed_rank,
|
||||
[_OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK])
|
||||
|
||||
AS_VAR_IF(fortran_f08_assumed_rank, [yes], [$1], [$2])
|
||||
])
|
||||
|
||||
###################################
|
||||
|
||||
AC_DEFUN([_OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK], [
|
||||
OPAL_VAR_SCOPE_PUSH([happy])
|
||||
|
||||
# If we were called here, it means that the value was not cached,
|
||||
# so we need to check several different things. Since CACHE_CHECK
|
||||
# puts up a MSG_CHECKING, we need to terminate it with a bogus
|
||||
# answer before doing the individual checks.
|
||||
AC_MSG_RESULT([not cached; checking])
|
||||
|
||||
# Check for the F08 type(*),dimension(..) syntax
|
||||
OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB([!], [TYPE(*), DIMENSION(..)],
|
||||
[TYPE(*), DIMENSION(..)],
|
||||
[happy=yes], [happy=no])
|
||||
|
||||
AS_VAR_SET(fortran_f08_assumed_rank, [$happy]);
|
||||
|
||||
# Now put the original CACHE_CHECK MSG_CHECKING back so that it can
|
||||
# output the MSG_RESULT.
|
||||
AC_MSG_CHECKING([Fortran compiler F08 assumed rank syntax])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
|
@ -0,0 +1,205 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2009-2015 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
|
||||
# Does this compiler support (void*)-like functionality for MPI choice
|
||||
# buffers? If so, which flavor?
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR], [
|
||||
OPAL_VAR_SCOPE_PUSH([result happy type predecl])
|
||||
|
||||
OMPI_FORTRAN_IGNORE_TKR_PREDECL=
|
||||
OMPI_FORTRAN_IGNORE_TKR_TYPE=
|
||||
|
||||
AS_VAR_PUSHDEF([fortran_ignore_tkr_data],
|
||||
[ompi_cv_fortran_ignore_tkr_data])
|
||||
|
||||
# Note that we can only cache 1 value at a time, but this test
|
||||
# needs to check for 2 things: the ignore TKR predecl and the
|
||||
# type. So we encode them into a string of the form
|
||||
# <1|0>:<type>:<predecl>. Ugh.
|
||||
AC_CACHE_CHECK([Fortran compiler ignore TKR syntax],
|
||||
fortran_ignore_tkr_data,
|
||||
[_OMPI_FORTRAN_CHECK_IGNORE_TKR])
|
||||
AS_VAR_COPY([result], [fortran_ignore_tkr_data])
|
||||
|
||||
# Parse the result
|
||||
happy=`echo $result | cut -d: -f1`
|
||||
type=`echo $result | cut -d: -f2`
|
||||
predecl=`echo $result | cut -d: -f3-`
|
||||
|
||||
AS_IF([test $happy -eq 1],
|
||||
[OMPI_FORTRAN_IGNORE_TKR_PREDECL=$predecl
|
||||
OMPI_FORTRAN_IGNORE_TKR_TYPE=$type
|
||||
$1],
|
||||
[$2])
|
||||
|
||||
AS_VAR_POPDEF([fortran_ignore_tkr_data])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
################
|
||||
|
||||
AC_DEFUN([_OMPI_FORTRAN_CHECK_IGNORE_TKR], [
|
||||
OPAL_VAR_SCOPE_PUSH([happy ompi_fortran_ignore_tkr_predecl ompi_fortran_ignore_tkr_type])
|
||||
|
||||
# If we were called here, it means that the value was not cached,
|
||||
# so we need to check several different things. Since CACHE_CHECK
|
||||
# puts up a MSG_CHECKING, we need to terminate it with a bogus
|
||||
# answer before doing the individual checks.
|
||||
AC_MSG_RESULT([not cached; checking variants])
|
||||
|
||||
# Default values
|
||||
ompi_fortran_ignore_tkr_predecl=!
|
||||
ompi_fortran_ignore_tkr_type=real
|
||||
|
||||
# Vendor-neutral, TYPE(*) syntax
|
||||
OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
|
||||
[!], [type(*)],
|
||||
[TYPE(*), DIMENSION(*)],
|
||||
[happy=1], [happy=0])
|
||||
|
||||
# GCC compilers
|
||||
AS_IF([test $happy -eq 0],
|
||||
[OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
|
||||
[!GCC\$ ATTRIBUTES NO_ARG_CHECK ::], [type(*), dimension(*)],
|
||||
[!GCC\$ ATTRIBUTES NO_ARG_CHECK],
|
||||
[happy=1], [happy=0])])
|
||||
# Intel compilers
|
||||
AS_IF([test $happy -eq 0],
|
||||
[OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
|
||||
[!DEC\$ ATTRIBUTES NO_ARG_CHECK ::], [real, dimension(*)],
|
||||
[!DEC\$ ATTRIBUTES NO_ARG_CHECK],
|
||||
[happy=1], [happy=0])])
|
||||
# Solaris Studio compilers
|
||||
# Note that due to a compiler bug, we have been advised by Oracle to
|
||||
# use the "character(*)" type
|
||||
AS_IF([test $happy -eq 0],
|
||||
[OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
|
||||
[!\$PRAGMA IGNORE_TKR], [character(*)],
|
||||
[!\$PRAGMA IGNORE_TKR],
|
||||
[happy=1], [happy=0])])
|
||||
# Cray compilers
|
||||
AS_IF([test $happy -eq 0],
|
||||
[OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
|
||||
[!DIR\$ IGNORE_TKR], [real, dimension(*)],
|
||||
[!DIR\$ IGNORE_TKR],
|
||||
[happy=1], [happy=0])])
|
||||
# IBM compilers
|
||||
AS_IF([test $happy -eq 0],
|
||||
[OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB(
|
||||
[!IBM* IGNORE_TKR], [real, dimension(*)],
|
||||
[!IBM* IGNORE_TKR],
|
||||
[happy=1], [happy=0])])
|
||||
|
||||
AS_VAR_SET(fortran_ignore_tkr_data,
|
||||
[${happy}:${ompi_fortran_ignore_tkr_type}:${ompi_fortran_ignore_tkr_predecl}])
|
||||
|
||||
# Now put the original CACHE_CHECK MSG_CHECKING back so that it can
|
||||
# output the MSG_RESULT.
|
||||
AC_MSG_CHECKING([Fortran compiler ignore TKR syntax])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
||||
|
||||
###################################
|
||||
|
||||
# Generic check to see if Fortran compiler supports (void*)-like
|
||||
# functionality
|
||||
# $1: pre-decl qualifier line -- likely a compiler directive
|
||||
# $2: parameter type
|
||||
# $3: message for AC-MSG-CHECKING
|
||||
# $4: action to take if the test passes
|
||||
# $5: action to take if the test fails
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_IGNORE_TKR_SUB], [
|
||||
OPAL_VAR_SCOPE_PUSH(msg)
|
||||
AC_LANG_PUSH([Fortran])
|
||||
AC_MSG_CHECKING([for Fortran compiler support of $3])
|
||||
AC_COMPILE_IFELSE(AC_LANG_PROGRAM([],[[!
|
||||
! Autoconf puts "program main" at the top
|
||||
|
||||
interface
|
||||
subroutine force_assumed_shape(a, count)
|
||||
integer :: count
|
||||
complex, dimension(:,:) :: a
|
||||
end subroutine force_assumed_shape
|
||||
end interface
|
||||
|
||||
interface
|
||||
subroutine foo(buffer, count)
|
||||
$1 buffer
|
||||
$2, intent(in) :: buffer
|
||||
integer, intent(in) :: count
|
||||
end subroutine foo
|
||||
end interface
|
||||
|
||||
! Simple interface with an un-typed first argument (e.g., a choice buffer)
|
||||
integer :: count
|
||||
real :: buffer1(3)
|
||||
character :: buffer2
|
||||
complex :: buffer3(4,4)
|
||||
complex, pointer, dimension(:,:) :: ptr
|
||||
target :: buffer3
|
||||
integer :: buffer4
|
||||
ptr => buffer3
|
||||
|
||||
! Set some known values (somewhat irrelevant for this test, but just be
|
||||
! sure that the values are initialized)
|
||||
a = 17
|
||||
buffer1(1) = 4.5
|
||||
buffer1(2) = 6.7
|
||||
buffer1(3) = 8.9
|
||||
buffer2 = 'a'
|
||||
|
||||
! Call with one type for the first argument
|
||||
call foo(buffer1, count)
|
||||
! Call with a different type for the first argument
|
||||
call foo(buffer2, count)
|
||||
! Force us through an assumed shape
|
||||
call force_assumed_shape(buffer3, count)
|
||||
! Force a pointer call through an assumed shape (!)
|
||||
ptr => buffer3
|
||||
! Also try with a simple scalar integer
|
||||
! (Intel 2016 compiler suite only partially supports GCC pragmas;
|
||||
! they work with all the above buffer types, but fail with a
|
||||
! simple scalar integer)
|
||||
call foo(buffer4, count)
|
||||
|
||||
end program
|
||||
|
||||
subroutine force_assumed_shape(a, count)
|
||||
integer :: count
|
||||
real, dimension(:,:) :: a
|
||||
call foo(a, count)
|
||||
end subroutine force_assumed_shape
|
||||
|
||||
! Autoconf puts "end" after the last line
|
||||
subroutine bogus
|
||||
]]),
|
||||
[msg=yes
|
||||
ompi_fortran_ignore_tkr_predecl="$1"
|
||||
ompi_fortran_ignore_tkr_type="$2"
|
||||
$4],
|
||||
[msg=no
|
||||
$5])
|
||||
AC_MSG_RESULT($msg)
|
||||
AC_LANG_POP([Fortran])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports the "interface"
|
||||
# keyword or not.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_INTERFACE([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_INTERFACE],[
|
||||
AS_VAR_PUSHDEF([interface_var], [ompi_cv_fortran_interface])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports INTERFACE], interface_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[MODULE my_module
|
||||
INTERFACE MPI_Foo
|
||||
SUBROUTINE inky(a)
|
||||
DOUBLE PRECISION A
|
||||
END SUBROUTINE inky
|
||||
SUBROUTINE blinky(a)
|
||||
INTEGER A
|
||||
END SUBROUTINE blinky
|
||||
END INTERFACE MPI_Foo
|
||||
END MODULE my_module]])],
|
||||
[AS_VAR_SET(interface_var, yes)],
|
||||
[AS_VAR_SET(interface_var, no)])
|
||||
touch conftest_foo.mod
|
||||
rm -rf *.mod 2>/dev/null
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(interface_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([interface_var])dnl
|
||||
])
|
|
@ -0,0 +1,42 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports iso_fortran_env or not
|
||||
#
|
||||
# OMPI_FORTRAN_CHECK_ISO_FORTRAN_ENV([action if found], [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_ISO_FORTRAN_ENV],[
|
||||
AS_VAR_PUSHDEF([iso_fortran_env_var], [ompi_cv_fortran_have_iso_fortran_env])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports ISO_FORTRAN_ENV], iso_fortran_env_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program check_for_iso_fortran_env
|
||||
use, intrinsic :: iso_fortran_env
|
||||
real(real32) :: var
|
||||
var = 12.34
|
||||
end program]])],
|
||||
[AS_VAR_SET(iso_fortran_env_var, yes)],
|
||||
[AS_VAR_SET(iso_fortran_env_var, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(iso_fortran_env_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([iso_fortran_env_var])
|
||||
])
|
|
@ -0,0 +1,122 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_LOGICAL_ARRAY],[
|
||||
AS_VAR_PUSHDEF([logical_array_var],
|
||||
[ompi_cv_fortran_logical_array_correct])
|
||||
|
||||
AC_CACHE_CHECK([for correct handling of Fortran logical arrays],
|
||||
logical_array_var,
|
||||
[if test "$1" = "none" || \
|
||||
test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS || \
|
||||
test $ompi_fortran_happy -eq 0; then
|
||||
value=skipped
|
||||
else
|
||||
# Fortran module
|
||||
cat > conftestf.f <<EOF
|
||||
program check_logical_array
|
||||
external ompi_check
|
||||
logical l(2)
|
||||
l(1)=.FALSE.
|
||||
l(2)=.TRUE.
|
||||
CALL ompi_check(l)
|
||||
end
|
||||
EOF
|
||||
|
||||
# C module
|
||||
# We really need the confdefs.h Header file for
|
||||
# the ompi_fortran_logical_t definition
|
||||
if test \! -f confdefs.h ; then
|
||||
AC_MSG_WARN([*** Problem running configure test!])
|
||||
AC_MSG_WARN([*** Cannot find confdefs.h file for config test])
|
||||
AC_MSG_WARN([*** See config.log for details.])
|
||||
AC_MSG_ERROR([*** Cannot continue.])
|
||||
fi
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void ompi_check_f(ompi_fortran_logical_t * logical)
|
||||
{
|
||||
int result = 0;
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
|
||||
if (logical[[0]] == 0 &&
|
||||
logical[[1]] == $ompi_cv_fortran_true_value)
|
||||
result = 1;
|
||||
fprintf(f, "%d\n", result);
|
||||
}
|
||||
|
||||
void ompi_check(ompi_fortran_logical_t * logical)
|
||||
{ ompi_check_f(logical); }
|
||||
|
||||
void ompi_check_(ompi_fortran_logical_t * logical)
|
||||
{ ompi_check_f(logical); }
|
||||
|
||||
void ompi_check__(ompi_fortran_logical_t * logical)
|
||||
{ ompi_check_f(logical); }
|
||||
|
||||
void OMPI_CHECK(ompi_fortran_logical_t * logical)
|
||||
{ ompi_check_f(logical); }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
|
||||
# Try the compilation and run. Can't use AC_TRY_RUN
|
||||
# because it's two module files.
|
||||
OPAL_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c],
|
||||
[OPAL_LOG_COMMAND([$FC $FCFLAGS conftestf.f conftest.o -o conftest $LDFLAGS $LIBS],
|
||||
[happy=1], [happy=0])],
|
||||
[happy=0])
|
||||
if test "$happy" = "0" ; then
|
||||
AC_MSG_ERROR([Error determining if arrays of logical values work properly.])
|
||||
fi
|
||||
|
||||
AS_IF([test "$cross_compiling" = "yes"],
|
||||
[ # assume we're ok
|
||||
value=yes],
|
||||
[OPAL_LOG_COMMAND([./conftest],
|
||||
[if test "`cat conftestval`" = "1" ; then
|
||||
value=yes
|
||||
else
|
||||
value=no
|
||||
fi],
|
||||
[value=no])])
|
||||
fi
|
||||
AS_VAR_SET(logical_array_var, [$value])
|
||||
])
|
||||
|
||||
AS_VAR_COPY([ompi_fortran_logical_array_correct], [logical_array_var])
|
||||
if test "$ompi_fortran_logical_array_correct" = "no" ; then
|
||||
AC_MSG_ERROR([Error determining if arrays of logical values work properly.])
|
||||
fi
|
||||
AS_VAR_POPDEF([logical_array_var])
|
||||
|
||||
unset happy ompi_check_logical_fn
|
||||
rm -rf conftest*
|
||||
])dnl
|
|
@ -0,0 +1,69 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check the max array rank that the Fortran compiler supports.
|
||||
#
|
||||
# OMPI_FORTRAN_CHECK_MAX_ARRAY_RANK
|
||||
#
|
||||
# Sets $OMPI_FORTRAN_MAX_ARRAY_RANK, AC_SUBSTs it, and AC_DEFINEs
|
||||
# OMPI_FORTRAN_MAX_ARRAY_RANK.
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_MAX_ARRAY_RANK],[
|
||||
AS_VAR_PUSHDEF([max_array_rank_var], [ompi_cv_fortran_max_array_rank])
|
||||
|
||||
OPAL_VAR_SCOPE_PUSH([f_max_rank f_fail f_rank f_i f_dim])
|
||||
AC_CACHE_CHECK([max supported Fortran array rank], max_array_rank_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
f_max_rank=0
|
||||
f_fail=0
|
||||
|
||||
# Realistically, this will only be 7 or 15. But what the heck
|
||||
# -- try them all. Note that we don't test above 15, because
|
||||
# that's the max value from the F2008 spec (and some compilers
|
||||
# will let you go above rank=16, e.g., Intel ifort).
|
||||
for f_rank in 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do
|
||||
if test $f_fail -eq 0; then
|
||||
f_i=1
|
||||
f_dim=2
|
||||
while test `expr $f_i + 1` -le $f_rank; do
|
||||
f_dim="$f_dim,2"
|
||||
f_i=`expr $f_i + 1`
|
||||
done
|
||||
OPAL_LOG_MSG([testing Fortran dimension $f_rank / $f_dim])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[PROGRAM test_program
|
||||
INTEGER, DIMENSION($f_dim) :: var
|
||||
var($f_dim) = 3
|
||||
END PROGRAM test_program]])],
|
||||
[f_max_rank=$f_rank], [f_fail=1])
|
||||
fi
|
||||
done
|
||||
AS_VAR_SET(max_array_rank_var, $f_max_rank)
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_COPY([OMPI_FORTRAN_MAX_ARRAY_RANK], [max_array_rank_var])
|
||||
AC_SUBST(OMPI_FORTRAN_MAX_ARRAY_RANK)
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_MAX_ARRAY_RANK],
|
||||
[$OMPI_FORTRAN_MAX_ARRAY_RANK],
|
||||
[Max dimension rank of Fortran arrays])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
AS_VAR_POPDEF([max_array_rank_var])dnl
|
||||
])
|
|
@ -0,0 +1,54 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports the "optional"
|
||||
# keyword or not.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_OPTIONAL_ARGS([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_OPTIONAL_ARGS],[
|
||||
AS_VAR_PUSHDEF([optional_var], [ompi_cv_fortran_optional])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports optional arguments], optional_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program check_for_optional
|
||||
use, intrinsic :: iso_c_binding
|
||||
|
||||
interface
|
||||
subroutine check_op(i, ierror)
|
||||
integer, intent(in), value :: i
|
||||
integer, intent(out), optional :: ierror
|
||||
end subroutine check_op
|
||||
end interface
|
||||
|
||||
integer :: ierror
|
||||
|
||||
call check_op(0)
|
||||
call check_op(1, ierror)
|
||||
end program]])],
|
||||
[AS_VAR_SET(optional_var, yes)],
|
||||
[AS_VAR_SET(optional_var, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(optional_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([optional_var])dnl
|
||||
])
|
|
@ -0,0 +1,43 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2009-2020 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_PREPROCESS_F90], [
|
||||
AC_MSG_CHECKING([if Fortran compilers preprocess .F90 files without additional flag])
|
||||
cat > conftest_f.F90 << EOF
|
||||
#if 0
|
||||
#error The source file was not preprocessed
|
||||
#endif
|
||||
program bogus
|
||||
end program
|
||||
EOF
|
||||
OPAL_LOG_COMMAND([$FC $FCFLAGS -c conftest_f.F90],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_CHECKING([if -fpp flag works])
|
||||
OPAL_LOG_COMMAND([$FC $FCFLAGS -fpp -c conftest_f.F90],
|
||||
[AC_MSG_RESULT([yes])
|
||||
FCFLAGS="$FCFLAGS -fpp"],
|
||||
[AC_MSG_RESULT(no)
|
||||
AC_MSG_ERROR([cannot preprocess Fortran files, Aborting])])])
|
||||
rm -f conftest*
|
||||
])dnl
|
|
@ -0,0 +1,47 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports the "private"
|
||||
# keyword in derived types or not.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_PRIVATE([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_PRIVATE],[
|
||||
AS_VAR_PUSHDEF([private_var], [ompi_cv_fortran_private])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports PRIVATE], private_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[module test_for_private
|
||||
type :: derived_with_private
|
||||
integer :: this_is_a_public_integer
|
||||
integer, private :: this_is_a_private_integer
|
||||
end type derived_with_private
|
||||
end module test_for_private]])],
|
||||
[AS_VAR_SET(private_var, yes)],
|
||||
[AS_VAR_SET(private_var, no)])
|
||||
touch conftest_foo.mod
|
||||
rm -rf *.mod 2>/dev/null
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(private_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([private_var])dnl
|
||||
])
|
|
@ -0,0 +1,56 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports the "procedure"
|
||||
# keyword in derived types or not.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_PROCEDURE([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_PROCEDURE],[
|
||||
AS_VAR_PUSHDEF([procedure_var], [ompi_cv_fortran_procedure])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports PROCEDURE], procedure_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[MODULE proc_mod
|
||||
INTERFACE
|
||||
SUBROUTINE MPI_User_function
|
||||
END SUBROUTINE
|
||||
END INTERFACE
|
||||
END MODULE proc_mod
|
||||
|
||||
PROGRAM test_proc
|
||||
INTERFACE
|
||||
SUBROUTINE binky(user_fn)
|
||||
USE proc_mod
|
||||
PROCEDURE(MPI_User_function) :: user_fn
|
||||
END SUBROUTINE
|
||||
END INTERFACE
|
||||
END PROGRAM]])],
|
||||
[AS_VAR_SET(procedure_var, yes)],
|
||||
[AS_VAR_SET(procedure_var, no)])
|
||||
touch conftest_foo.mod
|
||||
rm -rf *.mod 2>/dev/null
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(procedure_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([procedure_var])dnl
|
||||
])
|
|
@ -0,0 +1,44 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports the "protected"
|
||||
# keyword in derived types or not.
|
||||
|
||||
# OMPI_FORTRAN_CHECK_PROTECTED([action if found],
|
||||
# [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_PROTECTED],[
|
||||
AS_VAR_PUSHDEF([protected_var], [ompi_cv_fortran_protected])
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports PROTECTED], protected_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[module test_for_protected
|
||||
integer, protected :: bogus
|
||||
end module test_for_protected]])],
|
||||
[AS_VAR_SET(protected_var, yes)],
|
||||
[AS_VAR_SET(protected_var, no)])
|
||||
touch conftest_foo.mod
|
||||
rm -rf *.mod 2>/dev/null
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(protected_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([protected_var])dnl
|
||||
])
|
|
@ -0,0 +1,156 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2008-2016 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_FORTRAN_CHECK_REAL16_C_EQUIV
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_C_EQUIV],[
|
||||
unset happy
|
||||
OPAL_VAR_SCOPE_PUSH([happy define_value msg CFLAGS_save])
|
||||
AS_VAR_PUSHDEF([real16_matches_c_var], [ompi_cv_real16_c_equiv])
|
||||
|
||||
# We have to do this as a cache check for cross-compilation platforms
|
||||
AC_CACHE_CHECK([for C type matching bit representation of REAL*16],
|
||||
real16_matches_c_var,
|
||||
[AS_IF([test "$OMPI_TRY_FORTRAN_BINDINGS" -gt "$OMPI_FORTRAN_NO_BINDINGS" && \
|
||||
test "$OMPI_HAVE_FORTRAN_REAL16" = "1"],
|
||||
[
|
||||
# AC_CACHE_CHECK automatically does its own AC_MSG_CHECKING, so close it out
|
||||
AC_MSG_RESULT([pending])
|
||||
|
||||
# First check the type that we found was the same length in C
|
||||
AC_MSG_CHECKING([if $OMPI_FORTRAN_REAL16_C_TYPE == REAL*16])
|
||||
OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([$OMPI_FORTRAN_REAL16_C_TYPE], [L])
|
||||
# If that didn't work, see if we have a compiler-specific
|
||||
# type that might work
|
||||
AS_IF([test "$happy" = "no"],
|
||||
[AC_MSG_RESULT([$happy])
|
||||
# Intel compiler has a special type that should work
|
||||
AS_IF([test "$opal_cv_c_compiler_vendor" = "intel"],
|
||||
[AC_MSG_CHECKING([if intel compiler _Quad == REAL*16])
|
||||
CFLAGS_save="$CFLAGS"
|
||||
CFLAGS="$CFLAGS -Qoption,cpp,--extended_float_types"
|
||||
OPAL_FLAGS_UNIQ([CFLAGS])
|
||||
OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([_Quad], [q])
|
||||
AS_IF([test "$happy" = "yes"],
|
||||
[OMPI_FORTRAN_REAL16_C_TYPE="_Quad"
|
||||
AC_MSG_RESULT([works!])],
|
||||
[CFLAGS="$CFLAGS_save"
|
||||
AC_MSG_RESULT([does not work])])
|
||||
])
|
||||
AS_IF([test "$opal_cv_c_compiler_vendor" = "gnu" && test "$ac_cv_type___float128" = "yes"],
|
||||
[AC_MSG_CHECKING([if gnu compiler __float128 == REAL*16])
|
||||
OPAL_FLAGS_UNIQ([CFLAGS])
|
||||
OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE([__float128], [q])
|
||||
AS_IF([test "$happy" = "yes"],
|
||||
[OMPI_FORTRAN_REAL16_C_TYPE="__float128"
|
||||
AC_MSG_RESULT([works!])],
|
||||
[AC_MSG_RESULT([does not work])])
|
||||
])
|
||||
# We have to [re-]print a new message here, because
|
||||
# AC_CACHE_CHECK will automatically AC_MSG_RESULT
|
||||
AC_MSG_CHECKING([for C type matching bit representation of REAL*16])
|
||||
])
|
||||
AS_VAR_SET(real16_matches_c_var, [$happy])
|
||||
],[
|
||||
# No fortran bindings or no REAL*16
|
||||
AS_IF([test "$OMPI_TRY_FORTRAN_BINDINGS" = "$OMPI_FORTRAN_NO_BINDINGS"],
|
||||
[msg="skipped (no Fortran MPI bindings)"],
|
||||
[msg="skipped (no REAL*16)"])
|
||||
AS_VAR_SET(real16_matches_c_var, [$msg])
|
||||
])
|
||||
])
|
||||
|
||||
AS_VAR_COPY([ompi_real16_matches_c], [real16_matches_c_var])
|
||||
AS_VAR_POPDEF([real16_matches_c_var])
|
||||
|
||||
AS_IF([test "$ompi_real16_matches_c" = "yes"],
|
||||
[define_value=1],
|
||||
[define_value=0
|
||||
AC_MSG_WARN([MPI_REAL16 and MPI_COMPLEX32 support have been disabled])])
|
||||
AC_DEFINE_UNQUOTED([OMPI_REAL16_MATCHES_C], [$define_value],
|
||||
[Whether Fortran REAL*16 matches the bit format of the equivalent C type])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
|
||||
# OMPI_FORTRAN_CHECK_REAL16_C_EQUIV_TYPE(type, suffix)
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_REAL16_EQUIV_TYPE],[
|
||||
# C module
|
||||
cat > conftest_c.c <<EOF
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void c_backend($1 *a) {
|
||||
$1 foo = 11;
|
||||
FILE *fp = fopen("conftestval", "w");
|
||||
if (NULL == fp) exit(1);
|
||||
foo = 1 / foo;
|
||||
fprintf(fp, "%s\n", (foo == *a) ? "yes" : "no");
|
||||
fclose(fp);
|
||||
}
|
||||
|
||||
void C($1 *a) { c_backend(a); }
|
||||
void c($1 *a) { c_backend(a); }
|
||||
void c_($1 *a) { c_backend(a); }
|
||||
/* JMS I'm pretty sure this one will never happen...? */
|
||||
void c__($1 *a) { c_backend(a); }
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
|
||||
# Fortran module
|
||||
cat > conftest_f.f <<EOF
|
||||
program bogus
|
||||
REAL*16 :: foo = 11
|
||||
foo = 1 / foo
|
||||
call c(foo)
|
||||
end program bogus
|
||||
EOF
|
||||
rm -f conftestval
|
||||
# Compile and link
|
||||
OPAL_LOG_COMMAND([$CC $CFLAGS -I. -c conftest_c.c],
|
||||
[OPAL_LOG_COMMAND([$FC $FCFLAGS conftest_f.f conftest_c.o -o conftest $LDFLAGS $LIBS],
|
||||
[happy="yes"], [happy="no"])], [happy="no"])
|
||||
AS_IF([test "$happy" = "no"],
|
||||
[AC_MSG_RESULT([Could not determine if REAL*16 bit-matches C type])],
|
||||
# If it worked so far, try running to see what we get
|
||||
[AS_IF([test "$happy" = "yes" && test "$cross_compiling" = "yes"],
|
||||
[AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Can not determine if REAL*16 bit-matches C if cross compiling])],
|
||||
[OPAL_LOG_COMMAND([./conftest],
|
||||
[happy=`cat conftestval`],
|
||||
[AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Could not determine if REAL*16 bit-matches C type])
|
||||
])
|
||||
])
|
||||
])
|
||||
|
||||
# All done; whack tmp files
|
||||
rm -rf conftest*
|
||||
])
|
|
@ -0,0 +1,118 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2014 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2017 IBM Corporation. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# Check whether or not the Fortran compiler supports storage_size()
|
||||
# for all relevant types or not. E.g., gfortran 4.8 supports
|
||||
# storage_size() on some types, not but all.
|
||||
#
|
||||
# OMPI_FORTRAN_CHECK_STORAGE_SIZE([action if found], [action if not found])
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_STORAGE_SIZE],[
|
||||
AS_VAR_PUSHDEF([fortran_storage_size_var], [ompi_cv_fortran_have_storage_size])
|
||||
|
||||
# Re PR: https://github.com/open-mpi/ompi/pull/3822
|
||||
# We explored correcting the following syntax to compile with gfortran 4.8
|
||||
# - size = storage_size(x) / 8
|
||||
# + size = storage_size(x(1)) / 8
|
||||
# That allowed gfortran 4.8 to pass this configure test, but fail to
|
||||
# correctly handle mpi_sizeof due to the weak test for INTERFACE in
|
||||
# ompi_fortran_check_interface.m4. Until we can strengthen that configure
|
||||
# check we reverted the commit from PR #3822 to keep the old logic here
|
||||
# so that gfortran 4.8 will disqualify itself correctly for mpi_sizeof()
|
||||
# support.
|
||||
#
|
||||
AC_CACHE_CHECK([if Fortran compiler supports STORAGE_SIZE for relevant types],
|
||||
fortran_storage_size_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[program check_for_storage_size
|
||||
USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32, INT32
|
||||
integer size
|
||||
complex(real32) :: c32
|
||||
complex(real32), dimension(5) :: c32_array
|
||||
real(real32) :: r32
|
||||
real(real32), dimension(5) :: r32_array
|
||||
integer(int32) :: i32
|
||||
integer(int32), dimension(5) :: i32_array
|
||||
|
||||
call storage_size_complex32_scalar(c32, size)
|
||||
call storage_size_complex32_r1(c32_array, size)
|
||||
call storage_size_int32_scalar(i32, size)
|
||||
call storage_size_int32_r1(i32_array, size)
|
||||
call storage_size_real32_scalar(r32, size)
|
||||
call storage_size_real32_r1(r32_array, size)
|
||||
end program
|
||||
|
||||
SUBROUTINE storage_size_complex32_scalar(x, size)
|
||||
USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32
|
||||
COMPLEX(REAL32) ::x
|
||||
INTEGER, INTENT(OUT) :: size
|
||||
|
||||
size = storage_size(x) / 8
|
||||
END SUBROUTINE storage_size_complex32_scalar
|
||||
|
||||
SUBROUTINE storage_size_complex32_r1(x, size)
|
||||
USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32
|
||||
COMPLEX(REAL32), DIMENSION(*)::x
|
||||
INTEGER, INTENT(OUT) :: size
|
||||
|
||||
size = storage_size(x) / 8
|
||||
END SUBROUTINE storage_size_complex32_r1
|
||||
|
||||
SUBROUTINE storage_size_int32_scalar(x, size)
|
||||
USE, INTRINSIC :: iso_fortran_env, ONLY: INT32
|
||||
INTEGER(INT32) ::x
|
||||
INTEGER, INTENT(OUT) :: size
|
||||
|
||||
size = storage_size(x) / 8
|
||||
END SUBROUTINE storage_size_int32_scalar
|
||||
|
||||
SUBROUTINE storage_size_int32_r1(x, size)
|
||||
USE, INTRINSIC :: iso_fortran_env, ONLY: INT32
|
||||
INTEGER(INT32), DIMENSION(*)::x
|
||||
INTEGER, INTENT(OUT) :: size
|
||||
|
||||
size = storage_size(x) / 8
|
||||
END SUBROUTINE storage_size_int32_r1
|
||||
|
||||
SUBROUTINE storage_size_real32_scalar(x, size)
|
||||
USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32
|
||||
REAL(REAL32) ::x
|
||||
INTEGER, INTENT(OUT) :: size
|
||||
|
||||
size = storage_size(x) / 8
|
||||
END SUBROUTINE storage_size_real32_scalar
|
||||
|
||||
SUBROUTINE storage_size_real32_r1(x, size)
|
||||
USE, INTRINSIC :: iso_fortran_env, ONLY: REAL32
|
||||
REAL(REAL32), DIMENSION(*)::x
|
||||
INTEGER, INTENT(OUT) :: size
|
||||
|
||||
size = storage_size(x) / 8
|
||||
END SUBROUTINE storage_size_real32_r1
|
||||
]])],
|
||||
[AS_VAR_SET(fortran_storage_size_var, yes)],
|
||||
[AS_VAR_SET(fortran_storage_size_var, no)])
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(fortran_storage_size_var, [yes], [$1], [$2])
|
||||
AS_VAR_POPDEF([fortran_storage_size_var])
|
||||
])
|
|
@ -0,0 +1,43 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_FORTRAN_CHECK_TYPE([type, action if found, action if not found])
|
||||
# -----------------------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_TYPE],[
|
||||
# Use of m4_translit suggested by Eric Blake:
|
||||
# http://lists.gnu.org/archive/html/bug-autoconf/2010-10/msg00016.html
|
||||
AS_VAR_PUSHDEF([type_var],
|
||||
m4_translit([[ompi_cv_fortran_have_$1]], [*], [p]))
|
||||
|
||||
# Determine Fortran datatype size.
|
||||
# First arg is type, 2nd arg is config var to define
|
||||
AC_CACHE_CHECK([if Fortran compiler supports $1], type_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[program main
|
||||
$1 :: bogus_variable
|
||||
end program]])],
|
||||
[AS_VAR_SET(type_var, yes)],
|
||||
[AS_VAR_SET(type_var, no)])
|
||||
AC_LANG_POP([Fortran])])
|
||||
|
||||
AS_VAR_IF(type_var, [yes], [$2], [$3])
|
||||
AS_VAR_POPDEF([type_var])dnl
|
||||
])dnl
|
||||
|
|
@ -0,0 +1,75 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2015 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
dnl
|
||||
dnl Check whether Fortran compiler supports the "only" clause properly
|
||||
dnl when using modules. Specifically, if we "use a :: only foo" and "use
|
||||
dnl b :: only bar", and modules a and b have a conflicting "yow"
|
||||
dnl definition, it *should* be ignored because of the "only" clauses. PGI
|
||||
dnl 15.7 (and probably prior versions) does not -- but only when
|
||||
dnl compiling with -g (!).
|
||||
dnl
|
||||
|
||||
dnl OMPI_FORTRAN_CHECK_USE_ONLY([action if supported],
|
||||
dnl [action if not supported])
|
||||
dnl ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_CHECK_USE_ONLY],[
|
||||
AS_VAR_PUSHDEF([use_only_var], [ompi_cv_fortran_use_only])
|
||||
OPAL_VAR_SCOPE_PUSH([FCFLAGS_save])
|
||||
FCFLAGS_save=$FCFLAGS
|
||||
FCFLAGS="-I. $FCFLAGS"
|
||||
|
||||
AC_CACHE_CHECK([if Fortran compiler supports USE...ONLY], use_only_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
cat > aaa.f90 << EOF
|
||||
MODULE aaa
|
||||
INTEGER :: CMON(1)
|
||||
COMMON/CMMON/CMON
|
||||
INTEGER :: global_aaa
|
||||
END MODULE aaa
|
||||
EOF
|
||||
cat > bbb.f90 << EOF
|
||||
MODULE bbb
|
||||
integer, bind(C, name="cmmon_") :: CMON
|
||||
INTEGER :: global_bbb
|
||||
END MODULE bbb
|
||||
EOF
|
||||
OPAL_LOG_COMMAND([$FC $FCFLAGS -c aaa.f90],
|
||||
[OPAL_LOG_COMMAND([$FC $FCFLAGS -c bbb.f90],
|
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[PROGRAM test
|
||||
USE aaa, ONLY : global_aaa
|
||||
USE bbb, ONLY : global_bbb
|
||||
implicit none
|
||||
END PROGRAM]])],
|
||||
[AS_VAR_SET(use_only_var, yes)],
|
||||
[AS_VAR_SET(use_only_var, no)])],
|
||||
[AS_VAR_SET(use_only_var, no)])],
|
||||
[AS_VAR_SET(use_only_var, no)])
|
||||
rm -rf aaa.f90 aaa.o bbb.f90 bbb.o *.mod 2>/dev/null
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_IF(use_only_var, [yes], [$1], [$2])
|
||||
FCFLAGS=$FCFLAGS_save
|
||||
OPAL_VAR_SCOPE_POP
|
||||
AS_VAR_POPDEF([use_only_var])dnl
|
||||
])
|
|
@ -0,0 +1,143 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2009-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
|
||||
AC_DEFUN([OMPI_FORTRAN_FIND_EXT_SYMBOL_CONVENTION], [
|
||||
AC_REQUIRE([AC_PROG_NM])
|
||||
AC_REQUIRE([AC_PROG_GREP])
|
||||
OPAL_VAR_SCOPE_PUSH([FCFLAGS_NEW LDFLAGS_NEW FLAG])
|
||||
|
||||
# invalidate cache if result came from a run where FORTRAN was disabled
|
||||
if test "$ompi_cv_fortran_external_symbol" = "skipped" ; then
|
||||
unset ompi_cv_fortran_external_symbol
|
||||
fi
|
||||
|
||||
AC_CACHE_CHECK([$FORTRAN external symbol convention],
|
||||
[ompi_cv_fortran_external_symbol],
|
||||
[if test "$FC" = "none" || \
|
||||
test "$OMPI_TRY_FORTRAN_BINDINGS" = "$OMPI_FORTRAN_NO_BINDINGS"; then
|
||||
ompi_cv_fortran_external_symbol="skipped"
|
||||
else
|
||||
cat >conftest.f <<EOF
|
||||
subroutine FOO_bar(a)
|
||||
integer a
|
||||
a = 1
|
||||
return
|
||||
end
|
||||
EOF
|
||||
# Try without certain optimization flags, which produce object
|
||||
# files without the required external symbols;
|
||||
# e.g. option -fast turns on -ipo on Intel Compilers 11.0
|
||||
FCFLAGS_NEW=""
|
||||
LDFLAGS_NEW=""
|
||||
case $FC in
|
||||
ifort)
|
||||
for FLAG in $FCFLAGS ; do
|
||||
case $FLAG in
|
||||
-fast) ;;
|
||||
-ipo*) ;;
|
||||
*) FCFLAGS_NEW="$FCFLAGS_NEW $FLAG" ;;
|
||||
esac
|
||||
done
|
||||
for FLAG in $LDFLAGS ; do
|
||||
case $FLAG in
|
||||
-fast) ;;
|
||||
-ipo*) ;;
|
||||
*) LDFLAGS_NEW="$LDFLAGS_NEW $FLAG" ;;
|
||||
esac
|
||||
done
|
||||
OPAL_LOG_MSG([Try with new FCFLAGS: $FCFLAGS_NEW and new LDFLAGS:$LDFLAGS_NEW])
|
||||
;;
|
||||
*)
|
||||
FCFLAGS_NEW="$FCFLAGS"
|
||||
LDFLAGS_NEW="$LDFLAGS"
|
||||
;;
|
||||
esac
|
||||
|
||||
happy=1
|
||||
OPAL_LOG_COMMAND([$FC $FCFLAGS_NEW -c conftest.f $LDFLAGS_NEW $LIBS],
|
||||
[if $NM conftest.o | $GREP foo_bar__ >/dev/null 2>&1 ; then
|
||||
ompi_cv_fortran_external_symbol="double underscore"
|
||||
elif $NM conftest.o | $GREP foo_bar_ >/dev/null 2>&1 ; then
|
||||
ompi_cv_fortran_external_symbol="single underscore"
|
||||
elif $NM conftest.o | $GREP FOO_bar >/dev/null 2>&1 ; then
|
||||
ompi_cv_fortran_external_symbol="mixed case"
|
||||
elif $NM conftest.o | $GREP foo_bar >/dev/null 2>&1 ; then
|
||||
ompi_cv_fortran_external_symbol="no underscore"
|
||||
elif $NM conftest.o | $GREP FOO_BAR >/dev/null 2>&1 ; then
|
||||
ompi_cv_fortran_external_symbol="upper case"
|
||||
else
|
||||
$NM conftest.o >conftest.out 2>&1
|
||||
OPAL_LOG_MSG([Could not determine Fortran naming convention. Output from $NM:])
|
||||
OPAL_LOG_FILE([conftest.out])
|
||||
happy=0
|
||||
fi],
|
||||
[AC_MSG_ERROR([Fortran compiler did not produce object file])])
|
||||
fi])
|
||||
|
||||
# These values were all already set to 0 back up in
|
||||
# ompi_setup_mpi_fortran.m4, because this whole macro is
|
||||
# conditionally executed (i.e., it is not executed in the
|
||||
# --disable-mpi-fortran case).
|
||||
if test "$ompi_cv_fortran_external_symbol" = "double underscore" ; then
|
||||
ompi_fortran_double_underscore=1
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "single underscore" ; then
|
||||
ompi_fortran_single_underscore=1
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "mixed case" ; then
|
||||
ompi_fortran_caps=1
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "no underscore" ; then
|
||||
ompi_fortran_plain=1
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "upper case" ; then
|
||||
ompi_fortran_caps=1
|
||||
elif test "$ompi_cv_fortran_external_symbol" != "skipped" ; then
|
||||
AC_MSG_ERROR([unknown naming convention: $ompi_cv_fortran_external_symbol])
|
||||
fi
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
rm -rf conftest.*
|
||||
])dnl
|
||||
|
||||
|
||||
AC_DEFUN([OMPI_FORTRAN_MAKE_C_FUNCTION], [
|
||||
if test "$ompi_cv_fortran_external_symbol" = "double underscore" ; then
|
||||
# so the general rule is that if there is an _ in the function
|
||||
# name, then there are two trailing underscores. Otherwise,
|
||||
# there is only one trailing underscore. Any idea how to do
|
||||
# that with m4_translit?
|
||||
if echo $2 | $GREP _ >/dev/null 2>&1 ; then
|
||||
$1[=]m4_translit([$2], [A-Z], [a-z])[__]
|
||||
else
|
||||
$1[=]m4_translit([$2], [A-Z], [a-z])[_]
|
||||
fi
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "single underscore" ; then
|
||||
$1[=]m4_translit([$2], [A-Z], [a-z])[_]
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "mixed case" ; then
|
||||
$1[=]$2
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "no underscore" ; then
|
||||
$1[=]m4_translit([$2], [A-Z], [a-z])
|
||||
elif test "$ompi_cv_fortran_external_symbol" = "upper case" ; then
|
||||
$1[=]m4_translit([$2], [a-z], [A-Z])
|
||||
else
|
||||
AC_MSG_ERROR([unknown naming convention: $ompi_cv_fortran_external_symbol])
|
||||
fi
|
||||
])
|
|
@ -0,0 +1,90 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2019 Triad National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
#
|
||||
# Sets and AC_SUBST's OMPI_FC_MODULE_FLAG.
|
||||
#
|
||||
# OMPI_FORTRAN_FIND_MODULE_INCLUDE_FLAG([action if found], [action if not found]
|
||||
AC_DEFUN([OMPI_FORTRAN_FIND_MODULE_INCLUDE_FLAG],[
|
||||
AS_VAR_PUSHDEF([fortran_inc_var], [ompi_cv_fortran_module_include_flag])
|
||||
|
||||
OMPI_FC_MODULE_FLAG=
|
||||
AC_CACHE_CHECK([for Fortran compiler module include flag],
|
||||
fortran_inc_var,
|
||||
[ofi_possible_flags="-I -p -M"
|
||||
mkdir conftest.$$
|
||||
cd conftest.$$
|
||||
|
||||
# Try to compile a Fortran module
|
||||
mkdir subdir
|
||||
cd subdir
|
||||
cat > conftest-module.f90 <<EOF
|
||||
module OMPI_MOD_FLAG
|
||||
type OMPI_MOD_FLAG_TYPE
|
||||
integer :: i
|
||||
end type OMPI_MOD_FLAG_TYPE
|
||||
end module OMPI_MOD_FLAG
|
||||
EOF
|
||||
|
||||
OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 -c conftest-module.f90 $LDFLAGS $LIBS], ,
|
||||
[cd ..
|
||||
rm -rf conftest.$$
|
||||
AC_MSG_RESULT([Whoops!])
|
||||
AC_MSG_WARN([*** Cannot seem to compile a Fortran module])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
cd ..
|
||||
|
||||
#
|
||||
# Now try to compile a simple program usinng that module, iterating
|
||||
# through the possible flags that the compiler might use
|
||||
#
|
||||
|
||||
cat > conftest.f90 <<EOF
|
||||
program fortranusemodule
|
||||
use OMPI_MOD_FLAG
|
||||
end program fortranusemodule
|
||||
EOF
|
||||
|
||||
ofi_module_flag=
|
||||
for flag in $ofi_possible_flags; do
|
||||
if test "$ofi_module_flag" = ""; then
|
||||
OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 ${flag}subdir $LDFLAGS $LIBS],
|
||||
[AS_VAR_SET(fortran_inc_var, [$flag])
|
||||
ofi_module_flag="$flag"],
|
||||
dnl try and see if we need to link in a possible object file
|
||||
[OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftest.f90 subdir/conftest-module.o \
|
||||
${flag}subdir $LDFLAGS $LIBS],
|
||||
[AS_VAR_SET(fortran_inc_var, [$flag])
|
||||
ofi_module_flag="$flag"],[])])
|
||||
fi
|
||||
done
|
||||
cd ..
|
||||
rm -rf conftest.$$
|
||||
])
|
||||
|
||||
AS_VAR_COPY([OMPI_FC_MODULE_FLAG], [fortran_inc_var])
|
||||
AC_SUBST(OMPI_FC_MODULE_FLAG)
|
||||
AS_VAR_POPDEF([fortran_inc_var])
|
||||
|
||||
AS_IF([test "$OMPI_FC_MODULE_FLAG" != ""],
|
||||
[$1], [$2])
|
||||
])dnl
|
|
@ -0,0 +1,179 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# This is a long, sordid tale.
|
||||
|
||||
# We have been unable to devise a F90 test that will result in a
|
||||
# consistent alignment answer. Specifically, our prior tests have
|
||||
# been similar to the prior f77 test -- have a small chunk of f90 code
|
||||
# compiled with the C code to actually compute the offsets. The f90
|
||||
# code was a struct-like entity (a "type") with multiple members -- on
|
||||
# a character and the other of the target type. The C code measured
|
||||
# the distance between them. But even if you use the keyword to
|
||||
# ensure that the F90 compiler does not re-order this struct, you may
|
||||
# still get a different alignment answer than the F77 test (!). This
|
||||
# is apparently because F90 allows compilers to align types
|
||||
# differently according to use (in common blocks, as standalone
|
||||
# variables, and as a member of a struct). Hence, the alignment can
|
||||
# be different depending on how to measure (and use) it. This was
|
||||
# confirmed by various members of the Fortran committee and several
|
||||
# Fortran compiler vendors.
|
||||
|
||||
# We use to check the F77 alignment based on common block usage, but
|
||||
# this is only one of the available types for F90. Hence, we may
|
||||
# actually get a different answer between f77 and f90 in the same
|
||||
# compiler series (and some compilers do! E.g., g95 gives different
|
||||
# answers even when "g95" itself is used as both the f77 and f90
|
||||
# compiler).
|
||||
|
||||
# So we gave up -- the only thing we can do (and has worked for years)
|
||||
# is to check Fortran alignment in common blocks when compiled with .f
|
||||
# files (not .f90).
|
||||
|
||||
# Indeed, just because data is coming from the mpif.h bindings doesn't
|
||||
# mean it wasn't compiled with the f90 (or later) compiler. So
|
||||
# there's no way to tell -- just hope that common block alignment is
|
||||
# good enough. :-(
|
||||
|
||||
# OMPI_FORTRAN_GET_ALIGNMENT(type, shell variable to set)
|
||||
# ----------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_GET_ALIGNMENT],[
|
||||
unset happy
|
||||
OPAL_VAR_SCOPE_PUSH([happy ompi_conftest_h])
|
||||
# Use of m4_translit suggested by Eric Blake:
|
||||
# http://lists.gnu.org/archive/html/bug-autoconf/2010-10/msg00016.html
|
||||
AS_VAR_PUSHDEF([type_var],
|
||||
m4_translit([[ompi_cv_fortran_alignment_$1]], [*], [p]))
|
||||
|
||||
AC_CACHE_CHECK([alignment of Fortran $1], type_var,
|
||||
[OMPI_FORTRAN_MAKE_C_FUNCTION([ompi_ac_align_fn], [align])
|
||||
# Fortran module. Make sure it's .f, not .f90.
|
||||
cat > conftestf.f <<EOF
|
||||
program falign
|
||||
external align
|
||||
$1 w,x,y,z
|
||||
CHARACTER a,b,c
|
||||
common /foo/a,w,b,x,y,c,z
|
||||
call align(w,x,y,z)
|
||||
end
|
||||
EOF
|
||||
|
||||
# C module
|
||||
if test -f conftest.h; then
|
||||
ompi_conftest_h="#include \"conftest.h\""
|
||||
else
|
||||
ompi_conftest_h=""
|
||||
fi
|
||||
cat > conftest.c <<EOF
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
$ompi_conftest_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void $ompi_ac_align_fn(char *w, char *x, char *y, char *z)
|
||||
{ unsigned long aw, ax, ay, az;
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
aw = (unsigned long) w;
|
||||
ax = (unsigned long) x;
|
||||
ay = (unsigned long) y;
|
||||
az = (unsigned long) z;
|
||||
if (! ((aw%16)||(ax%16)||(ay%16)||(az%16))) fprintf(f, "%d\n", 16);
|
||||
else if (! ((aw%12)||(ax%12)||(ay%12)||(az%12))) fprintf(f, "%d\n", 12);
|
||||
else if (! ((aw%8)||(ax%8)||(ay%8)||(az%8))) fprintf(f, "%d\n", 8);
|
||||
else if (! ((aw%4)||(ax%4)||(ay%4)||(az%4))) fprintf(f, "%d\n", 4);
|
||||
else if (! ((aw%2)||(ax%2)||(ay%2)||(az%2))) fprintf(f, "%d\n", 2);
|
||||
else fprintf(f, "%d\n", 1);
|
||||
fclose(f);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
|
||||
OPAL_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c],
|
||||
[OPAL_LOG_COMMAND([$FC $FCFLAGS conftestf.f conftest.o -o conftest $LDFLAGS $LIBS],
|
||||
[happy="yes"], [happy="no"])], [happy="no"])
|
||||
|
||||
if test "$happy" = "no" ; then
|
||||
AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Could not determine alignment of $1])
|
||||
fi
|
||||
|
||||
AS_IF([test "$cross_compiling" = "yes"],
|
||||
[AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Can not determine alignment of $1 when cross-compiling])],
|
||||
[OPAL_LOG_COMMAND([./conftest],
|
||||
[AS_VAR_SET(type_var, [`cat conftestval`])],
|
||||
[AC_MSG_RESULT([Error!])
|
||||
AC_MSG_ERROR([Could not determine alignment of $1])])])
|
||||
rm -rf conftest*])
|
||||
|
||||
AS_VAR_COPY([$2], [type_var])
|
||||
AS_VAR_POPDEF([type_var])dnl
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
# OMPI_FORTRAN_F08_GET_HANDLE_ALIGNMENT(type, variable to set)
|
||||
# ------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_F08_GET_HANDLE_ALIGNMENT],[
|
||||
# Use of m4_translit suggested by Eric Blake:
|
||||
# http://lists.gnu.org/archive/html/bug-autoconf/2010-10/msg00016.html
|
||||
AS_VAR_PUSHDEF([type_var],
|
||||
m4_translit([[ompi_cv_fortran_alignment_$1]], [*], [p]))
|
||||
|
||||
AC_CACHE_CHECK([alignment of Fortran $1], type_var,
|
||||
[AC_LANG_PUSH([Fortran])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[module alignment_mod
|
||||
type, BIND(C) :: test_mpi_handle
|
||||
integer :: MPI_VAL
|
||||
end type test_mpi_handle
|
||||
type(test_mpi_handle) :: t1
|
||||
type(test_mpi_handle) :: t2
|
||||
end module
|
||||
|
||||
program falignment
|
||||
use alignment_mod
|
||||
OPEN(UNIT=10, FILE="conftestval")
|
||||
if (LOC(t1) > LOC(t2)) then
|
||||
write (10,'(I5)') LOC(t1)-LOC(t2)
|
||||
else
|
||||
write (10,'(I5)') LOC(t2)-LOC(t1)
|
||||
endif
|
||||
CLOSE(10)
|
||||
|
||||
end program]])],
|
||||
[AS_IF([test "$cross_compiling" = "yes"],
|
||||
[AC_MSG_ERROR([Can not determine alignment of $1 when cross-compiling])],
|
||||
[OPAL_LOG_COMMAND([./conftest],
|
||||
[AS_VAR_SET(type_var, [`cat conftestval`])],
|
||||
[AC_MSG_ERROR([Could not determine alignment of $1])])])],
|
||||
|
||||
[AC_MSG_WARN([Could not determine alignment of $1])
|
||||
AC_MSG_WARN([See config.log for details])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
rm -rf conftest* *.mod 2> /dev/null
|
||||
AC_LANG_POP([Fortran])])
|
||||
|
||||
AS_VAR_COPY([$2], [type_var])
|
||||
AS_VAR_POPDEF([type_var])dnl
|
||||
])dnl
|
|
@ -0,0 +1,86 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_FORTRAN_GET_HANDLE_MAX()
|
||||
# ---------------------------------------------------------------
|
||||
# Find the maximum value of fortran integers, then calculate
|
||||
# min(INT_MAX, max fortran INTEGER). This represents the maximum
|
||||
# number of fortran MPI handle index.
|
||||
AC_DEFUN([OMPI_FORTRAN_GET_HANDLE_MAX],[
|
||||
AS_VAR_PUSHDEF([fortran_handle_max_var],
|
||||
[ompi_cv_fortran_handle_max])
|
||||
|
||||
AC_CACHE_CHECK([for max Fortran MPI handle index],
|
||||
fortran_handle_max_var,
|
||||
[ # Find max fortran INTEGER value. Set to sentinel value if we don't
|
||||
# have a Fortran compiler (e.g., if --disable-fortran was given).
|
||||
if test $ompi_fortran_happy -eq 0; then
|
||||
ompi_fint_max=0
|
||||
else
|
||||
OPAL_COMPUTE_MAX_VALUE([$OMPI_SIZEOF_FORTRAN_INTEGER], [ompi_fint_max])
|
||||
fi
|
||||
|
||||
# Get INT_MAX. Compute a SWAG if we are cross compiling or something
|
||||
# goes wrong.
|
||||
rm -f conftest.out >/dev/null 2>&1
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stdio.h>
|
||||
#include <limits.h>
|
||||
]],[[FILE *fp = fopen("conftest.out", "w");
|
||||
long cint = INT_MAX;
|
||||
fprintf(fp, "%ld", cint);
|
||||
fclose(fp);]])],
|
||||
[ompi_cint_max=`cat conftest.out`],
|
||||
[ompi_cint_max=0],
|
||||
[ #cross compiling is fun. compute INT_MAX same as INTEGER max
|
||||
OPAL_COMPUTE_MAX_VALUE([$ac_cv_sizeof_int], [ompi_cint_max])])
|
||||
|
||||
# Use string comparisons with "test"; see comment above for
|
||||
# rationale.
|
||||
if test "$ompi_cint_max" = "0" ; then
|
||||
# wow - something went really wrong. Be conservative
|
||||
value=32767
|
||||
elif test "$ompi_fint_max" = "0" ; then
|
||||
# we aren't compiling Fortran - just set it to C INT_MAX
|
||||
value=$ompi_cint_max
|
||||
else
|
||||
# Take the lesser of C INT_MAX and Fortran INTEGER max.
|
||||
# The resulting value will then be storable in either
|
||||
# type. Use expr (instead of "test -lt"), because it can
|
||||
# handle 8-byte integer values.
|
||||
value=$ompi_fint_max
|
||||
if test "`expr $ompi_cint_max \< $value`" = "1"; then
|
||||
value=$ompi_cint_max
|
||||
fi
|
||||
fi
|
||||
AS_VAR_SET(fortran_handle_max_var, [$value])
|
||||
rm -f conftest.out > /dev/null 2>&1
|
||||
unset value])
|
||||
|
||||
AS_VAR_COPY([ompi_fortran_handle_max], [fortran_handle_max_var])
|
||||
# sanity check; OMPI gets very unhappy if this value is negative...
|
||||
if test 0 -ne `expr $ompi_fortran_handle_max \< 0` ; then
|
||||
AC_MSG_ERROR([Detected negative max handle size.])
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HANDLE_MAX],
|
||||
[$ompi_fortran_handle_max],
|
||||
[Max handle value for fortran MPI handles, effectively min(INT_MAX, max fortran INTEGER value)])
|
||||
AS_VAR_POPDEF([fortran_handle_max_var])
|
||||
])dnl
|
|
@ -0,0 +1,101 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_FORTRAN_GET_KIND_VALUE(kind, decimal range, variable to set)
|
||||
# -----------------------------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_GET_KIND_VALUE],[
|
||||
# Use of m4_translit suggested by Eric Blake:
|
||||
# http://lists.gnu.org/archive/html/bug-autoconf/2010-10/msg00016.html
|
||||
AS_VAR_PUSHDEF([kind_value_var],
|
||||
m4_translit([[ompi_cv_fortran_kind_value_$1]], [*], [p]))
|
||||
|
||||
rm -f conftest.out
|
||||
AC_CACHE_CHECK([KIND value of Fortran $1], kind_value_var,
|
||||
[if test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS || \
|
||||
test $ompi_fortran_happy -eq 0; then
|
||||
value=skipped
|
||||
else
|
||||
AC_LANG_PUSH([Fortran])
|
||||
value=
|
||||
AC_RUN_IFELSE(AC_LANG_PROGRAM(, [[
|
||||
use, intrinsic :: ISO_C_BINDING
|
||||
open(unit = 7, file = "conftest.out")
|
||||
write(7, *) $1
|
||||
close(7)
|
||||
]]), [value=`cat conftest.out | awk '{print [$]1}'`], [value=no], [value=cross])
|
||||
rm -f conftest.out
|
||||
fi
|
||||
|
||||
# If the compiler is ancient enough to not support the
|
||||
# ISO_C_BINDING stuff, then we have to fall back to older
|
||||
# tests. Yuck.
|
||||
AS_IF([test "$value" = "no"],
|
||||
[AC_MSG_RESULT([no ISO_C_BINDING -- fallback])
|
||||
_OMPI_FORTRAN_SELECTED_INT_KIND($2, value)])
|
||||
|
||||
AS_IF([test "$value" = "no"],
|
||||
[AC_MSG_WARN([Could not determine KIND value of $1])
|
||||
AC_MSG_WARN([See config.log for more details])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
AS_IF([test "$value" = "cross"],
|
||||
[AC_MSG_ERROR([Can not determine KIND value of $1 when cross-compiling])])
|
||||
|
||||
AS_VAR_SET(kind_value_var, [$value])
|
||||
AC_LANG_POP([Fortran])
|
||||
unset value
|
||||
])
|
||||
|
||||
AS_VAR_COPY([$3], [kind_value_var])
|
||||
AS_VAR_POPDEF([kind_value_var])
|
||||
])dnl
|
||||
|
||||
# _OMPI_FORTRAN_SELECTED_INT_KIND(decimal range, variable to set)
|
||||
# -----------------------------------------------------------------
|
||||
AC_DEFUN([_OMPI_FORTRAN_SELECTED_INT_KIND],[
|
||||
AS_VAR_PUSHDEF([sel_int_kind_var], [ompi_cv_fortran_int_kind_$1])
|
||||
AC_CACHE_CHECK([Fortran value of selected_int_kind($1)], sel_int_kind_var,
|
||||
[outval=no
|
||||
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS && \
|
||||
test $ompi_fortran_happy -eq 1],
|
||||
[rm -f conftest.out
|
||||
AC_LANG_PUSH([Fortran])
|
||||
AC_RUN_IFELSE(AC_LANG_PROGRAM(, [[
|
||||
open(8, file="conftest.out")
|
||||
write(8, fmt="(I5)") selected_int_kind($1)
|
||||
close(8)
|
||||
]]), [outval=`cat conftest.out | awk '{print [$]1}'`], [outval=no], [outval=cross])
|
||||
rm -f conftest.out
|
||||
AC_LANG_POP([Fortran])
|
||||
])
|
||||
|
||||
AS_VAR_SET(sel_int_kind_var, [$outval])
|
||||
unset outval
|
||||
])
|
||||
|
||||
# All analysis of $value is done in the upper-level / calling
|
||||
# macro
|
||||
|
||||
AS_VAR_COPY([$2], [sel_int_kind_var])
|
||||
AS_VAR_POPDEF([sel_int_kind_var])dnl
|
||||
])
|
|
@ -0,0 +1,90 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2010-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OMPI_FORTRAN_GET_SIZEOF(prologue, type, variable to set)
|
||||
# ------------------------------------------
|
||||
AC_DEFUN([OMPI_FORTRAN_GET_SIZEOF],[
|
||||
# Use of m4_translit suggested by Eric Blake:
|
||||
# http://lists.gnu.org/archive/html/bug-autoconf/2010-10/msg00016.html
|
||||
AS_VAR_PUSHDEF([type_var],
|
||||
m4_translit([[ompi_cv_fortran_sizeof_$2]], [*], [p]))
|
||||
|
||||
AC_CACHE_CHECK([size of Fortran $2], type_var,
|
||||
[OMPI_FORTRAN_MAKE_C_FUNCTION([ompi_ac_size_fn], [size])
|
||||
# Fortran module
|
||||
cat > conftestf.f90 <<EOF
|
||||
program fsize
|
||||
$1
|
||||
external size
|
||||
$2 :: x(2)
|
||||
call size(x(1),x(2))
|
||||
end program
|
||||
EOF
|
||||
|
||||
# C module
|
||||
if test -f conftest.h; then
|
||||
ompi_conftest_h="#include \"conftest.h\""
|
||||
else
|
||||
ompi_conftest_h=""
|
||||
fi
|
||||
cat > conftest.c <<EOF
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
$ompi_conftest_h
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void $ompi_ac_size_fn(char *a, char *b)
|
||||
{
|
||||
int diff = (int) (b - a);
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
fprintf(f, "%d\n", diff);
|
||||
}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
|
||||
OPAL_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c],
|
||||
[OPAL_LOG_COMMAND([$FC $FCFLAGS $FCFLAGS_f90 conftestf.f90 conftest.o -o conftest $LDFLAGS $LIBS],
|
||||
[happy="yes"], [happy="no"])], [happy="no"])
|
||||
|
||||
if test "$happy" = "no" ; then
|
||||
OPAL_LOG_MSG([here is the Fortran program:], 1)
|
||||
OPAL_LOG_FILE([conftestf.f90])
|
||||
AC_MSG_WARN([Could not determine size of $2])
|
||||
AC_MSG_WARN([See config.log for details])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AS_IF([test "$cross_compiling" = "yes"],
|
||||
[AC_MSG_ERROR([Can not determine size of $2 when cross-compiling])],
|
||||
[OPAL_LOG_COMMAND([./conftest],
|
||||
[AS_VAR_SET(type_var, [`cat conftestval`])],
|
||||
[AC_MSG_ERROR([Could not determine size of $2])])])
|
||||
|
||||
unset happy ompi_conftest_h
|
||||
rm -rf conftest*])
|
||||
|
||||
AS_VAR_COPY([$3], [type_var])
|
||||
AS_VAR_POPDEF([type_var])dnl
|
||||
])dnl
|
|
@ -0,0 +1,134 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2011-2012 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
|
||||
# OMPI_FORTRAN_GET_VALUE_TRUE()
|
||||
# -------------------------------------------------------
|
||||
# Determine the value of .TRUE. of this Fortran compiler.
|
||||
AC_DEFUN([OMPI_FORTRAN_GET_VALUE_TRUE],[
|
||||
# invalidate cache if result came from a run where FORTRAN was disabled
|
||||
if test "$ompi_cv_fortran_true_value" = "0" ; then
|
||||
unset ompi_cv_fortran_true_value
|
||||
fi
|
||||
|
||||
AS_VAR_PUSHDEF([fortran_true_var],
|
||||
[ompi_cv_fortran_true_value])
|
||||
|
||||
AC_CACHE_CHECK([Fortran value for .TRUE. logical type],
|
||||
fortran_true_var,
|
||||
[if test "$1" = "none" || \
|
||||
test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS || \
|
||||
test $ompi_fortran_happy -eq 0 ; then
|
||||
value=77
|
||||
else
|
||||
#
|
||||
# C module
|
||||
# We really need the confdefs.h Header file for
|
||||
# the ompi_fortran_logical_t definition
|
||||
#
|
||||
if test \! -f confdefs.h ; then
|
||||
AC_MSG_WARN([*** Problem running configure test!])
|
||||
AC_MSG_WARN([*** Cannot find confdefs.h file for config test])
|
||||
AC_MSG_WARN([*** See config.log for details.])
|
||||
AC_MSG_ERROR([*** Cannot continue.])
|
||||
fi
|
||||
|
||||
cat > conftest.c <<EOF
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include "confdefs.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void ompi_print_f(ompi_fortran_logical_t * logical)
|
||||
{
|
||||
FILE *f=fopen("conftestval", "w");
|
||||
if (!f) exit(1);
|
||||
|
||||
if( SIZEOF_INT >= sizeof(ompi_fortran_logical_t) ) {
|
||||
fprintf(f, "%d\n", (int)*logical);
|
||||
} else if (SIZEOF_LONG >= sizeof(ompi_fortran_logical_t) ) {
|
||||
fprintf(f, "%ld\n", (long) *logical);
|
||||
#ifdef HAVE_LONG_LONG
|
||||
} else if (SIZEOF_LONG_LONG >= sizeof(ompi_fortran_logical_t) ) {
|
||||
fprintf(f, "%lld\n", (long long) *logical);
|
||||
#endif
|
||||
} else {
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
void ompi_print(ompi_fortran_logical_t *logical)
|
||||
{ ompi_print_f(logical); }
|
||||
|
||||
void ompi_print_(ompi_fortran_logical_t *logical)
|
||||
{ ompi_print_f(logical); }
|
||||
|
||||
void ompi_print__(ompi_fortran_logical_t *logical)
|
||||
{ ompi_print_f(logical); }
|
||||
|
||||
void OMPI_PRINT(ompi_fortran_logical_t *logical)
|
||||
{ ompi_print_f(logical); }
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
EOF
|
||||
cat > conftestf.f <<EOF
|
||||
program main
|
||||
logical value
|
||||
value=.TRUE.
|
||||
CALL ompi_print(value)
|
||||
end
|
||||
EOF
|
||||
|
||||
#
|
||||
# Try the compilation and run.
|
||||
#
|
||||
OPAL_LOG_COMMAND([$CC $CFLAGS -I. -c conftest.c],
|
||||
[OPAL_LOG_COMMAND([$FC $FCFLAGS -o conftest conftest.o conftestf.f $LDFLAGS $LIBS],
|
||||
[happy=1], [happy=0])],
|
||||
[happy=0])
|
||||
|
||||
AS_IF([test $happy -eq 0 && test $ompi_fortran_happy -eq 1],
|
||||
[AC_MSG_ERROR([Could not compile Fortran .TRUE. test. Aborting.])
|
||||
])
|
||||
|
||||
AS_IF([test "$cross_compiling" = "yes"],
|
||||
[AC_MSG_ERROR([Can not determine value of .TRUE. when cross-compiling])],
|
||||
[OPAL_LOG_COMMAND([./conftest],
|
||||
[value=`sed 's/ *//' conftestval`],
|
||||
[AC_MSG_ERROR([Could not determine value of Fotran .TRUE.. Aborting.])])])
|
||||
fi
|
||||
AS_VAR_SET(fortran_true_var, [$value])
|
||||
unset value
|
||||
])
|
||||
|
||||
AS_VAR_COPY([ompi_fortran_true_value], [fortran_true_var])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_VALUE_TRUE],
|
||||
[$ompi_fortran_true_value],
|
||||
[Fortran value for LOGICAL .TRUE. value])
|
||||
AS_VAR_POPDEF([fortran_true_var])
|
||||
|
||||
unset happy ompi_print_logical_fn
|
||||
rm -rf conftest*
|
||||
])dnl
|
|
@ -0,0 +1,56 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2008 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
######################################################################
|
||||
#
|
||||
# OMPI_INTERIX
|
||||
#
|
||||
# Detect if the environment is SUA/SFU (i.e. Interix) and modify
|
||||
# the compiling environment accordingly.
|
||||
#
|
||||
# USAGE:
|
||||
# OMPI_INTERIX()
|
||||
#
|
||||
######################################################################
|
||||
AC_DEFUN([OMPI_INTERIX],[
|
||||
|
||||
AC_MSG_CHECKING(for Interix environment)
|
||||
AC_TRY_COMPILE([],
|
||||
[#if !defined(__INTERIX)
|
||||
#error Normal Unix environment
|
||||
#endif],
|
||||
is_interix=yes,
|
||||
is_interix=no)
|
||||
AC_MSG_RESULT([$is_interix])
|
||||
if test "$is_interix" = "yes"; then
|
||||
|
||||
opal_show_subtitle "Interix detection"
|
||||
|
||||
if ! test -d /usr/include/port; then
|
||||
AC_MSG_WARN([Compiling Open MPI under Interix require an up-to-date])
|
||||
AC_MSG_WARN([version of libport. Please ask your system administrator])
|
||||
AC_MSG_WARN([to install it (pkg_update -L libport).])
|
||||
AC_MSG_ERROR([*** Cannot continue])
|
||||
fi
|
||||
#
|
||||
# These are the minimum requirements for Interix ...
|
||||
#
|
||||
AC_MSG_WARN([ -lport was added to the linking flags])
|
||||
LDFLAGS="-lport $LDFLAGS"
|
||||
AC_MSG_WARN([ -D_ALL_SOURCE -D_USE_LIBPORT was added to the compilation flags])
|
||||
CFLAGS="-D_ALL_SOURCE -D_USE_LIBPORT -I/usr/include/port $CFLAGS"
|
||||
CPPFLAGS="-D_ALL_SOURCE -D_USE_LIBPORT -I/usr/include/port $CPPFLAGS"
|
||||
CXXFLAGS="-D_ALL_SOURCE -D_USE_LIBPORT -I/usr/include/port $CXXFLAGS"
|
||||
|
||||
fi
|
||||
|
||||
])
|
|
@ -0,0 +1,29 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
AC_DEFUN([OMPI_SETUP_CONTRIB],[
|
||||
opal_show_title "Contributed software setup"
|
||||
|
||||
OMPI_CONTRIB
|
||||
])
|
|
@ -0,0 +1,454 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2006 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2007-2009 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2008-2013 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015-2016 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# This macro is necessary to get the title to be displayed first. :-)
|
||||
AC_DEFUN([OMPI_SETUP_CXX_BANNER],[
|
||||
opal_show_subtitle "C++ compiler and preprocessor"
|
||||
])
|
||||
|
||||
# This macro is necessary because PROG_CXX* is REQUIREd by multiple
|
||||
# places in SETUP_CXX.
|
||||
AC_DEFUN([OMPI_PROG_CXX],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_cxxflags_save])
|
||||
ompi_cxxflags_save="$CXXFLAGS"
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CXXCPP
|
||||
CXXFLAGS="$ompi_cxxflags_save"
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
# OMPI_SETUP_CXX()
|
||||
# ----------------
|
||||
# Do everything required to setup the C++ compiler. Safe to AC_REQUIRE
|
||||
# this macro.
|
||||
AC_DEFUN([OMPI_SETUP_CXX],[
|
||||
AC_REQUIRE([OMPI_SETUP_CXX_BANNER])
|
||||
|
||||
_OMPI_SETUP_CXX_COMPILER
|
||||
|
||||
_OMPI_CXX_CHECK_EXCEPTIONS
|
||||
|
||||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "1"],
|
||||
[OMPI_CXX_FIND_TEMPLATE_REPOSITORY
|
||||
OMPI_CXX_FIND_TEMPLATE_PARAMETERS
|
||||
OPAL_CHECK_IDENT([CXX], [CXXFLAGS], [cc], [C++])])
|
||||
|
||||
_OMPI_CXX_CHECK_BUILTIN
|
||||
|
||||
_OMPI_CXX_CHECK_2D_CONST_CAST
|
||||
|
||||
AM_CONDITIONAL(OMPI_BUILD_MPI_CXX_BINDINGS, [test "$WANT_MPI_CXX_SUPPORT" = 1])
|
||||
AC_DEFINE_UNQUOTED(OMPI_BUILD_CXX_BINDINGS, $WANT_MPI_CXX_SUPPORT,
|
||||
[Whether we want MPI C++ support or not])
|
||||
])
|
||||
|
||||
# _OMPI_SETUP_CXX_COMPILER()
|
||||
# --------------------------
|
||||
# Setup the CXX compiler
|
||||
AC_DEFUN([_OMPI_SETUP_CXX_COMPILER],[
|
||||
OPAL_VAR_SCOPE_PUSH(ompi_cxx_compiler_works)
|
||||
|
||||
# There's a few cases here:
|
||||
#
|
||||
# 1. --enable-mpi-cxx was supplied: error if we don't find a C++
|
||||
# compiler
|
||||
# 2. --disable-mpi-cxx was supplied: check for a C++ compiler anyway
|
||||
# (so we can have a functional mpic++ wrapper compiler), but
|
||||
# don't error if we don't find one.
|
||||
# 3. neither was specified: same was #2
|
||||
#
|
||||
# Then only proceed to do all the rest of the C++ checks if we
|
||||
# both found a c++ compiler and want the C++ bindings (i.e., either
|
||||
# case #1 or #3)
|
||||
|
||||
# Must REQUIRE the PROG_CXX macro and not call it directly here for
|
||||
# reasons well-described in the AC2.64 (and beyond) docs.
|
||||
AC_REQUIRE([OMPI_PROG_CXX])
|
||||
BASECXX="`basename $CXX`"
|
||||
|
||||
AS_IF([test "x$CXX" = "x"], [CXX=none])
|
||||
set dummy $CXX
|
||||
ompi_cxx_argv0=[$]2
|
||||
OPAL_WHICH([$ompi_cxx_argv0], [OMPI_CXX_ABSOLUTE])
|
||||
AS_IF([test "x$OMPI_CXX_ABSOLUTE" = "x"], [OMPI_CXX_ABSOLUTE=none])
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_CXX, "$CXX", [OMPI underlying C++ compiler])
|
||||
AC_SUBST(OMPI_CXX_ABSOLUTE)
|
||||
|
||||
# Make sure that the C++ compiler both works and is actually a C++
|
||||
# compiler (if not cross-compiling). Don't just use the AC macro
|
||||
# so that we can have a pretty message. Do something here that
|
||||
# should force the linking of C++-specific things (e.g., STL
|
||||
# strings) so that we can force a hard check of compiling,
|
||||
# linking, and running a C++ application. Note that some C
|
||||
# compilers, such as at least some versions of the GNU and Intel
|
||||
# compilers, will detect that the file extension is ".cc" and
|
||||
# therefore switch into a pseudo-C++ personality which works for
|
||||
# *compiling*, but does not work for *linking*. So in this test,
|
||||
# we want to cover the entire spectrum (compiling, linking,
|
||||
# running). Note that it is not a fatal error if the C++ compiler
|
||||
# does not work unless the user specifically requested the C++
|
||||
# bindings.
|
||||
AS_IF([test "$CXX" = "none"],
|
||||
[ompi_cxx_compiler_works=no],
|
||||
[AS_IF([test "$ompi_cv_cxx_compiler_vendor" = "microsoft" ],
|
||||
[ompi_cxx_compiler_works=yes],
|
||||
[OPAL_CHECK_COMPILER_WORKS([C++], [#include <string>
|
||||
],
|
||||
[std::string foo = "Hello, world"],
|
||||
[ompi_cxx_compiler_works=yes],
|
||||
[ompi_cxx_compiler_works=no])])])
|
||||
|
||||
AS_IF([test "$ompi_cxx_compiler_works" = "yes"],
|
||||
[_OMPI_SETUP_CXX_COMPILER_BACKEND],
|
||||
[AS_IF([test "$enable_mpi_cxx" = "yes"],
|
||||
[AC_MSG_WARN([Could not find functional C++ compiler, but])
|
||||
AC_MSG_WARN([support for the C++ MPI bindings was requested.])
|
||||
AC_MSG_ERROR([Cannot continue])],
|
||||
[WANT_MPI_CXX_SUPPORT=0])])
|
||||
|
||||
AC_MSG_CHECKING([if able to build the MPI C++ bindings])
|
||||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "1"],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AS_IF([test "$enable_mpi_cxx" = "yes"],
|
||||
[AC_MSG_WARN([MPI C++ binding support requested but not delivered])
|
||||
AC_MSG_ERROR([Cannot continue])])])
|
||||
|
||||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "1"],
|
||||
[OPAL_CXX_COMPILER_VENDOR([ompi_cxx_vendor])])
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
# _OMPI_SETUP_CXX_COMPILER_BACKEND()
|
||||
# ----------------------------------
|
||||
# Back end of _OMPI_SETUP_CXX_COMPILER_BACKEND()
|
||||
AC_DEFUN([_OMPI_SETUP_CXX_COMPILER_BACKEND],[
|
||||
# Do we want code coverage
|
||||
if test "$WANT_COVERAGE" = "1" && test "$WANT_MPI_CXX_SUPPORT" = "1"; then
|
||||
if test "$ompi_cxx_vendor" = "gnu" ; then
|
||||
AC_MSG_WARN([$OMPI_COVERAGE_FLAGS has been added to CFLAGS (--enable-coverage)])
|
||||
WANT_DEBUG=1
|
||||
CXXFLAGS="${CXXFLAGS} $OMPI_COVERAGE_FLAGS"
|
||||
OPAL_WRAPPER_FLAGS_ADD([CXXFLAGS], [$OMPI_COVERAGE_FLAGS])
|
||||
else
|
||||
AC_MSG_WARN([Code coverage functionality is currently available only with GCC suite])
|
||||
AC_MSG_ERROR([Configure: cannot continue])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Do we want debugging?
|
||||
if test "$WANT_DEBUG" = "1" && test "$enable_debug_symbols" != "no" ; then
|
||||
CXXFLAGS="$CXXFLAGS -g"
|
||||
OPAL_FLAGS_UNIQ(CXXFLAGS)
|
||||
AC_MSG_WARN([-g has been added to CXXFLAGS (--enable-debug)])
|
||||
fi
|
||||
|
||||
# These flags are generally g++-specific; even the g++-impersonating
|
||||
# compilers won't accept them.
|
||||
OMPI_CXXFLAGS_BEFORE_PICKY="$CXXFLAGS"
|
||||
if test "$WANT_PICKY_COMPILER" = 1 && test "$ompi_cxx_vendor" = "gnu"; then
|
||||
add="-Wall -Wundef -Wno-long-long"
|
||||
|
||||
# see if -Wno-long-double works...
|
||||
AC_LANG_PUSH(C++)
|
||||
CXXFLAGS_orig="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $add -Wno-long-double -fstrict-prototype"
|
||||
AC_CACHE_CHECK([if $CXX supports -Wno-long-double],
|
||||
[ompi_cv_cxx_wno_long_double],
|
||||
[AC_TRY_COMPILE([], [],
|
||||
[dnl Alright, the -Wno-long-double did not produce any errors...
|
||||
dnl Well well, try to extract a warning regarding unrecognized or ignored options
|
||||
AC_TRY_COMPILE([], [long double test;],
|
||||
[
|
||||
ompi_cv_cxx_wno_long_double="yes"
|
||||
if test -s conftest.err ; then
|
||||
dnl Yes, it should be "ignor", in order to catch ignoring and ignore
|
||||
for i in invalid ignor unrecognized ; do
|
||||
$GREP -iq $i conftest.err
|
||||
if test "$?" = "0" ; then
|
||||
ompi_cv_cxx_wno_long_double="no",
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
],
|
||||
[ompi_cv_cxx_wno_long_double="no"])],
|
||||
[ompi_cv_cxx_wno_long_double="no"])])
|
||||
CXXFLAGS="$CXXFLAGS_orig"
|
||||
AC_LANG_POP(C++)
|
||||
if test "$ompi_cv_cxx_wno_long_double" = "yes" ; then
|
||||
add="$add -Wno-long-double"
|
||||
fi
|
||||
|
||||
CXXFLAGS="$CXXFLAGS $add"
|
||||
OPAL_FLAGS_UNIQ(CXXFLAGS)
|
||||
if test "$add" != "" ; then
|
||||
AC_MSG_WARN([$add has been added to CXXFLAGS (--enable-picky)])
|
||||
fi
|
||||
unset add
|
||||
fi
|
||||
|
||||
# See if this version of g++ allows -finline-functions
|
||||
if test "$GXX" = "yes"; then
|
||||
CXXFLAGS_orig="$CXXFLAGS"
|
||||
CXXFLAGS="$CXXFLAGS -finline-functions"
|
||||
add=
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_CHECK([if $CXX supports -finline-functions],
|
||||
[ompi_cv_cxx_finline_functions],
|
||||
[AC_TRY_COMPILE([], [],
|
||||
[ompi_cv_cxx_finline_functions="yes"],
|
||||
[ompi_cv_cxx_finline_functions="no"])])
|
||||
AC_LANG_POP(C++)
|
||||
if test "$ompi_cv_cxx_finline_functions" = "yes" ; then
|
||||
add=" -finline-functions"
|
||||
fi
|
||||
CXXFLAGS="$CXXFLAGS_orig$add"
|
||||
OPAL_FLAGS_UNIQ(CXXFLAGS)
|
||||
if test "$add" != "" ; then
|
||||
AC_MSG_WARN([$add has been added to CXXFLAGS])
|
||||
fi
|
||||
unset add
|
||||
fi
|
||||
|
||||
# Make sure we can link with the C compiler
|
||||
if test "$ompi_cv_cxx_compiler_vendor" != "microsoft"; then
|
||||
OPAL_LANG_LINK_WITH_C([C++], [],
|
||||
[cat <<EOF >&2
|
||||
**********************************************************************
|
||||
* It appears that your C++ compiler is unable to link against object
|
||||
* files created by your C compiler. This generally indicates either
|
||||
* a conflict between the options specified in CFLAGS and CXXFLAGS
|
||||
* or a problem with the local compiler installation. More
|
||||
* information (including exactly what command was given to the
|
||||
* compilers and what error resulted when the commands were executed) is
|
||||
* available in the config.log file in this directory.
|
||||
**********************************************************************
|
||||
EOF
|
||||
AC_MSG_ERROR([C and C++ compilers are not link compatible. Can not continue.])])
|
||||
fi
|
||||
|
||||
# If we are on HP-UX, ensure that we're using aCC
|
||||
case "$host" in
|
||||
*hpux*)
|
||||
if test "$BASECXX" = "CC"; then
|
||||
AC_MSG_WARN([*** You will probably have problems compiling the MPI 2])
|
||||
AC_MSG_WARN([*** C++ bindings with the HP-UX CC compiler. You should])
|
||||
AC_MSG_WARN([*** probably be using the aCC compiler. Re-run configure])
|
||||
AC_MSG_WARN([*** with the environment variable "CXX=aCC".])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
# Note: gcc-imperonating compilers accept -O3
|
||||
if test "$WANT_DEBUG" = "1"; then
|
||||
OPTFLAGS=
|
||||
else
|
||||
if test "$GXX" = yes; then
|
||||
OPTFLAGS="-O3"
|
||||
else
|
||||
OPTFLAGS="-O"
|
||||
fi
|
||||
fi
|
||||
|
||||
# config/ompi_ensure_contains_optflags.m4
|
||||
OPAL_ENSURE_CONTAINS_OPTFLAGS(["$CXXFLAGS"])
|
||||
AC_MSG_CHECKING([for C++ optimization flags])
|
||||
AC_MSG_RESULT([$co_result])
|
||||
CXXFLAGS="$co_result"
|
||||
|
||||
# bool type size and alignment
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CHECK_SIZEOF(bool)
|
||||
OPAL_C_GET_ALIGNMENT(bool, OPAL_ALIGNMENT_CXX_BOOL)
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
|
||||
# _OMPI_CXX_CHECK_EXCEPTIONS()
|
||||
# ----------------------------
|
||||
# Check for exceptions, skipping the test if we don't want the C++
|
||||
# bindings
|
||||
AC_DEFUN([_OMPI_CXX_CHECK_EXCEPTIONS],[
|
||||
# Check for special things due to C++ exceptions
|
||||
ENABLE_CXX_EXCEPTIONS=no
|
||||
HAVE_CXX_EXCEPTIONS=0
|
||||
AC_ARG_ENABLE([cxx-exceptions],
|
||||
[AC_HELP_STRING([--enable-cxx-exceptions],
|
||||
[enable support for C++ exceptions (default: disabled)])],
|
||||
[ENABLE_CXX_EXCEPTIONS="$enableval"])
|
||||
|
||||
AC_MSG_CHECKING([if want C++ exception handling])
|
||||
|
||||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "0"],
|
||||
[AS_IF([test "$$enable_cxx_exceptions" = "yes"],
|
||||
[AC_MSG_RESULT([error])
|
||||
AC_MSG_WARN([--enable-cxx-exceptions was specified, but the MPI C++ bindings were disabled])
|
||||
AC_MSG_ERROR([Cannot continue])],
|
||||
[AC_MSG_RESULT([skipped])])],
|
||||
[_OMPI_CXX_CHECK_EXCEPTIONS_BACKEND])
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_HAVE_CXX_EXCEPTION_SUPPORT, $HAVE_CXX_EXCEPTIONS,
|
||||
[Whether or not we have compiled with C++ exceptions support])
|
||||
])
|
||||
|
||||
# _OMPI_CXX_CHECK_EXCEPTIONS_BACKEND()
|
||||
# ------------------------------------
|
||||
# Back end of _OMPI_CXX_CHECK_EXCEPTIONS
|
||||
AC_DEFUN([_OMPI_CXX_CHECK_EXCEPTIONS_BACKEND],[
|
||||
AC_MSG_RESULT([$ENABLE_CXX_EXCEPTIONS])
|
||||
if test "$ENABLE_CXX_EXCEPTIONS" = "yes"; then
|
||||
# config/cxx_have_exceptions.m4
|
||||
OMPI_CXX_HAVE_EXCEPTIONS
|
||||
# config/cxx_find_exception_flags.m4
|
||||
OMPI_CXX_FIND_EXCEPTION_FLAGS
|
||||
if test "$OMPI_CXX_EXCEPTIONS" = "1"; then
|
||||
HAVE_CXX_EXCEPTIONS=1
|
||||
|
||||
# Test to see if the C compiler likes these flags
|
||||
AC_MSG_CHECKING([to see if C compiler likes the exception flags])
|
||||
CFLAGS="$CFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS"
|
||||
AC_LANG_SAVE
|
||||
AC_LANG_C
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[int i = 0;]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([C++ exception flags are different between the C and C++ compilers; this configure script cannot currently handle this scenario. Either disable C++ exception support or send mail to the Open MPI users list.])
|
||||
AC_MSG_ERROR([*** Cannot continue])])
|
||||
AC_LANG_RESTORE
|
||||
|
||||
# We can't test the F77 and F90 compilers now because we
|
||||
# haven't found/set the up yet. So just save the flags
|
||||
# and test them later (in ompi_setup_f77.m4 and
|
||||
# ompi_setup_f90.m4).
|
||||
|
||||
CXXFLAGS="$CXXFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS"
|
||||
LDFLAGS="$LDFLAGS $OMPI_CXX_EXCEPTIONS_LDFLAGS"
|
||||
|
||||
OPAL_WRAPPER_FLAGS_ADD([CFLAGS], [$OMPI_CXX_EXCEPTIONS_CXXFLAGS])
|
||||
OPAL_WRAPPER_FLAGS_ADD([CXXFLAGS], [$OMPI_CXX_EXCEPTIONS_CXXFLAGS])
|
||||
OPAL_WRAPPER_FLAGS_ADD([FCFLAGS], [$OMPI_CXX_EXCEPTIONS_CXXFLAGS])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# _OMPI_CXX_CHECK_BUILTIN
|
||||
# -----------------------
|
||||
# Check for __builtin_* stuff
|
||||
AC_DEFUN([_OMPI_CXX_CHECK_BUILTIN],[
|
||||
OPAL_VAR_SCOPE_PUSH([have_cxx_builtin_expect have_cxx_builtin_prefetch])
|
||||
have_cxx_builtin_expect=0
|
||||
have_cxx_builtin_prefetch=0
|
||||
|
||||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "1"],
|
||||
[_OMPI_CXX_CHECK_BUILTIN_BACKEND])
|
||||
|
||||
AC_DEFINE_UNQUOTED([OMPI_CXX_HAVE_BUILTIN_EXPECT],
|
||||
[$have_cxx_builtin_expect],
|
||||
[Whether C++ compiler supports __builtin_expect])
|
||||
AC_DEFINE_UNQUOTED([OMPI_CXX_HAVE_BUILTIN_PREFETCH],
|
||||
[$have_cxx_builtin_prefetch],
|
||||
[Whether C++ compiler supports __builtin_prefetch])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
# _OMPI_CXX_CHECK_BUILTIN_BACKEND
|
||||
# -------------------------------
|
||||
# Back end of _OMPI_CXX_CHECK_BUILTIN
|
||||
AC_DEFUN([_OMPI_CXX_CHECK_BUILTIN_BACKEND],[
|
||||
|
||||
# see if the C++ compiler supports __builtin_expect
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_CHECK([if $CXX supports __builtin_expect],
|
||||
[ompi_cv_cxx_supports___builtin_expect],
|
||||
[AC_TRY_LINK([],
|
||||
[void *ptr = (void*) 0;
|
||||
if (__builtin_expect (ptr != (void*) 0, 1)) return 0;],
|
||||
[ompi_cv_cxx_supports___builtin_expect="yes"],
|
||||
[ompi_cv_cxx_supports___builtin_expect="no"])])
|
||||
if test "$ompi_cv_cxx_supports___builtin_expect" = "yes" ; then
|
||||
have_cxx_builtin_expect=1
|
||||
else
|
||||
have_cxx_builtin_expect=0
|
||||
fi
|
||||
AC_LANG_POP(C++)
|
||||
|
||||
# see if the C compiler supports __builtin_prefetch
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_CHECK([if $CXX supports __builtin_prefetch],
|
||||
[ompi_cv_cxx_supports___builtin_prefetch],
|
||||
[AC_TRY_LINK([],
|
||||
[int ptr;
|
||||
__builtin_prefetch(&ptr,0,0);],
|
||||
[ompi_cv_cxx_supports___builtin_prefetch="yes"],
|
||||
[ompi_cv_cxx_supports___builtin_prefetch="no"])])
|
||||
if test "$ompi_cv_cxx_supports___builtin_prefetch" = "yes" ; then
|
||||
have_cxx_builtin_prefetch=1
|
||||
else
|
||||
have_cxx_builtin_prefetch=0
|
||||
fi
|
||||
AC_LANG_POP(C++)
|
||||
])
|
||||
|
||||
|
||||
# _OMPI_CXX_CHECK_2D_CONST_CAST
|
||||
# -----------------------------
|
||||
# Check for compiler support of 2D const casts
|
||||
AC_DEFUN([_OMPI_CXX_CHECK_2D_CONST_CAST],[
|
||||
OPAL_VAR_SCOPE_PUSH([use_2d_const_cast])
|
||||
use_2d_const_cast=0
|
||||
|
||||
AS_IF([test "$WANT_MPI_CXX_SUPPORT" = "1"],
|
||||
[_OMPI_CXX_CHECK_2D_CONST_CAST_BACKEND])
|
||||
|
||||
AC_DEFINE_UNQUOTED([OMPI_CXX_SUPPORTS_2D_CONST_CAST],
|
||||
[$use_2d_const_cast],
|
||||
[Whether a const_cast on a 2-d array will work with the C++ compiler])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
# _OMPI_CXX_CHECK_2D_CONST_CAST_BACKEND
|
||||
# ---------------------------------
|
||||
# Back end of _OMPI_CHECK_2D_CONST_CAST
|
||||
AC_DEFUN([_OMPI_CXX_CHECK_2D_CONST_CAST_BACKEND],[
|
||||
# see if the compiler supports const_cast of 2-dimensional arrays
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_CACHE_CHECK([if $CXX supports const_cast<> properly],
|
||||
[ompi_cv_cxx_supports_2d_const_cast],
|
||||
[AC_TRY_COMPILE([int non_const_func(int ranges[][3]);
|
||||
int cast_test(const int ranges[][3]) {
|
||||
return non_const_func(const_cast<int(*)[3]>(ranges));
|
||||
}],
|
||||
[],
|
||||
[ompi_cv_cxx_supports_2d_const_cast="yes"],
|
||||
[ompi_cv_cxx_supports_2d_const_cast="no"])])
|
||||
if test "$ompi_cv_cxx_supports_2d_const_cast" = "yes" ; then
|
||||
use_2d_const_cast=1
|
||||
fi
|
||||
AC_LANG_POP(C++)
|
||||
])
|
|
@ -0,0 +1,258 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2007 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2009-2020 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015-2020 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
dnl OMPI_SETUP_FC
|
||||
dnl
|
||||
|
||||
# This is REQUIREd, below.
|
||||
AC_DEFUN_ONCE([_OMPI_SETUP_FC_BANNER],[
|
||||
opal_show_subtitle "Fortran compiler"
|
||||
])
|
||||
|
||||
#############################################################################
|
||||
|
||||
# This is REQUIREd, below.
|
||||
AC_DEFUN_ONCE([_OMPI_SETUP_FC_COMPILER],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_fcflags_save])
|
||||
ompi_fcflags_save="$FCFLAGS"
|
||||
# Note that AC_PROG_FC will look for *any* fortran compiler, and
|
||||
# we don't want it to find an F77-only compiler. The AC docs
|
||||
# don't recommend using the "dialect" feature of AC_PROG_FC, so
|
||||
# instead use the optional first parameter and steal the list of
|
||||
# Fortran compilers (excluding the f77 compiler names) from AC's
|
||||
# default list of compilers and use it here. This is the main
|
||||
# reason we have an OMPI-ized version of the PROG_FC macro.
|
||||
AC_PROG_FC([gfortran f95 fort xlf95 ifort ifc efc pgfortran pgf95 lf95 f90 xlf90 pgf90 epcf90 nagfor])
|
||||
FCFLAGS="$ompi_fcflags_save"
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
#############################################################################
|
||||
|
||||
# General Fortran compiler setup
|
||||
AC_DEFUN([OMPI_SETUP_FC],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_fc_happy LDFLAGS_save fc_version])
|
||||
|
||||
# Force the intro banner to be displayed first
|
||||
AC_REQUIRE([_OMPI_SETUP_FC_BANNER])
|
||||
|
||||
# Unfortunately, we must REQUIRE this for the reasons cited in the
|
||||
# Autoconf (version >= 2.64) docs.
|
||||
AC_REQUIRE([_OMPI_SETUP_FC_COMPILER])
|
||||
|
||||
AS_IF([test -z "$FC"],
|
||||
[AC_MSG_WARN([*** All Fortran MPI bindings disabled (could not find compiler)])
|
||||
ompi_fc_happy=0],
|
||||
[ompi_fc_happy=1])
|
||||
|
||||
AS_IF([test $ompi_fc_happy -eq 1 && test "$WANT_DEBUG" = "1" && test "$enable_debug_symbols" != "no"],
|
||||
[FCFLAGS="$FCFLAGS -g"
|
||||
OPAL_FLAGS_UNIQ(FCFLAGS)
|
||||
AC_MSG_WARN([-g has been added to FCFLAGS (--enable-debug)])
|
||||
])
|
||||
|
||||
# Make sure the compiler actually works, if not cross-compiling.
|
||||
# Don't just use the AC macro so that we can have a pretty
|
||||
# message.
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[OPAL_CHECK_COMPILER_WORKS([Fortran], [], [], [],
|
||||
[AC_MSG_ERROR([Could not run a simple Fortran program. Aborting.])])])
|
||||
|
||||
# OS X before 10.3 (deployment target) does not allow undefined common
|
||||
# symbols in shared libraries. Because we can't figure out how to
|
||||
# implement MPI_STATUSES_IGNORE and friends wihtout common symbols, on
|
||||
# OS X we can't build the F90 bindings as a shared library.
|
||||
OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS=
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[AC_MSG_CHECKING([for extra arguments to build a shared library])
|
||||
case "$host" in
|
||||
*apple-darwin*)
|
||||
if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
|
||||
AC_MSG_RESULT([impossible -- -static])
|
||||
OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS="-static"
|
||||
else
|
||||
case ${MACOSX_DEPLOYMENT_TARGET} in
|
||||
10.[012])
|
||||
AC_MSG_RESULT([impossible -- -static])
|
||||
OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS="-static"
|
||||
;;
|
||||
10.*)
|
||||
AC_MSG_RESULT([-Wl,-single_module])
|
||||
OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS="-Wl,-single_module"
|
||||
esac
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([none needed])
|
||||
OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS=""
|
||||
;;
|
||||
esac])
|
||||
AC_SUBST(OMPI_FORTRAN_EXTRA_SHARED_LIBRARY_FLAGS)
|
||||
|
||||
# The Absoft compiler does not like the fact that we use lots of
|
||||
# "ignore TKR" comment pragmas that it doesn't understand, and
|
||||
# will warn about them. From Tony Goetz at Absoft, we can use the
|
||||
# -Z790 flag to quell these warnings.
|
||||
# The NAG compiler is too picky about naming conventions, so use the
|
||||
# -mismatch flag to keep it happy
|
||||
AC_MSG_CHECKING([for $FC warnings flags])
|
||||
fc_version=`$FC --version 2>&1`
|
||||
case "$fc_version" in
|
||||
*Absoft*)
|
||||
AC_MSG_RESULT([-Z790])
|
||||
FCFLAGS="$FCFLAGS -Z790"
|
||||
;;
|
||||
*NAG*)
|
||||
AC_MSG_RESULT([-mismatch])
|
||||
FCFLAGS="$FCFLAGS -mismatch"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([none])
|
||||
;;
|
||||
esac
|
||||
|
||||
# If we're still good, then save the extra file types. Do this last
|
||||
# because it implies tests that should be invoked by the above tests
|
||||
# (e.g., running the fortran compiler).
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[AC_FC_SRCEXT(f)
|
||||
AC_FC_SRCEXT(f90)])
|
||||
|
||||
# Check to see if we need additional compiler flags for
|
||||
# preprocessing .F90 files.
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[OMPI_FORTRAN_CHECK_PREPROCESS_F90])
|
||||
|
||||
# Per trac #1982, on OS X, we may need some esoteric linker flags
|
||||
# in the wrapper compilers. However, per
|
||||
# https://github.com/open-mpi/ompi/issues/259, we need to use
|
||||
# -Wl,-flat_namespace when *building* the library (and
|
||||
# -Wl,-commons,use_dylibs isn't quite sufficient).
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[AC_MSG_CHECKING([to see if Fortran compilers need additional linker flags])
|
||||
case "$host" in
|
||||
*apple-darwin*)
|
||||
# Test whether -Wl,-flat_namespace works; if it does,
|
||||
# both use it to build the libraries, and also put it
|
||||
# in the wrapper compiler LDFLAGS.
|
||||
LDFLAGS_save=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-flat_namespace"
|
||||
AC_LANG_PUSH([Fortran])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[program test
|
||||
integer :: i
|
||||
end program]])],
|
||||
[LDFLAGS_save=$LDFLAGS
|
||||
OMPI_FORTRAN_WRAPPER_FLAGS="-Wl,-flat_namespace"
|
||||
OPAL_WRAPPER_FLAGS_ADD([FCFLAGS], [$OMPI_FORTRAN_WRAPPER_FLAGS])],
|
||||
[OMPI_FORTRAN_WRAPPER_FLAGS=none])
|
||||
AC_LANG_POP([Fortran])
|
||||
LDFLAGS=$LDFLAGS_save
|
||||
AC_MSG_RESULT([$OMPI_FORTRAN_WRAPPER_FLAGS])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([none])
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
# Get our Fortran symbol mangling scheme
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[OMPI_FORTRAN_FIND_EXT_SYMBOL_CONVENTION])
|
||||
|
||||
# Make sure we can link with C code.
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[OPAL_LANG_LINK_WITH_C([Fortran], [],
|
||||
[cat <<EOF
|
||||
**********************************************************************
|
||||
It appears that your Fortran compiler is unable to link against
|
||||
object files created by your C compiler. This typically indicates
|
||||
one of a few possibilities:
|
||||
|
||||
- A conflict between CFLAGS and FCFLAGS
|
||||
- A problem with your compiler installation(s)
|
||||
- Different default build options between compilers (e.g., C
|
||||
building for 32 bit and Fortran building for 64 bit)
|
||||
- Incompatible compilers
|
||||
|
||||
Such problems can usually be solved by picking compatible compilers
|
||||
and/or CFLAGS and FCFLAGS. More information (including exactly what
|
||||
command was given to the compilers and what error resulted when the
|
||||
commands were executed) is available in the config.log file in this
|
||||
directory.
|
||||
**********************************************************************
|
||||
EOF
|
||||
AC_MSG_ERROR([C and Fortran compilers are not link compatible. Can not continue.])])])
|
||||
|
||||
# Test to see if the Fortran compilers likes the C++ exceptions
|
||||
# flags. If it doesn't, just abort. We *could* handle this
|
||||
# scenario (e.g., probe the Fortran compiler for what flags would
|
||||
# be necessary), but we're kinda assuming that no one will care.
|
||||
# If they do, they'll e-mail us.
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[AC_MSG_CHECKING([to see if Fortran compiler likes the C++ exception flags])
|
||||
AS_IF([test "$OMPI_CXX_EXCEPTIONS_CXXFLAGS" = ""],
|
||||
[AC_MSG_RESULT([skipped (no C++ exceptions flags)])],
|
||||
[FCFLAGS="$FCFLAGS $OMPI_CXX_EXCEPTIONS_CXXFLAGS"
|
||||
AC_LANG_PUSH([Fortran])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
|
||||
INTEGER I
|
||||
I = 3]])],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([C++ exception flags are different between the C and Fortran compilers; this configure script cannot currently handle this scenario. Either disable C++ exception support or send mail to the Open MPI users list.])
|
||||
AC_MSG_ERROR([*** Cannot continue])])
|
||||
AC_LANG_POP
|
||||
])
|
||||
])
|
||||
|
||||
# Per #1982, on OS X, we may need some esoteric linker flags in the
|
||||
# Fortran wrapper compiler.
|
||||
AC_MSG_CHECKING([to see if mpifort compiler needs additional linker flags])
|
||||
case "$host" in
|
||||
*apple-darwin*)
|
||||
# Test whether -Wl,-commons,use_dylibs works; if it does, use it.
|
||||
LDFLAGS_save=$LDFLAGS
|
||||
LDFLAGS="$LDFLAGS -Wl,-commons,use_dylibs"
|
||||
AC_LANG_PUSH([Fortran])
|
||||
AC_LINK_IFELSE([AC_LANG_SOURCE([[program test
|
||||
integer :: i
|
||||
end program]])],
|
||||
[OMPI_FORTRAN_WRAPPER_FLAGS="-Wl,-commons,use_dylibs"
|
||||
OPAL_WRAPPER_FLAGS_ADD([FCFLAGS], [$OMPI_FORTRAN_WRAPPER_FLAGS])],
|
||||
[OMPI_FORTRAN_WRAPPER_FLAGS=none])
|
||||
AC_LANG_POP([Fortran])
|
||||
LDFLAGS=$LDFLAGS_save
|
||||
AC_MSG_RESULT([$OMPI_FORTRAN_WRAPPER_FLAGS])
|
||||
;;
|
||||
*)
|
||||
AC_MSG_RESULT([none])
|
||||
;;
|
||||
esac
|
||||
|
||||
# All done
|
||||
AS_IF([test $ompi_fc_happy -eq 1],
|
||||
[$1], [$2])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])dnl
|
|
@ -0,0 +1,249 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2007-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
dnl Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved
|
||||
dnl Copyright (c) 2013 Intel, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015-2018 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2017 FUJITSU LIMITED. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
dnl _OMPI_SETUP_JAVA()
|
||||
dnl ----------------
|
||||
dnl Invoked by OMPI_SETUP_JAVA only if --enable-mpi-java was specified.
|
||||
AC_DEFUN([_OMPI_SETUP_JAVA],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_java_bad ompi_java_found ompi_java_dir ompi_java_jnih ompi_java_PATH_save ompi_java_CPPFLAGS_save])
|
||||
|
||||
# Check for bozo case: ensure a directory was specified
|
||||
AS_IF([test "$with_jdk_dir" = "yes" || test "$with_jdk_dir" = "no"],
|
||||
[AC_MSG_WARN([Must specify a directory name for --with-jdk-dir])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
AS_IF([test "$with_jdk_bindir" = "yes" || test "$with_jdk_bindir" = "no"],
|
||||
[AC_MSG_WARN([Must specify a directory name for --with-jdk-bindir])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
AS_IF([test "$with_jdk_headers" = "yes" || test "$with_jdk_headers" = "no"],
|
||||
[AC_MSG_WARN([Must specify a directory name for --with-jdk-headers])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
# Check for bozo case: either specify --with-jdk-dir or
|
||||
# (--with-jdk-bindir, --with-jdk-headers) -- not both.
|
||||
ompi_java_bad=0
|
||||
AS_IF([test -n "$with_jdk_dir" && \
|
||||
(test -n "$with_jdk_bindir" || test -n "$with_jdk_headers")],
|
||||
[ompi_java_bad=1])
|
||||
AS_IF([(test -z "$with_jdk_bindir" && test -n "$with_jdk_headers") || \
|
||||
(test -n "$with_jdk_bindir" && test -z "$with_jdk_headers")],
|
||||
[ompi_java_bad=1])
|
||||
AS_IF([test $ompi_java_bad -eq 1],
|
||||
[AC_MSG_WARN([Either specify --with-jdk-dir or both of (--with-jdk_bindir, --with-jdk-headers) -- not both.])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
AS_IF([test -n "$with_jdk_dir"],
|
||||
[with_jdk_bindir=$with_jdk_dir/bin
|
||||
with_jdk_headers=$with_jdk_dir/include])
|
||||
|
||||
##################################################################
|
||||
# with_jdk_dir can now be ignored; with_jdk_bindir and
|
||||
# with_jdk_headers will be either empty or have valid values.
|
||||
##################################################################
|
||||
|
||||
# Some java installations are in obscure places. So let's
|
||||
# hard-code a few of the common ones so that users don't have to
|
||||
# specify --with-java-<foo>=LONG_ANNOYING_DIRECTORY.
|
||||
AS_IF([test -z "$with_jdk_bindir"],
|
||||
[ # OS X/macOS
|
||||
ompi_java_found=0
|
||||
# The following logic was deliberately decided upon in
|
||||
# https://github.com/open-mpi/ompi/pull/5015 specifically
|
||||
# to prevent this script and the rest of Open MPI's build
|
||||
# system from getting confused by the somewhat unorthodox
|
||||
# Java toolchain layout present on OS X/macOS systems,
|
||||
# described in depth by
|
||||
# https://github.com/open-mpi/ompi/pull/5015#issuecomment-379324639,
|
||||
# and mishandling OS X/macOS Java toolchain path detection
|
||||
# as a result.
|
||||
AS_IF([test -x /usr/libexec/java_home],
|
||||
[ompi_java_dir=`/usr/libexec/java_home`],
|
||||
[ompi_java_dir=/System/Library/Frameworks/JavaVM.framework/Versions/Current])
|
||||
AC_MSG_CHECKING([for Java in OS X/macOS locations])
|
||||
AS_IF([test -d $ompi_java_dir],
|
||||
[AC_MSG_RESULT([found ($ompi_java_dir)])
|
||||
ompi_java_found=1
|
||||
if test -d "$ompi_java_dir/Headers" && test -d "$ompi_java_dir/Commands"; then
|
||||
with_jdk_headers=$ompi_java_dir/Headers
|
||||
with_jdk_bindir=$ompi_java_dir/Commands
|
||||
elif test -d "$ompi_java_dir/include" && test -d "$ompi_java_dir/bin"; then
|
||||
with_jdk_headers=$ompi_java_dir/include
|
||||
with_jdk_bindir=$ompi_java_dir/bin
|
||||
else
|
||||
AC_MSG_WARN([No recognized OS X/macOS JDK directory structure found under $ompi_java_dir])
|
||||
ompi_java_found=0
|
||||
fi],
|
||||
[AC_MSG_RESULT([not found])])
|
||||
|
||||
if test "$ompi_java_found" = "0"; then
|
||||
# Various Linux
|
||||
if test -z "$JAVA_HOME"; then
|
||||
ompi_java_dir='/usr/lib/jvm/java-*-openjdk-*/include/'
|
||||
else
|
||||
ompi_java_dir=$JAVA_HOME/include
|
||||
fi
|
||||
ompi_java_jnih=`ls $ompi_java_dir/jni.h 2>/dev/null | head -n 1`
|
||||
AC_MSG_CHECKING([for Java in Linux locations])
|
||||
AS_IF([test -r "$ompi_java_jnih"],
|
||||
[with_jdk_headers=`dirname $ompi_java_jnih`
|
||||
OPAL_WHICH([javac], [with_jdk_bindir])
|
||||
AS_IF([test -n "$with_jdk_bindir"],
|
||||
[AC_MSG_RESULT([found ($with_jdk_headers)])
|
||||
ompi_java_found=1
|
||||
with_jdk_bindir=`dirname $with_jdk_bindir`],
|
||||
[with_jdk_headers=])],
|
||||
[ompi_java_dir='/usr/lib/jvm/default-java/include/'
|
||||
ompi_java_jnih=`ls $ompi_java_dir/jni.h 2>/dev/null | head -n 1`
|
||||
AS_IF([test -r "$ompi_java_jnih"],
|
||||
[with_jdk_headers=`dirname $ompi_java_jnih`
|
||||
OPAL_WHICH([javac], [with_jdk_bindir])
|
||||
AS_IF([test -n "$with_jdk_bindir"],
|
||||
[AC_MSG_RESULT([found ($with_jdk_headers)])
|
||||
ompi_java_found=1
|
||||
with_jdk_bindir=`dirname $with_jdk_bindir`],
|
||||
[with_jdk_headers=])],
|
||||
[AC_MSG_RESULT([not found])])])
|
||||
fi
|
||||
|
||||
if test "$ompi_java_found" = "0"; then
|
||||
# Solaris
|
||||
ompi_java_dir=/usr/java
|
||||
AC_MSG_CHECKING([for Java in Solaris locations])
|
||||
AS_IF([test -d $ompi_java_dir && test -r "$ompi_java_dir/include/jni.h"],
|
||||
[AC_MSG_RESULT([found ($ompi_java_dir)])
|
||||
with_jdk_headers=$ompi_java_dir/include
|
||||
with_jdk_bindir=$ompi_java_dir/bin
|
||||
ompi_java_found=1],
|
||||
[AC_MSG_RESULT([not found])])
|
||||
fi
|
||||
],
|
||||
[ompi_java_found=1])
|
||||
|
||||
if test "$ompi_java_found" = "1"; then
|
||||
OPAL_CHECK_WITHDIR([jdk-bindir], [$with_jdk_bindir], [javac])
|
||||
OPAL_CHECK_WITHDIR([jdk-headers], [$with_jdk_headers], [jni.h])
|
||||
|
||||
# Look for various Java-related programs
|
||||
ompi_java_happy=no
|
||||
ompi_java_PATH_save=$PATH
|
||||
AS_IF([test -n "$with_jdk_bindir" && test "$with_jdk_bindir" != "yes" && test "$with_jdk_bindir" != "no"],
|
||||
[PATH="$with_jdk_bindir:$PATH"])
|
||||
AC_PATH_PROG(JAVAC, javac)
|
||||
AC_PATH_PROG(JAR, jar)
|
||||
AC_PATH_PROG(JAVADOC, javadoc)
|
||||
AC_PATH_PROG(JAVAH, javah)
|
||||
PATH=$ompi_java_PATH_save
|
||||
|
||||
# Check to see if we have all 3 programs.
|
||||
AS_IF([test -z "$JAVAC" || test -z "$JAR" || test -z "$JAVADOC"],
|
||||
[ompi_java_happy=no],
|
||||
[ompi_java_happy=yes])
|
||||
|
||||
# Look for jni.h
|
||||
AS_IF([test "$ompi_java_happy" = "yes"],
|
||||
[ompi_java_CPPFLAGS_save=$CPPFLAGS
|
||||
# silence a stupid Mac warning
|
||||
CPPFLAGS="$CPPFLAGS -DTARGET_RT_MAC_CFM=0"
|
||||
AC_MSG_CHECKING([javac -h])
|
||||
cat > Conftest.java << EOF
|
||||
public final class Conftest {
|
||||
public native void conftest();
|
||||
}
|
||||
EOF
|
||||
AS_IF([$JAVAC -d . -h . Conftest.java > /dev/null 2>&1],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AS_IF([test -n "$JAVAH"],
|
||||
[ompi_javah_happy=yes],
|
||||
[ompi_java_happy=no])])
|
||||
rm -f Conftest.java Conftest.class Conftest.h
|
||||
|
||||
AS_IF([test -n "$with_jdk_headers" && test "$with_jdk_headers" != "yes" && test "$with_jdk_headers" != "no"],
|
||||
[OMPI_JDK_CPPFLAGS="-I$with_jdk_headers"
|
||||
# Some flavors of JDK also require -I<blah>/linux.
|
||||
# See if that's there, and if so, add a -I for that,
|
||||
# too. Ugh.
|
||||
AS_IF([test -d "$with_jdk_headers/linux"],
|
||||
[OMPI_JDK_CPPFLAGS="$OMPI_JDK_CPPFLAGS -I$with_jdk_headers/linux"])
|
||||
# Solaris JDK also require -I<blah>/solaris.
|
||||
# See if that's there, and if so, add a -I for that,
|
||||
# too. Ugh.
|
||||
AS_IF([test -d "$with_jdk_headers/solaris"],
|
||||
[OMPI_JDK_CPPFLAGS="$OMPI_JDK_CPPFLAGS -I$with_jdk_headers/solaris"])
|
||||
# Darwin JDK also require -I<blah>/darwin.
|
||||
# See if that's there, and if so, add a -I for that,
|
||||
# too. Ugh.
|
||||
AS_IF([test -d "$with_jdk_headers/darwin"],
|
||||
[OMPI_JDK_CPPFLAGS="$OMPI_JDK_CPPFLAGS -I$with_jdk_headers/darwin"])
|
||||
|
||||
CPPFLAGS="$CPPFLAGS $OMPI_JDK_CPPFLAGS"])
|
||||
AC_CHECK_HEADER([jni.h], [],
|
||||
[ompi_java_happy=no])
|
||||
CPPFLAGS=$ompi_java_CPPFLAGS_save
|
||||
])
|
||||
else
|
||||
ompi_java_happy=no
|
||||
fi
|
||||
AC_SUBST(OMPI_JDK_CPPFLAGS)
|
||||
|
||||
# Are we happy?
|
||||
AC_MSG_CHECKING([if Java support available])
|
||||
AS_IF([test "$ompi_java_happy" = "yes"],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([Java support requested but not found.])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
||||
|
||||
dnl OMPI_SETUP_JAVA()
|
||||
dnl ----------------
|
||||
dnl Do everything required to setup the Java compiler.
|
||||
AC_DEFUN([OMPI_SETUP_JAVA],[
|
||||
OPAL_VAR_SCOPE_PUSH([ompi_java_happy ompi_javah_happy])
|
||||
|
||||
ompi_java_happy=no
|
||||
ompi_javah_happy=no
|
||||
|
||||
AC_ARG_WITH(jdk-dir,
|
||||
AC_HELP_STRING([--with-jdk-dir(=DIR)],
|
||||
[Location of the JDK header directory. If you use this option, do not specify --with-jdk-bindir or --with-jdk-headers.]))
|
||||
AC_ARG_WITH(jdk-bindir,
|
||||
AC_HELP_STRING([--with-jdk-bindir(=DIR)],
|
||||
[Location of the JDK bin directory. If you use this option, you must also use --with-jdk-headers (and you must NOT use --with-jdk-dir)]))
|
||||
AC_ARG_WITH(jdk-headers,
|
||||
AC_HELP_STRING([--with-jdk-headers(=DIR)],
|
||||
[Location of the JDK header directory. If you use this option, you must also use --with-jdk-bindir (and you must NOT use --with-jdk-dir)]))
|
||||
|
||||
# Only setup the compiler if we were requested to
|
||||
AS_IF([test "$1" = "yes"],
|
||||
[_OMPI_SETUP_JAVA])
|
||||
|
||||
AM_CONDITIONAL(OMPI_HAVE_JAVAH_SUPPORT, test "$ompi_javah_happy" = "yes")
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
])
|
|
@ -0,0 +1,29 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
AC_DEFUN([OMPI_SETUP_MPI_EXT],[
|
||||
opal_show_title "Extended MPI interfaces setup"
|
||||
|
||||
OMPI_EXT
|
||||
])
|
|
@ -0,0 +1,865 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2006-2022 Cisco Systems, Inc. All rights reserved
|
||||
dnl Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2014-2020 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2016 IBM Corporation. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OMPI_SETUP_MPI_FORTRAN],[
|
||||
# Default to building nothing
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
|
||||
|
||||
OMPI_FORTRAN_BUILD_SIZEOF=0
|
||||
|
||||
OMPI_FORTRAN_USEMPI_DIR=
|
||||
OMPI_FORTRAN_USEMPI_LIB=
|
||||
|
||||
OMPI_FORTRAN_USEMPIF08_LIB=
|
||||
|
||||
OMPI_FORTRAN_MAX_ARRAY_RANK=0
|
||||
|
||||
OMPI_FORTRAN_HAVE_INTERFACE=0
|
||||
OMPI_FORTRAN_HAVE_IGNORE_TKR=0
|
||||
OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0
|
||||
OMPI_FORTRAN_HAVE_BIND_C=0
|
||||
OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV=0
|
||||
OMPI_FORTRAN_HAVE_STORAGE_SIZE=0
|
||||
OMPI_FORTRAN_HAVE_ISO_C_BINDING=0
|
||||
OMPI_FORTRAN_HAVE_BIND_C_SUB=0
|
||||
OMPI_FORTRAN_HAVE_BIND_C_TYPE=0
|
||||
OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=0
|
||||
OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK=0
|
||||
OMPI_FORTRAN_HAVE_PRIVATE=0
|
||||
|
||||
# These macros control symbol names for Fortran/C interoperability
|
||||
#
|
||||
OMPI_F08_SUFFIX="_f08"
|
||||
OMPI_F_SUFFIX="_f"
|
||||
|
||||
OMPI_MPI_PREFIX="MPI_"
|
||||
OMPI_MPI_BIND_PREFIX="mpi_"
|
||||
|
||||
# Open MPI now treats $F77 and $FC the same, meaning that we
|
||||
# expect them to be the same back-end compiler. If they're not,
|
||||
# results are undefined. We do a cursory check to see that FC and
|
||||
# F77 are the same string value (if they're defined). If they're
|
||||
# not, we'll issue a warning, but keep going on the assumption
|
||||
# that they're the same back-end compiler (e.g., pgf77 and pgf90).
|
||||
# Open MPI only uses $FC and $FCFLAGS -- $F77 and $FFLAGS are now
|
||||
# ignored.
|
||||
AS_IF([test "$F77" != "" || test "$FFLAGS" != ""],
|
||||
[AC_MSG_WARN([Open MPI now ignores the F77 and FFLAGS environment variables; only the FC and FCFLAGS environment variables are used.])
|
||||
sleep 5])
|
||||
|
||||
#-----------------------------------------------------------------------
|
||||
# If we want any of the Fortran MPI bindings, setup the Fortran compiler
|
||||
#-----------------------------------------------------------------------
|
||||
ompi_fortran_happy=0
|
||||
# $LN_S is used below
|
||||
AC_PROG_LN_S
|
||||
|
||||
ompi_fortran_double_underscore=0
|
||||
ompi_fortran_single_underscore=0
|
||||
ompi_fortran_caps=0
|
||||
ompi_fortran_plain=0
|
||||
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_MPIFH_BINDINGS],
|
||||
[$OMPI_FORTRAN_MPIFH_BINDINGS],
|
||||
[Whether we are building support for the mpif.h bindings or not])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_USEMPI_BINDINGS],
|
||||
[$OMPI_FORTRAN_USEMPI_BINDINGS],
|
||||
[Whether we are building support for the "use mpi" bindings or not])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[$OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[Whether we are building support for the "use mpif08" bindings or not])
|
||||
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS],
|
||||
[OMPI_SETUP_FC([ompi_fortran_happy=1])])
|
||||
|
||||
# These values will be determined by SETUP_FC. We must always
|
||||
# AC_DEFINE these results, even in the --disable-mpi-fortran case,
|
||||
# for ompi_info.
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_DOUBLE_UNDERSCORE],
|
||||
[$ompi_fortran_double_underscore],
|
||||
[Whether fortran symbols have a trailing double underscore or not])
|
||||
OMPI_FORTRAN_DOUBLE_UNDERSCORE=$ompi_fortran_double_underscore
|
||||
AC_SUBST(OMPI_FORTRAN_DOUBLE_UNDERSCORE)
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_SINGLE_UNDERSCORE],
|
||||
[$ompi_fortran_single_underscore],
|
||||
[Whether fortran symbols have a trailing underscore or not])
|
||||
OMPI_FORTRAN_SINGLE_UNDERSCORE=$ompi_fortran_single_underscore
|
||||
AC_SUBST(OMPI_FORTRAN_SINGLE_UNDERSCORE)
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_CAPS],
|
||||
[$ompi_fortran_caps],
|
||||
[Whether fortran symbols are all caps or not])
|
||||
OMPI_FORTRAN_CAPS=$ompi_fortran_caps
|
||||
AC_SUBST(OMPI_FORTRAN_CAPS)
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_PLAIN],
|
||||
[$ompi_fortran_plain],
|
||||
[Whether fortran symbols have no trailing underscore or not])
|
||||
OMPI_FORTRAN_PLAIN=$ompi_fortran_plain
|
||||
AC_SUBST(OMPI_FORTRAN_PLAIN)
|
||||
|
||||
# Check to see if any of the MPI Fortran bindings were
|
||||
# specifically requested. If so, and we weren't able to setup the
|
||||
# Fortran compiler properly, it's an error.
|
||||
AS_IF([test $ompi_fortran_happy -eq 0 && \
|
||||
test $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS],
|
||||
[AC_MSG_WARN([MPI Fortran bindings requested, but no suitable Fortran compiler found])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
|
||||
# This allows us to mark bogus types, but still have them be a valid
|
||||
# [sentinel] value
|
||||
AC_DEFINE([ompi_fortran_bogus_type_t], [int],
|
||||
[A bogus type that allows us to have sentinel type values that are still valid])
|
||||
|
||||
# These get filled in as we check for each type
|
||||
OMPI_FORTRAN_IKINDS=
|
||||
OMPI_FORTRAN_RKINDS=
|
||||
OMPI_FORTRAN_CKINDS=
|
||||
|
||||
# We want to set the #define's for all of these, so invoke the macros
|
||||
# regardless of whether we have F77 support or not.
|
||||
OMPI_FORTRAN_CHECK([CHARACTER], [yes],
|
||||
[char, int32_t, int, int64_t, long long, long], [-1], [yes])
|
||||
|
||||
OMPI_FORTRAN_CHECK([LOGICAL], [yes],
|
||||
[char, int32_t, int, int64_t, long long, long], [-1], [yes])
|
||||
OMPI_FORTRAN_CHECK([LOGICAL*1], [yes],
|
||||
[char, int8_t, short, int32_t, int, int64_t, long long, long], [1], [yes])
|
||||
OMPI_FORTRAN_CHECK([LOGICAL*2], [yes],
|
||||
[short, int16_t, int32_t, int, int64_t, long long, long], [2], [yes])
|
||||
OMPI_FORTRAN_CHECK([LOGICAL*4], [yes],
|
||||
[int32_t, int, int64_t, long long, long], [4], [yes])
|
||||
OMPI_FORTRAN_CHECK([LOGICAL*8], [yes],
|
||||
[int, int64_t, long long, long], [8], [yes])
|
||||
|
||||
OMPI_FORTRAN_CHECK([INTEGER], [yes],
|
||||
[int32_t, int, int64_t, long long, long], [-1], [yes])
|
||||
OMPI_FORTRAN_CHECK([INTEGER*1], [no],
|
||||
[char, int8_t, short, int, int64_t, long long, long], [1], [yes])
|
||||
OMPI_FORTRAN_CHECK([INTEGER*2], [no],
|
||||
[short, int16_t, int32_t, int, int64_t, long long, long], [2], [yes])
|
||||
OMPI_FORTRAN_CHECK([INTEGER*4], [no],
|
||||
[int32_t, int, int64_t, long long, long], [4], [yes])
|
||||
OMPI_FORTRAN_CHECK([INTEGER*8], [no],
|
||||
[int, int64_t, long long, long], [8], [yes])
|
||||
OMPI_FORTRAN_CHECK([INTEGER*16], [no],
|
||||
[int, int64_t, long long, long], [16], [yes])
|
||||
|
||||
OMPI_FORTRAN_CHECK([REAL], [yes],
|
||||
[float, double, long double], [-1], [yes])
|
||||
OMPI_FORTRAN_CHECK([REAL*2], [no],
|
||||
[float, double, long double], [2], [yes])
|
||||
OMPI_FORTRAN_CHECK([REAL*4], [no],
|
||||
[float, double, long double], [4], [yes])
|
||||
OMPI_FORTRAN_CHECK([REAL*8], [no],
|
||||
[float, double, long double], [8], [yes])
|
||||
OMPI_FORTRAN_CHECK([REAL*16], [no],
|
||||
[float, double, long double], [16], [yes])
|
||||
|
||||
# In some compilers, the bit representation of REAL*16 is not the same
|
||||
# as the C counterpart that we found. If this is the case, then we
|
||||
# want to disable reduction support for MPI_REAL16 (per ticket #1603).
|
||||
OMPI_FORTRAN_CHECK_REAL16_C_EQUIV
|
||||
|
||||
OMPI_FORTRAN_CHECK([DOUBLE PRECISION], [yes],
|
||||
[float, double, long double], [-1], [yes])
|
||||
|
||||
OMPI_FORTRAN_CHECK([COMPLEX], [yes], [float _Complex, double _Complex], [-1], [no])
|
||||
|
||||
# The complex*N tests are a bit different (note: the complex tests are
|
||||
# the same as all the rest, because complex is a composite of two
|
||||
# reals, which we *have* to have. It's only the complex*N tests that
|
||||
# are different). The fortran complex types are composites of the
|
||||
# real*(N/2) types. So for us to support complex*N, two conditions
|
||||
# must be true:
|
||||
#
|
||||
# a) we must support real*(N/2) (i.e., compiler supports it and we
|
||||
# have a back-end C type for it)
|
||||
# b) compiler supports complex*N
|
||||
|
||||
OMPI_FORTRAN_CHECK([COMPLEX*4], [no], [float _Complex], [4], [no])
|
||||
OMPI_FORTRAN_CHECK([COMPLEX*8], [no],
|
||||
[float _Complex, double _Complex, long double _Complex],
|
||||
[8], [no])
|
||||
OMPI_FORTRAN_CHECK([COMPLEX*16], [no],
|
||||
[float _Complex, double _Complex, long double _Complex],
|
||||
[16], [no])
|
||||
OMPI_FORTRAN_CHECK([COMPLEX*32], [no],
|
||||
[float _Complex, double _Complex, long double _Complex],
|
||||
[32], [no])
|
||||
# Double precision complex types are not standard, but many
|
||||
# compilers support it. Code should be wrapped with #ifdef
|
||||
# OMPI_HAVE_FORTRAN_DOUBLE_COMPLEX
|
||||
OMPI_FORTRAN_CHECK([DOUBLE COMPLEX], [no],
|
||||
[float _Complex, double _Complex, long double _Complex],
|
||||
[-1], [no])
|
||||
|
||||
# Regardless of whether we have fortran bindings, or even a
|
||||
# fortran compiler, get the max value for a fortran MPI handle
|
||||
# (this macro handles the case where we don't have a fortran
|
||||
# compiler).
|
||||
OMPI_FORTRAN_GET_HANDLE_MAX
|
||||
|
||||
# Check for Fortran compilers value of TRUE and for the correct
|
||||
# assumption on LOGICAL for conversion into what C considers to be
|
||||
# a true value.
|
||||
OMPI_FORTRAN_GET_VALUE_TRUE
|
||||
OMPI_FORTRAN_CHECK_LOGICAL_ARRAY
|
||||
|
||||
# Find out how many array ranks this compiler supports.
|
||||
OMPI_FORTRAN_CHECK_MAX_ARRAY_RANK
|
||||
|
||||
# How big should MPI_STATUS_SIZE be? (i.e., the size of
|
||||
# MPI_STATUS, expressed in units of Fortran INTEGERs). The C
|
||||
# equivalent of MPI_Status contains 4 C ints and a size_t.
|
||||
OMPI_FORTRAN_STATUS_SIZE=0
|
||||
AC_MSG_CHECKING([for the value of MPI_STATUS_SIZE])
|
||||
bytes=`expr 4 \* $ac_cv_sizeof_int + $ac_cv_sizeof_size_t`
|
||||
num_integers=`expr $bytes / $ac_cv_sizeof_int`
|
||||
sanity=`expr $num_integers \* $ac_cv_sizeof_int`
|
||||
AS_IF([test "$sanity" != "$bytes"],
|
||||
[AC_MSG_RESULT([unknown!])
|
||||
AC_MSG_WARN([WARNING: Size of C int: $ac_cv_sizeof_int])
|
||||
AC_MSG_WARN([WARNING: Size of C size_t: $ac_cv_sizeof_size_t])
|
||||
AC_MSG_WARN([WARNING: Size of Fortran INTEGER: $OMPI_SIZEOF_FORTRAN_INTEGER])
|
||||
AC_MSG_WARN([Could not make this work out evenly...!])
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
OMPI_FORTRAN_STATUS_SIZE=$num_integers
|
||||
AC_MSG_RESULT([$OMPI_FORTRAN_STATUS_SIZE Fortran INTEGERs])
|
||||
AC_SUBST(OMPI_FORTRAN_STATUS_SIZE)
|
||||
|
||||
# Setup for the compilers that don't support ignore TKR functionality
|
||||
OPAL_UNIQ(OMPI_FORTRAN_IKINDS)
|
||||
AC_SUBST(OMPI_FORTRAN_IKINDS)
|
||||
OPAL_UNIQ(OMPI_FORTRAN_RKINDS)
|
||||
AC_SUBST(OMPI_FORTRAN_RKINDS)
|
||||
OPAL_UNIQ(OMPI_FORTRAN_CKINDS)
|
||||
AC_SUBST(OMPI_FORTRAN_CKINDS)
|
||||
|
||||
# We can't use C_INTxx_T KIND values in mpif.h because many
|
||||
# existing MPI Fortran applications are of the form:
|
||||
#
|
||||
# program main
|
||||
# implicit none
|
||||
# include 'mpif.h'
|
||||
#
|
||||
# ...and you can't have a "use..." statement before that (to get
|
||||
# the Fortran/C interop C_INTxx_T KIND values). So figure out
|
||||
# those KIND values here and just substitue them in via
|
||||
# AC_DEFINE's. Kinda gross, but there you are. :-\
|
||||
OMPI_FORTRAN_GET_KIND_VALUE([C_INT16_T], 4, [OMPI_FORTRAN_C_INT16_T_KIND])
|
||||
OMPI_FORTRAN_GET_KIND_VALUE([C_INT32_T], 9, [OMPI_FORTRAN_C_INT32_T_KIND])
|
||||
OMPI_FORTRAN_GET_KIND_VALUE([C_INT64_T], 18, [OMPI_FORTRAN_C_INT64_T_KIND])
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fortran mpif.h MPI bindings
|
||||
#--------------------------------------------------------
|
||||
|
||||
AC_MSG_CHECKING([if building Fortran mpif.h bindings])
|
||||
AS_IF([test $ompi_fortran_happy -eq 1],
|
||||
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
|
||||
AC_MSG_RESULT([yes])],
|
||||
[OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_NO_BINDINGS
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
# "INTERFACE" is needed for MPI_SIZEOF
|
||||
AS_IF([test $ompi_fortran_happy -eq 1],
|
||||
[OMPI_FORTRAN_CHECK_INTERFACE(
|
||||
[OMPI_FORTRAN_HAVE_INTERFACE=1],
|
||||
[OMPI_FORTRAN_HAVE_INTERFACE=0])])
|
||||
AC_SUBST(OMPI_FORTRAN_HAVE_INTERFACE)
|
||||
|
||||
# The iso_fortran_env module is needed for MPI_SIZEOF
|
||||
AS_IF([test $ompi_fortran_happy -eq 1],
|
||||
[OMPI_FORTRAN_CHECK_ISO_FORTRAN_ENV(
|
||||
[OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV=1],
|
||||
[OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV=0])])
|
||||
AC_SUBST(OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV)
|
||||
|
||||
# Ensure that the fortran compiler supports STORAGE_SIZE for
|
||||
# enough relevant types.
|
||||
AS_IF([test $ompi_fortran_happy -eq 1],
|
||||
[OMPI_FORTRAN_CHECK_STORAGE_SIZE(
|
||||
[OMPI_FORTRAN_HAVE_STORAGE_SIZE=1],
|
||||
[OMPI_FORTRAN_HAVE_STORAGE_SIZE=0])])
|
||||
AC_SUBST(OMPI_FORTRAN_HAVE_STORAGE_SIZE)
|
||||
|
||||
# We need INTERFACE, ISO_FORTRAN_ENV, and STORAGE_SIZE() support
|
||||
# to build MPI_SIZEOF support
|
||||
AS_IF([test $ompi_fortran_happy -eq 1 && \
|
||||
test $OMPI_FORTRAN_HAVE_INTERFACE -eq 1 && \
|
||||
test $OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV -eq 1 && \
|
||||
test $OMPI_FORTRAN_HAVE_STORAGE_SIZE -eq 1],
|
||||
[OMPI_FORTRAN_BUILD_SIZEOF=1],
|
||||
[OMPI_FORTRAN_BUILD_SIZEOF=0])
|
||||
AC_SUBST(OMPI_FORTRAN_BUILD_SIZEOF)
|
||||
|
||||
#--------------------------------------------
|
||||
# Fortran use mpi or use mpi_f08 MPI bindings
|
||||
#--------------------------------------------
|
||||
|
||||
AS_IF([test $ompi_fortran_happy -eq 1 && \
|
||||
test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS],
|
||||
[ # Look for the fortran module compiler flag
|
||||
OMPI_FORTRAN_FIND_MODULE_INCLUDE_FLAG([],
|
||||
[AC_MSG_WARN([*** Could not determine the fortran compiler flag to indicate where modules reside])
|
||||
AC_MSG_ERROR([*** Cannot continue])])
|
||||
|
||||
# Look for ignore TKR syntax
|
||||
OMPI_FORTRAN_CHECK_IGNORE_TKR([OMPI_FORTRAN_HAVE_IGNORE_TKR=1])
|
||||
])
|
||||
|
||||
# If we got here, we can build the mpi module if it was requested.
|
||||
# Decide whether to build the ignore TKR version or the
|
||||
# non-ignore-TKR/legacy version.
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \
|
||||
test $ompi_fortran_happy -eq 1],
|
||||
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS
|
||||
AS_IF([test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
|
||||
[OMPI_FORTRAN_USEMPI_DIR=mpi/fortran/use-mpi-ignore-tkr
|
||||
OMPI_FORTRAN_USEMPI_LIB=-l${with_libmpi_name}_usempi_ignore_tkr],
|
||||
[OMPI_FORTRAN_USEMPI_DIR=mpi/fortran/use-mpi-tkr
|
||||
OMPI_FORTRAN_USEMPI_LIB=-l${with_libmpi_name}_usempi])
|
||||
])
|
||||
|
||||
OMPI_FORTRAN_HAVE_ISO_C_BINDING=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \
|
||||
test $ompi_fortran_happy -eq 1],
|
||||
[OMPI_FORTRAN_CHECK_ISO_C_BINDING(
|
||||
[OMPI_FORTRAN_HAVE_ISO_C_BINDING=1],
|
||||
[OMPI_FORTRAN_HAVE_ISO_C_BINDING=0])])
|
||||
|
||||
AC_MSG_CHECKING([if building Fortran 'use mpi' bindings])
|
||||
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[OMPI_TRY_FORTRAN_BINDINGS=$OMPI_FORTRAN_MPIFH_BINDINGS
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
#---------------------------------
|
||||
# Fortran use mpi_f08 MPI bindings
|
||||
#---------------------------------
|
||||
|
||||
# If we got all the stuff from above, then also look for the new
|
||||
# F08 syntax that we can use for the use_mpif08 module.
|
||||
|
||||
# We need to have ignore TKR functionality to build the mpi_f08
|
||||
# module
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1],
|
||||
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPIF08_BINDINGS
|
||||
OMPI_FORTRAN_F08_PREDECL=$OMPI_FORTRAN_IGNORE_TKR_PREDECL
|
||||
OMPI_FORTRAN_F08_TYPE=$OMPI_FORTRAN_IGNORE_TKR_TYPE
|
||||
])
|
||||
|
||||
# The mpi_f08 module in this version of Open MPI does not properly
|
||||
# handle if sizeof(INTEGER) != sizeof(int) with the mpi_f08
|
||||
# bindings. As of July 2020, this issue is fixed on main / what
|
||||
# will eventually become Open MPI v5.0.x, but the fix causes an
|
||||
# ABI break. Hence, we're not going to fix it here on this
|
||||
# release branch.
|
||||
#
|
||||
# This is a bit of a quandry, however, because up until v4.0.4, we
|
||||
# built the Open MPI F08 bindings by default (if the compiler
|
||||
# supported them), even in this problematic scenario. Meaning: a
|
||||
# user could use the exact same compilers + configure command line
|
||||
# between v4.0.4 and v4.0.5 and suddenly -- probably unexpectedly
|
||||
# -- not get F08 bindings. That seems a little weird.
|
||||
#
|
||||
# Instead, if we're in the "bad" scenario (sizeof(int) !=
|
||||
# sizeof(INTEGER)), if the user didn't explicitly disable the
|
||||
# mpi_f08 module, we'll print a Giant Error Message (GEM) and tell
|
||||
# them what their options are. This may be slightly annoying for
|
||||
# the user, but it at least it won't violate the Law of Least
|
||||
# Surprise.
|
||||
#
|
||||
# Note that mpif.h and mpi module are still ok in the sizeof(int)
|
||||
# != sizeof(INTEGER) scenario; this isssue *only* affects the use
|
||||
# of mpi_f08's TYPE(MPI_Status).
|
||||
#
|
||||
# The following URLs shed some light on this decision:
|
||||
#
|
||||
# - https://github.com/open-mpi/ompi/pull/7921 -- in particular,
|
||||
# the comment at
|
||||
# https://github.com/open-mpi/ompi/pull/7921#issuecomment-656418618
|
||||
# - https://github.com/open-mpi/ompi/pull/7922 -- in particlar,
|
||||
# the comment at
|
||||
# https://github.com/open-mpi/ompi/pull/7922#issuecomment-656788803
|
||||
#
|
||||
AC_MSG_CHECKING([if sizeof(C int) == sizeof(Fortran INTEGER)])
|
||||
AS_IF([test $ac_cv_sizeof_int -eq $OMPI_SIZEOF_FORTRAN_INTEGER],
|
||||
[AC_MSG_RESULT([yes])],
|
||||
[AC_MSG_RESULT([no])
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[c=$ac_cv_sizeof_int
|
||||
f=$OMPI_SIZEOF_FORTRAN_INTEGER
|
||||
cat <<EOF
|
||||
|
||||
=========================================================================
|
||||
ERROR ERROR ERROR
|
||||
|
||||
Configure has detected that the size of a C integer ($c bytes) is
|
||||
different than the size of a Fortran INTEGER ($f bytes). In the
|
||||
entire v3.x and v4.x series of Open MPI, this configuration is known
|
||||
to cause data corruption with the mpi_f08 module (it does *not* cause
|
||||
problems with mpif.h or the mpi module bindings).
|
||||
|
||||
You may either choose to change the compiler flags
|
||||
(in order to have the size of a Fortran INTEGER be the same as
|
||||
the size of a C int) and re-run configure, or you may specify the
|
||||
--enable-mpi-fortran=usempi flag to configure to explicitly
|
||||
disable building the mpi_f08 module.
|
||||
|
||||
(NOTE: this error has been fixed in Open MPI releases beyond v4.x)
|
||||
|
||||
=========================================================================
|
||||
|
||||
EOF
|
||||
AC_MSG_ERROR([Cannot continue])])
|
||||
])
|
||||
|
||||
# The overall "_BIND_C" variable will be set to 1 if we have all
|
||||
# the necessary forms of BIND(C)
|
||||
OMPI_FORTRAN_HAVE_BIND_C=0
|
||||
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # If we don't have ISO C bindings, we won't build mpi_f08 at all
|
||||
AS_IF([test "$OMPI_FORTRAN_HAVE_ISO_C_BINDING" -eq 0],
|
||||
[OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_BIND_C_SUB=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # If we don't have SUBROUTINE BIND(C), we won't build mpi_f08 at all
|
||||
OMPI_FORTRAN_CHECK_BIND_C_SUB(
|
||||
[OMPI_FORTRAN_HAVE_BIND_C_SUB=1],
|
||||
[OMPI_FORTRAN_HAVE_BIND_C_SUB=0
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_BIND_C_TYPE=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # If we don't have TYPE, BIND(C), we won't build mpi_f08 at all
|
||||
OMPI_FORTRAN_CHECK_BIND_C_TYPE(
|
||||
[OMPI_FORTRAN_HAVE_BIND_C_TYPE=1],
|
||||
[OMPI_FORTRAN_HAVE_BIND_C_TYPE=0
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
# Per discussion on the devel list starting here:
|
||||
# http://www.open-mpi.org/community/lists/devel/2014/01/13799.php
|
||||
# we need a new litmus test to disqualify older Fortran compilers
|
||||
# (e.g., Pathscale 4.0.12) that *seem* to support all the Right
|
||||
# Things, but a) do not support BIND(C, name="super_long_name") or
|
||||
# b) run into an internal error when compiling our mpi_f08 module.
|
||||
# Testing for b) is sketchy at best. But OMPI has some BIND(C)
|
||||
# names that are >32 characters, and the same compilers that
|
||||
# exhibit b) also seem to not support BIND(C) names that are >32
|
||||
# characters (i.e., a)). Hence, the following BIND(C) test checks
|
||||
# to ensure that BIND(C, name="foo") works, where "foo" is
|
||||
# actually a name >32 characters.
|
||||
OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # If we don't have TYPE, BIND(C, name="foo"), we won't build mpi_f08 at all
|
||||
OMPI_FORTRAN_CHECK_BIND_C_TYPE_NAME(
|
||||
[ # If we got here, we have all the required forms of
|
||||
# BIND(C), so set the top-level _BIND_C variable to 1.
|
||||
OMPI_FORTRAN_HAVE_BIND_C=1
|
||||
OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=1],
|
||||
[OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME=0
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
# Per https://svn.open-mpi.org/trac/ompi/ticket/4590, if the
|
||||
# Fortran compiler doesn't support PROCEDURE in the way we
|
||||
# want/need, disable the mpi_f08 module.
|
||||
OMPI_FORTRAN_HAVE_PROCEDURE=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler support "procedure"
|
||||
OMPI_FORTRAN_CHECK_PROCEDURE(
|
||||
[OMPI_FORTRAN_HAVE_PROCEDURE=1],
|
||||
[OMPI_FORTRAN_HAVE_PROCEDURE=0
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
# Per https://github.com/open-mpi/ompi/issues/857, if the Fortran
|
||||
# compiler doesn't properly support "USE ... ONLY" notation,
|
||||
# disable the mpi_f08 module.
|
||||
OMPI_FORTRAN_HAVE_USE_ONLY=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler support "USE ... ONLY"
|
||||
OMPI_FORTRAN_CHECK_USE_ONLY(
|
||||
[OMPI_FORTRAN_HAVE_USE_ONLY=1],
|
||||
[OMPI_FORTRAN_HAVE_USE_ONLY=0
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler have optional arguments?
|
||||
OMPI_FORTRAN_CHECK_OPTIONAL_ARGS(
|
||||
[OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=1],
|
||||
[OMPI_FORTRAN_HAVE_OPTIONAL_ARGS=0
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_C_FUNLOC=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler supports c_funloc per
|
||||
# TS 29113 subclause 8.1 ?
|
||||
OMPI_FORTRAN_CHECK_C_FUNLOC(
|
||||
[OMPI_FORTRAN_HAVE_C_FUNLOC=1],
|
||||
[OMPI_FORTRAN_HAVE_C_FUNLOC=0
|
||||
OMPI_BUILD_FORTRAN_BINDINGS=$OMPI_FORTRAN_USEMPI_BINDINGS])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_PRIVATE=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler support "private"
|
||||
OMPI_FORTRAN_CHECK_PRIVATE(
|
||||
[OMPI_FORTRAN_HAVE_PRIVATE=1],
|
||||
[OMPI_FORTRAN_HAVE_PRIVATE=0])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_PROTECTED=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler support "protected"
|
||||
OMPI_FORTRAN_CHECK_PROTECTED(
|
||||
[OMPI_FORTRAN_HAVE_PROTECTED=1],
|
||||
[OMPI_FORTRAN_HAVE_PROTECTED=0])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_ABSTRACT=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler support "abstract"
|
||||
OMPI_FORTRAN_CHECK_ABSTRACT(
|
||||
[OMPI_FORTRAN_HAVE_ABSTRACT=1],
|
||||
[OMPI_FORTRAN_HAVE_ABSTRACT=0])])
|
||||
|
||||
OMPI_FORTRAN_HAVE_ASYNCHRONOUS=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Does the compiler support "asynchronous"
|
||||
OMPI_FORTRAN_CHECK_ASYNCHRONOUS(
|
||||
[OMPI_FORTRAN_HAVE_ASYNCHRONOUS=1],
|
||||
[OMPI_FORTRAN_HAVE_ASYNCHRONOUS=0])])
|
||||
|
||||
OMPI_FORTRAN_F08_HANDLE_SIZE=4
|
||||
OMPI_FORTRAN_F08_HANDLE_ALIGNMENT=4
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # How big are derived types with a single INTEGER?
|
||||
OMPI_FORTRAN_GET_SIZEOF([type, BIND(C) :: test_mpi_handle
|
||||
integer :: MPI_VAL
|
||||
end type test_mpi_handle],
|
||||
[type(test_mpi_handle)],
|
||||
[OMPI_FORTRAN_F08_HANDLE_SIZE])
|
||||
OMPI_FORTRAN_F08_GET_HANDLE_ALIGNMENT(
|
||||
[type(test_mpi_handle)],
|
||||
[OMPI_FORTRAN_F08_HANDLE_ALIGNMENT])
|
||||
])
|
||||
|
||||
OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1
|
||||
OMPI_FORTRAN_F08_PREDECL='!'
|
||||
OMPI_FORTRAN_F08_TYPE=real
|
||||
OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK=0
|
||||
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[ # Look for Fortran 2008 assumed rank syntax
|
||||
OMPI_FORTRAN_CHECK_F08_ASSUMED_RANK(
|
||||
[ # If we have assumed rank, we can build the use
|
||||
# mpi_f08 module "better"
|
||||
OMPI_FORTRAN_F08_PREDECL='!'
|
||||
OMPI_FORTRAN_F08_TYPE='type(*), dimension(..)'
|
||||
OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK=1])
|
||||
|
||||
# Which mpi_f08 implementation are we using?
|
||||
# a) compiler supports BIND(C) and optional arguments
|
||||
# ("good" compilers)
|
||||
# b) compiler that does not support the items listed
|
||||
# in b) ("bad" compilers)
|
||||
|
||||
AC_MSG_CHECKING([which mpi_f08 implementation to build])
|
||||
AS_IF([test $OMPI_FORTRAN_HAVE_OPTIONAL_ARGS -eq 1],
|
||||
[ # Case a) "good compiler"
|
||||
OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=0
|
||||
AC_MSG_RESULT(["good" compiler, no array subsections])
|
||||
],
|
||||
[ # Case b) "bad compiler"
|
||||
OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1
|
||||
AC_MSG_RESULT(["bad" compiler, no array subsections])
|
||||
])
|
||||
])
|
||||
|
||||
# Note: the current implementation *only* has wrappers;
|
||||
# there is no optimized implementation for a "good"
|
||||
# compiler. I'm leaving the above logic in place for
|
||||
# if we ever do the optimized/no-wrapper
|
||||
# implementation, but for now, I'm just hard-wiring
|
||||
# OMPI_FORTRAN_NEED_WRAPPER_ROUTINES to 1 when we're
|
||||
# building the F08 wrappers.
|
||||
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=1],
|
||||
[OMPI_FORTRAN_NEED_WRAPPER_ROUTINES=0])
|
||||
|
||||
AC_MSG_CHECKING([if building Fortran 'use mpi_f08' bindings])
|
||||
AS_IF([test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS],
|
||||
[OMPI_FORTRAN_USEMPIF08_LIB=-l${with_libmpi_name}_usempif08
|
||||
AC_MSG_RESULT([yes])],
|
||||
[OMPI_TRY_FORTRAN_BINDIGS=$OMPI_FORTRAN_USEMPI_BINDINGS
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
# If Fortran bindings is requested, make sure at least one can be built
|
||||
AS_IF([test $OMPI_MIN_REQUIRED_FORTRAN_BINDINGS -gt $OMPI_BUILD_FORTRAN_BINDINGS],
|
||||
[AC_MSG_ERROR([Cannot build requested Fortran bindings, aborting])])
|
||||
|
||||
# -------------------
|
||||
# mpif.h final setup
|
||||
# -------------------
|
||||
|
||||
# A preprocessor header file just for Fortran. We cannot use AC
|
||||
# CONFIG_HEADER because it adds a /* */-style comment at the top,
|
||||
# and this header file must be usable in .F90 files. :-(
|
||||
AC_CONFIG_FILES([ompi/mpi/fortran/configure-fortran-output.h])
|
||||
|
||||
# Values for wrapper compilers
|
||||
OMPI_FC=$FC
|
||||
set dummy $OMPI_FC
|
||||
OMPI_FC_ARGV0=[$]2
|
||||
AS_IF([test -n "$OMPI_FC_ARGV0"],
|
||||
[BASEFC="`basename $OMPI_FC_ARGV0`"
|
||||
OPAL_WHICH([$OMPI_FC_ARGV0], [OMPI_FC_ABSOLUTE])],
|
||||
[OMPI_FC=none
|
||||
BASEFC=none
|
||||
OMPI_FC_ABSOLUTE=none])
|
||||
|
||||
AC_SUBST(OMPI_FC)
|
||||
AC_SUBST(OMPI_FC_ABSOLUTE)
|
||||
AC_DEFINE_UNQUOTED(OMPI_FC, ["$OMPI_FC"], [Underlying Fortran compiler])
|
||||
AC_DEFINE_UNQUOTED(OMPI_FC_ABSOLUTE, ["$OMPI_FC_ABSOLUTE"],
|
||||
[Absolutey path to the underlying Fortran compiler found by configure])
|
||||
|
||||
# These go into ompi/info/param.c
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_BUILD_SIZEOF],
|
||||
[$OMPI_FORTRAN_BUILD_SIZEOF],
|
||||
[Whether the mpif.h interface supports the MPI_SIZEOF interface or not])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_INTERFACE],
|
||||
[$OMPI_FORTRAN_HAVE_INTERFACE],
|
||||
[Whether the compiler supports INTERFACE or not])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV],
|
||||
[$OMPI_FORTRAN_HAVE_ISO_FORTRAN_ENV],
|
||||
[Whether the compiler supports ISO_FORTRAN_ENV or not])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_STORAGE_SIZE],
|
||||
[$OMPI_FORTRAN_HAVE_STORAGE_SIZE],
|
||||
[Whether the compiler supports STORAGE_SIZE on relevant types])
|
||||
|
||||
# This conditional is used to determine whether we compile the
|
||||
# various .f90 files that contain MPI_SIZEOF implementations.
|
||||
AM_CONDITIONAL([BUILD_FORTRAN_SIZEOF],
|
||||
[test $OMPI_FORTRAN_BUILD_SIZEOF -eq 1])
|
||||
|
||||
# There are 2 layers to the MPI mpif.h layer. The only extra thing
|
||||
# that determine mpif.h bindings is that fortran can be disabled
|
||||
# by user. In such cases, we need to not build the target at all.
|
||||
# One layer generates MPI_<foo> bindings. The other layer
|
||||
# generates PMPI_<foo> bindings. The following conditions
|
||||
# determine whether each (or both) these layers are built.
|
||||
#
|
||||
# Superceeding clause:
|
||||
# - Fortran bindings should be enabled, else everything is
|
||||
# disabled
|
||||
# 1. MPI_<foo> bindings are needed if:
|
||||
# - Profiling is not required
|
||||
# - Profiling is required but weak symbols are not supported
|
||||
# 2. PMPI_<foo> bindings are needed if profiling is required.
|
||||
#
|
||||
# Hence we define 2 conditionals which tell us whether each of
|
||||
# these layers need to be built or NOT
|
||||
|
||||
AM_CONDITIONAL(BUILD_MPI_FORTRAN_MPIFH_BINDINGS_LAYER,
|
||||
[test $OMPI_PROFILING_COMPILE_SEPARATELY -eq 1 && \
|
||||
test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
|
||||
AM_CONDITIONAL(BUILD_PMPI_FORTRAN_MPIFH_BINDINGS_LAYER,
|
||||
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_MPIFH_BINDINGS,
|
||||
[test $OMPI_BUILD_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS])
|
||||
|
||||
# -------------------
|
||||
# use mpi final setup
|
||||
# -------------------
|
||||
|
||||
# This goes into ompi/Makefile.am
|
||||
AC_SUBST(OMPI_FORTRAN_USEMPI_DIR)
|
||||
# This goes into mpifort-wrapper-data.txt
|
||||
AC_SUBST(OMPI_FORTRAN_USEMPI_LIB)
|
||||
|
||||
# These go into mpi-ignore-tkr-interfaces.h / mpi-ignore-tkr-file-interfaces.h
|
||||
AC_SUBST(OMPI_FORTRAN_IGNORE_TKR_PREDECL)
|
||||
AC_SUBST(OMPI_FORTRAN_IGNORE_TKR_TYPE)
|
||||
|
||||
# These go into ompi/info/param.c
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_IGNORE_TKR_PREDECL],
|
||||
["$OMPI_FORTRAN_IGNORE_TKR_PREDECL"],
|
||||
[Pre declaration for FORTRAN ignore parameter TKR behavior])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_IGNORE_TKR_TYPE],
|
||||
[$type],
|
||||
[Type declaration for FORTRAN ignore parameter TKR behavior])
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_IGNORE_TKR,
|
||||
[$OMPI_FORTRAN_HAVE_IGNORE_TKR],
|
||||
[Whether the Fortran compiler supports ignore TKR functionality or not])
|
||||
|
||||
# Somewhat redundant because ompi/Makefile.am won't traverse into
|
||||
# the unused "use mpi" directory, but we might as well have the
|
||||
# ompi/mpi/fortran/use-mpi*/Makefile.ams be safe, too.
|
||||
# True if we're building either "use mpi" bindings
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_BINDINGS,
|
||||
[test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS || \
|
||||
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1])
|
||||
# True if we're building the old TKR-style bindings
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_TKR_BINDINGS,
|
||||
[test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \
|
||||
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 0])
|
||||
# True if we're building the new ignore-TKR-style bindings
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPI_IGNORE_TKR_BINDINGS,
|
||||
[test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPI_BINDINGS && \
|
||||
test $OMPI_FORTRAN_HAVE_IGNORE_TKR -eq 1])
|
||||
|
||||
# -------------------
|
||||
# use mpi_f08 final setup
|
||||
# -------------------
|
||||
|
||||
# This goes into mpifort-wrapper-data.txt
|
||||
AC_SUBST(OMPI_FORTRAN_USEMPIF08_LIB)
|
||||
|
||||
# These go into interfaces/mpi-f08-interfaces-[no]bind.h (and
|
||||
# mpi-f*-interfaces*.h files)
|
||||
AC_SUBST(OMPI_FORTRAN_F08_PREDECL)
|
||||
AC_SUBST(OMPI_FORTRAN_F08_TYPE)
|
||||
|
||||
AC_SUBST(OMPI_MPI_PREFIX)
|
||||
AC_SUBST(OMPI_MPI_BIND_PREFIX)
|
||||
AC_SUBST(OMPI_F08_SUFFIX)
|
||||
AC_SUBST(OMPI_F_SUFFIX)
|
||||
|
||||
# This is used to generate weak symbols (or not) in
|
||||
# ompi/mpi/fortran/mpif-h/<foo>_f.c, and
|
||||
# ompi/mpi/fortran/configure-fortran-output.h.
|
||||
AC_SUBST(OMPI_FORTRAN_NEED_WRAPPER_ROUTINES)
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_NEED_WRAPPER_ROUTINES,
|
||||
[$OMPI_FORTRAN_NEED_WRAPPER_ROUTINES],
|
||||
[Whether the mpi_f08 implementation is using wrapper routines ("bad" Fortran compiler) or weak symbols ("good" Fortran compiler) for the F08 interface definition implementations])
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_F08_HANDLE_SIZE,
|
||||
$OMPI_FORTRAN_F08_HANDLE_SIZE,
|
||||
[How many bytes the mpi_f08 TYPE(MPI_<foo>) handles will be])
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_F08_HANDLE_ALIGNMENT,
|
||||
$OMPI_FORTRAN_F08_HANDLE_ALIGNMENT,
|
||||
[How many bytes the mpi_f08 TYPE(MPI_<foo>) handles will be aligned to])
|
||||
|
||||
# These go into ompi/info/param.c
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK,
|
||||
[$OMPI_FORTRAN_HAVE_F08_ASSUMED_RANK],
|
||||
[For ompi_info: Whether the Fortran compiler supports the Fortran 2008 "assumed rank" syntax or not])
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C,
|
||||
[$OMPI_FORTRAN_HAVE_BIND_C],
|
||||
[For ompi_info: Whether the compiler supports all forms of BIND(C) that we need])
|
||||
AC_SUBST(OMPI_FORTRAN_HAVE_ISO_C_BINDING)
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_ISO_C_BINDING,
|
||||
[$OMPI_FORTRAN_HAVE_ISO_C_BINDING],
|
||||
[For ompi_info: Whether the compiler supports ISO_C_BINDING or not])
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_SUB,
|
||||
[$OMPI_FORTRAN_HAVE_BIND_C_SUB],
|
||||
[For ompi_info: Whether the compiler supports SUBROUTINE ... BIND(C) or not])
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_TYPE,
|
||||
[$OMPI_FORTRAN_HAVE_BIND_C_TYPE],
|
||||
[For ompi_info: Whether the compiler supports TYPE, BIND(C) or not])
|
||||
AC_DEFINE_UNQUOTED(OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME,
|
||||
[$OMPI_FORTRAN_HAVE_BIND_C_TYPE_NAME],
|
||||
[For ompi_info: Whether the compiler supports TYPE, BIND(C, NAME="name") or not])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_OPTIONAL_ARGS],
|
||||
[$OMPI_FORTRAN_HAVE_OPTIONAL_ARGS],
|
||||
[For ompi_info: whether the Fortran compiler supports optional arguments or not])
|
||||
|
||||
# For configure-fortran-output.h, mpi-f08-types.F90 (and ompi_info)
|
||||
AC_SUBST([OMPI_FORTRAN_HAVE_PRIVATE])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PRIVATE],
|
||||
[$OMPI_FORTRAN_HAVE_PRIVATE],
|
||||
[For mpi-f08-types.f90 and ompi_info: whether the compiler supports the "private" keyword or not (used in MPI_Status)])
|
||||
|
||||
# For ompi_info only
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PROTECTED],
|
||||
[$OMPI_FORTRAN_HAVE_PROTECTED],
|
||||
[For mpi-f08-types.f90 and .F90 and ompi_info: whether the compiler supports the "protected" keyword or not])
|
||||
|
||||
# For configure-fortran-output.h, mpi-f08-interfaces-callbacks.F90
|
||||
# (and ompi_info)
|
||||
AC_SUBST([OMPI_FORTRAN_HAVE_ABSTRACT])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ABSTRACT],
|
||||
[$OMPI_FORTRAN_HAVE_ABSTRACT],
|
||||
[For mpi-f08-interfaces-callbacks.f90 and ompi_info: whether the compiler supports the "abstract" keyword or not])
|
||||
|
||||
# For configure-fortran-output.h, various files in
|
||||
# ompi/mpi/fortran/use-mpi-f08/*.F90 and *.h files (and ompi_info)
|
||||
AC_SUBST([OMPI_FORTRAN_HAVE_ASYNCHRONOUS])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_ASYNCHRONOUS],
|
||||
[$OMPI_FORTRAN_HAVE_ASYNCHRONOUS],
|
||||
[For ompi/mpi/fortran/use-mpi-f08/blah.F90 and blah.h and ompi_info: whether the compiler supports the "asynchronous" keyword or not])
|
||||
|
||||
# For configure-fortran-output.h, various files in
|
||||
# ompi/mpi/fortran/use-mpi-f08/*.F90 and *.h files (and ompi_info)
|
||||
AC_SUBST([OMPI_FORTRAN_HAVE_PROCEDURE])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_PROCEDURE],
|
||||
[$OMPI_FORTRAN_HAVE_PROCEDURE],
|
||||
[For ompi/mpi/fortran/use-mpi-f08/blah.F90 and blah.h and ompi_info: whether the compiler supports the "procedure" keyword or not])
|
||||
|
||||
# For configure-fortran-output.h, various files in
|
||||
# ompi/mpi/fortran/use-mpi-f08/*.F90 and *.h files (and ompi_info)
|
||||
AC_SUBST([OMPI_FORTRAN_HAVE_USE_ONLY])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_USE_ONLY],
|
||||
[$OMPI_FORTRAN_HAVE_USE_ONLY],
|
||||
[For ompi/mpi/fortran/use-mpi-f08/blah.F90 and blah.h and ompi_info: whether the compiler supports "USE ... ONLY" notation properly or not])
|
||||
|
||||
# For configure-fortran-output.h, various files in
|
||||
# ompi/mpi/fortran/use-mpi-f08/*.F90 and *.h files (and ompi_info)
|
||||
AC_SUBST([OMPI_FORTRAN_HAVE_C_FUNLOC])
|
||||
AC_DEFINE_UNQUOTED([OMPI_FORTRAN_HAVE_C_FUNLOC],
|
||||
[$OMPI_FORTRAN_HAVE_C_FUNLOC],
|
||||
[For ompi/mpi/fortran/use-mpi-f08/blah.F90 and blah.h and ompi_info: whether the compiler supports c_funloc or not])
|
||||
|
||||
# For configure-fortran-output.h
|
||||
AC_SUBST(OMPI_FORTRAN_HAVE_BIND_C)
|
||||
|
||||
# Somewhat redundant because ompi/Makefile.am won't traverse into
|
||||
# ompi/mpi/fortran/use-mpi-f08 if it's not to be built, but we
|
||||
# might as well have ompi/mpi/fortran/use-mpi-f08/Makefile.am be
|
||||
# safe, too.
|
||||
AM_CONDITIONAL(OMPI_BUILD_FORTRAN_USEMPIF08_BINDINGS,
|
||||
[test $OMPI_BUILD_FORTRAN_BINDINGS -ge $OMPI_FORTRAN_USEMPIF08_BINDINGS])
|
||||
|
||||
AC_DEFINE_UNQUOTED(OMPI_BUILD_FORTRAN_BINDINGS,
|
||||
$OMPI_BUILD_FORTRAN_BINDINGS,
|
||||
[The level of fortran bindings to be built])
|
||||
])
|
|
@ -0,0 +1,85 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2008 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2006 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2006-2012 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2007-2012 Oracle and/or its affiliates. All rights reserved.
|
||||
dnl Copyright (c) 2008-2018 Cisco Systems, Inc. All rights reserved
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
dnl OMPI_SETUP_JAVA_BINDINGS()
|
||||
dnl ----------------
|
||||
dnl Do everything required to setup the Java MPI bindings.
|
||||
AC_DEFUN([OMPI_SETUP_JAVA_BINDINGS],[
|
||||
opal_show_subtitle "Java MPI bindings"
|
||||
|
||||
AC_ARG_ENABLE(mpi-java,
|
||||
AC_HELP_STRING([--enable-mpi-java],
|
||||
[enable Java MPI bindings (default: disabled)]))
|
||||
|
||||
# Find the Java compiler and whatnot.
|
||||
# It knows to do very little if $enable_mpi_java!="yes".
|
||||
OMPI_SETUP_JAVA([$enable_mpi_java])
|
||||
|
||||
# Only build the Java bindings if requested
|
||||
AC_MSG_CHECKING([if want Java bindings])
|
||||
if test "$enable_mpi_java" = "yes"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
WANT_MPI_JAVA_BINDINGS=1
|
||||
AC_MSG_CHECKING([if shared libraries are enabled])
|
||||
AS_IF([test "$enable_shared" != "yes"],
|
||||
[AC_MSG_RESULT([no])
|
||||
AC_MSG_WARN([Java bindings cannot be built without shared libraries])
|
||||
AC_MSG_WARN([Please reconfigure with --enable-shared])
|
||||
AC_MSG_ERROR([Cannot continue])],
|
||||
[AC_MSG_RESULT([yes])])
|
||||
|
||||
# Mac Java requires this file (i.e., some other Java-related
|
||||
# header file needs this file, so we need to check for
|
||||
# it/include it in our sources when compiling on Mac).
|
||||
AC_CHECK_HEADERS([TargetConditionals.h])
|
||||
|
||||
# dladdr and Dl_info are required to build the full path to
|
||||
# libmpi on OS X 10.11 (a.k.a. El Capitan)
|
||||
AC_CHECK_TYPES([Dl_info], [], [], [[#include <dlfcn.h>]])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
WANT_MPI_JAVA_BINDINGS=0
|
||||
fi
|
||||
AC_DEFINE_UNQUOTED([OMPI_WANT_JAVA_BINDINGS], [$WANT_MPI_JAVA_BINDINGS],
|
||||
[do we want java mpi bindings])
|
||||
AM_CONDITIONAL(OMPI_WANT_JAVA_BINDINGS, test "$WANT_MPI_JAVA_BINDINGS" = "1")
|
||||
|
||||
# Are we happy?
|
||||
AS_IF([test $WANT_MPI_JAVA_BINDINGS -eq 1],
|
||||
[AC_MSG_WARN([******************************************************])
|
||||
AC_MSG_WARN([*** Java MPI bindings are provided on a provisional])
|
||||
AC_MSG_WARN([*** basis. They are NOT part of the current or])
|
||||
AC_MSG_WARN([*** proposed MPI standard. Continued inclusion of])
|
||||
AC_MSG_WARN([*** the Java MPI bindings in Open MPI is contingent])
|
||||
AC_MSG_WARN([*** upon user interest and developer support.])
|
||||
AC_MSG_WARN([******************************************************])
|
||||
])
|
||||
|
||||
AC_CONFIG_FILES([
|
||||
ompi/mpi/java/Makefile
|
||||
ompi/mpi/java/java/Makefile
|
||||
ompi/mpi/java/c/Makefile
|
||||
])
|
||||
])
|
|
@ -0,0 +1,50 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana
|
||||
# University Research and Technology
|
||||
# Corporation. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart,
|
||||
# University of Stuttgart. All rights reserved.
|
||||
# Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
# All rights reserved.
|
||||
# Copyright (c) 2006-2012 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved.
|
||||
# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
# Copyright (c) 2015 Research Organization for Information Science
|
||||
# and Technology (RIST). All rights reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# OMPI-specific configuration
|
||||
|
||||
AC_DEFUN([OMPI_SETUP_MPI_PROFILING],[
|
||||
# There are 2 layers to the MPI Language binidings One layer
|
||||
# generates MPI_* bindings. The other layer generates PMPI_*
|
||||
# bindings. The following conditions determine whether each (or
|
||||
# both) these layers are built.
|
||||
# 1. MPI_* bindings are needed if:
|
||||
# - Profiling is not required
|
||||
# - Profiling is required but weak symbols are not
|
||||
# supported
|
||||
# 2. PMPI_* bindings are needed if profiling is required. Hence we
|
||||
# define 2 conditionals which tell us whether each of these layers
|
||||
# need to be built or NOT
|
||||
#
|
||||
|
||||
AM_CONDITIONAL(BUILD_MPI_BINDINGS_LAYER,
|
||||
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
|
||||
|
||||
AM_CONDITIONAL(COMPILE_PROFILING_SEPARATELY,
|
||||
test "$OMPI_PROFILING_COMPILE_SEPARATELY" = 1)
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_WEAK_SYMBOLS, $OPAL_C_HAVE_WEAK_SYMBOLS,
|
||||
[Whether we have weak symbols or not])
|
||||
])
|
|
@ -0,0 +1,103 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
AC_DEFUN([OPAL_CASE_SENSITIVE_FS_SETUP],[
|
||||
#
|
||||
# Arguments: none
|
||||
#
|
||||
# Dependencies: None
|
||||
#
|
||||
# See if we are on a case sensitive filesystem. Some filesystems
|
||||
# (like HFS+ on MacOS X and MS Windows) are not case sensitive - opalcc
|
||||
# and opalCC are the same file.
|
||||
#
|
||||
# Sets prefix_OS_HAVE_CASE_SENSITIVE_FS to 1 if filesystem is case
|
||||
# sensitive (ie, mpicc and mpiCC will be different files) or 0 if
|
||||
# filesystem is not case sensitive (ie, mpicc and mpiCC will be
|
||||
# the same file).
|
||||
#
|
||||
#
|
||||
|
||||
have_cs_fs=1
|
||||
|
||||
AC_MSG_CHECKING([if build filesystem is case sensitive])
|
||||
cat > conf_fs_test.$$ <<EOF
|
||||
lowercase
|
||||
EOF
|
||||
|
||||
cat > CONF_FS_TEST.$$ <<EOF
|
||||
uppercase
|
||||
EOF
|
||||
|
||||
if test "`cat conf_fs_test.$$`" = "lowercase"; then
|
||||
have_cs_fs=1
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
have_cs_fs=0
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
rm -f conf_fs_test.$$ CONF_FS_TEST.$$
|
||||
|
||||
#
|
||||
# Now see what the user wants to do...
|
||||
#
|
||||
AC_MSG_CHECKING([if configuring for case sensitive filesystem])
|
||||
AC_ARG_WITH(cs_fs,
|
||||
AC_HELP_STRING([--with-cs-fs],
|
||||
[Destination FS is case sensitive (default: set to value of the build FS's case sensitivity)]))
|
||||
|
||||
if test "$with_cs_fs" = "yes"; then
|
||||
OPAL_WANT_CS_FS=1
|
||||
elif test -z "$with_cs_fs"; then
|
||||
OPAL_WANT_CS_FS=$have_cs_fs
|
||||
else
|
||||
OPAL_WANT_CS_FS=0
|
||||
fi
|
||||
|
||||
if test "$OPAL_WANT_CS_FS" = "1"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL(CASE_SENSITIVE_FS, test "$OPAL_WANT_CS_FS" = "1")
|
||||
|
||||
if test "$OPAL_WANT_CS_FS" = "0"; then
|
||||
cat <<EOF
|
||||
|
||||
*******************************************************************************
|
||||
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
|
||||
*******************************************************************************
|
||||
|
||||
Because OPAL is being installed on a non-case sensitive file
|
||||
system, the C++ wrapper compiler will be named opalc++ instead of the
|
||||
traditional opalCC.
|
||||
|
||||
Please update any makefiles appropriately.
|
||||
|
||||
*******************************************************************************
|
||||
NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE
|
||||
*******************************************************************************
|
||||
|
||||
EOF
|
||||
fi
|
||||
|
||||
# Clean up
|
||||
unset have_cs_fs])dnl
|
|
@ -0,0 +1,172 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2016 Los Alamos National Security, LLC. All rights
|
||||
dnl reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
# OPAL_CHECK_ALPS_CLE4([action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
AC_DEFUN([OPAL_CHECK_ALPS_CLE4],[
|
||||
|
||||
#
|
||||
# if we've gotten here, its because we are building on a CLE 4 system
|
||||
#
|
||||
opal_check_alps_cle4_libdir_happy="no"
|
||||
opal_check_alps_cle4_dir_happy="no"
|
||||
|
||||
AC_MSG_CHECKING([Checking for ALPS components on a CLE 4 system with alps $with_alps])
|
||||
|
||||
AC_ARG_WITH([alps-libdir],
|
||||
[AC_HELP_STRING([--with-alps-libdir=DIR],
|
||||
[Location of alps libraries (alpslli, alpsutil) (default: /usr/lib/alps (/opt/cray/xe-sysroot/default/user on eslogin nodes))])])
|
||||
|
||||
#
|
||||
# check to see if Open MPI is being built on a CLE 4 eslogin node
|
||||
#
|
||||
AS_IF([test -f /etc/opt/cray/release/ESLrelease],
|
||||
[default_alps_dir="/opt/cray/xe-sysroot/default/usr"],
|
||||
[default_alps_dir="/usr"])
|
||||
|
||||
AS_IF([test -z "$with_alps_libdir"],
|
||||
[AS_IF([test "$with_alps" != "yes" && test "$with_alps" != "auto"],
|
||||
[AS_IF([test -d "$with_alps_libdir/lib64"],
|
||||
[opal_check_alps_libdir="$with_alps_libdir/lib64"],
|
||||
[opal_check_alps_libdir="$with_alps_libdir/lib"])],
|
||||
[ opal_check_alps_libdir="$default_alps_dir/lib/alps"])
|
||||
],[])
|
||||
|
||||
AS_IF([test "$with_alps" = "yes" || test "$with_alps" = "auto"],
|
||||
[opal_check_alps_dir=$default_alps_dir],
|
||||
[opal_check_alps_dir=$with_alps])
|
||||
|
||||
AC_MSG_CHECKING([if $opal_check_alps_libdir/libalps.a is present])
|
||||
AS_IF([test -f "$opal_check_alps_libdir/libalps.a"],
|
||||
[opal_check_alps_libdir_cle4_happy="yes"],
|
||||
[opal_check_alps_libdir_cle4_happy="no",
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
AC_MSG_CHECKING([if $opal_check_alps_dir/include/alps/apInfo.h is present])
|
||||
AS_IF([test -f "$opal_check_alps_dir/include/alps/apInfo.h"],
|
||||
[opal_check_alps_dir_cle4_happy="yes"],
|
||||
[opal_check_alps_dir_cle4_happy="no"
|
||||
AC_MSG_RESULT([no])])
|
||||
|
||||
AS_IF([test "$opal_check_alps_libdir_cle4_happy" = "yes" && test "$opal_check_alps_dir_cle4_happy" = "yes"],
|
||||
[CRAY_ALPSLLI_CFLAGS="-I$opal_check_alps_dir/include"
|
||||
CRAY_ALPSLLI_LIBS="-L$opal_check_alps_libdir -lalpslli -lalpsutil"
|
||||
CRAY_ALPSLLI_STATIC_LIBS="-L$opal_check_alps_libdir -lalpslli -lalpsutil"
|
||||
$1],
|
||||
[$2])
|
||||
])
|
||||
|
||||
|
||||
|
||||
|
||||
# OPAL_CHECK_ALPS(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
AC_DEFUN([OPAL_CHECK_ALPS],[
|
||||
if test -z "$opal_check_cray_alps_happy"; then
|
||||
|
||||
AC_ARG_WITH([alps],
|
||||
[AC_HELP_STRING([--with-alps(=DIR|yes|no)],
|
||||
[Build with ALPS scheduler component, optionally adding DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries (default: auto)])],[],with_alps=auto)
|
||||
|
||||
if test -f /etc/opt/cray/release/clerelease; then
|
||||
cle_level=`awk -F. '{print [$]1}' /etc/opt/cray/release/clerelease`
|
||||
else
|
||||
cle_level="unknown"
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for ALPS support cle level $cle_level])
|
||||
AS_IF([test "$cle_level" = "4" && test "$with_alps" != "no"],
|
||||
[OPAL_CHECK_ALPS_CLE4([opal_check_cray_alps_happy="yes"],
|
||||
[opal_check_cray_alps_happy="no"])],
|
||||
[AS_IF([test "$with_alps" = "no"],
|
||||
[AC_MSG_RESULT([no])
|
||||
opal_check_cray_alps_happy=no
|
||||
$3],
|
||||
[AS_IF([test "$with_alps" = "auto" || test "$with_alps" = "yes"],
|
||||
[PKG_CHECK_MODULES_STATIC([CRAY_ALPSLLI], [cray-alpslli],
|
||||
[opal_check_cray_alps_happy="yes"],
|
||||
[opal_check_cray_alps_happy="no"]
|
||||
[AS_IF([test "$with_alps" = "yes"],
|
||||
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
|
||||
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
|
||||
AC_MSG_WARN([on the configure line using --with-alps option.])
|
||||
AC_MSG_ERROR([Aborting])],[])]
|
||||
)
|
||||
PKG_CHECK_MODULES_STATIC([CRAY_ALPSUTIL], [cray-alpsutil],
|
||||
[opal_check_cray_alps_happy="yes"],
|
||||
[opal_check_cray_alps_happy="no"]
|
||||
[AS_IF([test "$with_alps" = "yes"],
|
||||
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
|
||||
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
|
||||
AC_MSG_WARN([on the configure line using --with-alps option.])
|
||||
AC_MSG_ERROR([Aborting])],[])]
|
||||
)
|
||||
|
||||
PKG_CHECK_MODULES_STATIC([CRAY_ALPS], [cray-alps],
|
||||
[opal_check_cray_alps_happy="yes"],
|
||||
[opal_check_cray_alps_happy="no"]
|
||||
[AS_IF([test "$with_alps" = "yes"],
|
||||
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
|
||||
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
|
||||
AC_MSG_WARN([on the configure line using --with-alps option.])
|
||||
AC_MSG_ERROR([Aborting])],[])]
|
||||
)
|
||||
PKG_CHECK_MODULES_STATIC([CRAY_WLM_DETECT], [cray-wlm_detect],
|
||||
[opal_check_cray_alps_happy="yes"
|
||||
AC_DEFINE_UNQUOTED([CRAY_WLM_DETECT],[1],
|
||||
[defined to 1 if cray wlm available, 0 otherwise])
|
||||
],
|
||||
[opal_check_cray_alps_happy="no"]
|
||||
[AS_IF([test "$with_alps" = "yes"],
|
||||
[AC_MSG_WARN([ALPS support requested but pkg-config failed.])
|
||||
AC_MSG_WARN([Need to explicitly indicate ALPS directory])
|
||||
AC_MSG_WARN([on the configure line using --with-alps option.])
|
||||
AC_MSG_ERROR([Aborting])],[])]
|
||||
)
|
||||
],
|
||||
[AC_MSG_WARN([See ./configure --help for how to control Open MPI])
|
||||
AC_MSG_WARN([configuration for ALPS on CLE 5 and higher systems])
|
||||
AC_MSG_ERROR([Aborting])])
|
||||
])
|
||||
])
|
||||
|
||||
AC_MSG_RESULT([opal_check_cray_alps_happy = $opal_check_cray_alps_happy])
|
||||
|
||||
AS_IF([test "$opal_check_cray_alps_happy" = "yes" && test "$enable_static" = "yes"],
|
||||
[CRAY_ALPSLLI_LIBS = $CRAY_ALPSLLI_STATIC_LIBS
|
||||
CRAY_ALPSUTIL_LIBS = $CRAY_ALPSUTIL_STATIC_LIBS],
|
||||
[])
|
||||
|
||||
OPAL_SUMMARY_ADD([[Resource Managers]],[[Cray Alps]],[$1],[$opal_check_cray_alps_happy])
|
||||
fi
|
||||
|
||||
AS_IF([test "$opal_check_cray_alps_happy" = "yes"],
|
||||
[$1_LDFLAGS="[$]$1_LDFLAGS $CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS"
|
||||
$1_CPPFLAGS="[$]$1_CPPFLAGS $CRAY_ALPSLLI_CFLAGS $CRAY_ALPSUTIL_CFLAGS $CRAY_ALPS_CFLAGS $CRAY_WLM_DETECT_CFLAGS"
|
||||
$1_LIBS="[$]$1_LIBS $CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS"
|
||||
$1_WRAPPER_EXTRA_LDFLAGS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS"
|
||||
$1_WRAPPER_EXTRA_LIBS="$CRAY_ALPSLLI_LIBS $CRAY_ALPSUTIL_LIBS $CRAY_WLM_DETECT_LIBS"
|
||||
$2],
|
||||
[$3])
|
||||
])
|
|
@ -0,0 +1,642 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2010 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2009 Oak Ridge National Labs. All rights reserved.
|
||||
dnl Copyright (c) 2010-2018 Cisco Systems, Inc. All rights reserved
|
||||
dnl Copyright (c) 2013 Mellanox Technologies, Inc.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2015 Research Organization for Information Science
|
||||
dnl and Technology (RIST). All rights reserved.
|
||||
dnl Copyright (c) 2017 Intel, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
|
||||
#
|
||||
# Search the generated warnings for
|
||||
# keywords regarding skipping or ignoring certain attributes
|
||||
# Intel: ignore
|
||||
# Sun C++: skip
|
||||
#
|
||||
AC_DEFUN([_OPAL_ATTRIBUTE_FAIL_SEARCH],[
|
||||
AC_REQUIRE([AC_PROG_GREP])
|
||||
if test -s conftest.err ; then
|
||||
# icc uses 'invalid attribute' and 'attribute "__XXX__" ignored'
|
||||
# Sun 12.1 emits 'warning: attribute parameter "__printf__" is undefined'
|
||||
for i in invalid ignore skip undefined ; do
|
||||
$GREP -iq $i conftest.err
|
||||
if test "$?" = "0" ; then
|
||||
opal_cv___attribute__[$1]=0
|
||||
break;
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
#
|
||||
# Check for one specific attribute by compiling with C and C++
|
||||
# and possibly using a cross-check.
|
||||
#
|
||||
# If the cross-check is defined, a static function "usage" should be
|
||||
# defined, which is to be called from main (to circumvent warnings
|
||||
# regarding unused function in main file)
|
||||
# static int usage (int * argument);
|
||||
#
|
||||
# The last argument is for specific CFLAGS, that need to be set
|
||||
# for the compiler to generate a warning on the cross-check.
|
||||
# This may need adaption for future compilers / CFLAG-settings.
|
||||
#
|
||||
AC_DEFUN([_OPAL_CHECK_SPECIFIC_ATTRIBUTE], [
|
||||
AC_MSG_CHECKING([for __attribute__([$1])])
|
||||
AC_CACHE_VAL(opal_cv___attribute__[$1], [
|
||||
#
|
||||
# Try to compile using the C compiler, then C++
|
||||
#
|
||||
AC_TRY_COMPILE([$2],[],
|
||||
[
|
||||
#
|
||||
# In case we did succeed: Fine, but was this due to the
|
||||
# attribute being ignored/skipped? Grep for IgNoRe/skip in conftest.err
|
||||
# and if found, reset the opal_cv__attribute__var=0
|
||||
#
|
||||
opal_cv___attribute__[$1]=1
|
||||
_OPAL_ATTRIBUTE_FAIL_SEARCH([$1])
|
||||
],
|
||||
[opal_cv___attribute__[$1]=0])
|
||||
|
||||
# Only test C++ if we're building Open MPI (i.e.,
|
||||
# project_ompi). OPAL and ORTE do not use C++ at all, so
|
||||
# let's not add a C++ compiler into their requirement list.
|
||||
m4_ifdef([project_ompi],
|
||||
[if test "$opal_cv___attribute__[$1]" = "1" ; then
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_COMPILE([
|
||||
extern "C" {
|
||||
$2
|
||||
}],[],
|
||||
[
|
||||
opal_cv___attribute__[$1]=1
|
||||
_OPAL_ATTRIBUTE_FAIL_SEARCH([$1])
|
||||
],[opal_cv___attribute__[$1]=0])
|
||||
AC_LANG_POP(C++)
|
||||
fi])
|
||||
|
||||
#
|
||||
# If the attribute is supported by both compilers,
|
||||
# try to recompile a *cross-check*, IFF defined.
|
||||
#
|
||||
if test "$opal_cv___attribute__[$1]" = "1" && test "[$3]" != "" ; then
|
||||
ac_c_werror_flag_safe=$ac_c_werror_flag
|
||||
ac_c_werror_flag="yes"
|
||||
CFLAGS_safe=$CFLAGS
|
||||
CFLAGS="$CFLAGS [$4]"
|
||||
|
||||
AC_TRY_COMPILE([$3],
|
||||
[
|
||||
int i=4711;
|
||||
i=usage(&i);
|
||||
],
|
||||
[opal_cv___attribute__[$1]=0],
|
||||
[
|
||||
#
|
||||
# In case we did NOT succeed: Fine, but was this due to the
|
||||
# attribute being ignored? Grep for IgNoRe in conftest.err
|
||||
# and if found, reset the opal_cv__attribute__var=0
|
||||
#
|
||||
opal_cv___attribute__[$1]=1
|
||||
_OPAL_ATTRIBUTE_FAIL_SEARCH([$1])
|
||||
])
|
||||
|
||||
ac_c_werror_flag=$ac_c_werror_flag_safe
|
||||
CFLAGS=$CFLAGS_safe
|
||||
fi
|
||||
])
|
||||
|
||||
if test "$opal_cv___attribute__[$1]" = "1" ; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
#
|
||||
# Test the availability of __attribute__ and with the help
|
||||
# of _OPAL_CHECK_SPECIFIC_ATTRIBUTE for the support of
|
||||
# particular attributes. Compilers, that do not support an
|
||||
# attribute most often fail with a warning (when the warning
|
||||
# level is set).
|
||||
# The compilers output is parsed in _OPAL_ATTRIBUTE_FAIL_SEARCH
|
||||
#
|
||||
# To add a new attributes __NAME__ add the
|
||||
# opal_cv___attribute__NAME
|
||||
# add a new check with _OPAL_CHECK_SPECIFIC_ATTRIBUTE (possibly with a cross-check)
|
||||
# _OPAL_CHECK_SPECIFIC_ATTRIBUTE([name], [int foo (int arg) __attribute__ ((__name__));], [], [])
|
||||
# and define the corresponding
|
||||
# AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_NAME, [$opal_cv___attribute__NAME],
|
||||
# [Whether your compiler has __attribute__ NAME or not])
|
||||
# and decide on a correct macro (in opal/include/opal_config_bottom.h):
|
||||
# # define __opal_attribute_NAME(x) __attribute__(__NAME__)
|
||||
#
|
||||
# Please use the "__"-notation of the attribute in order not to
|
||||
# clash with predefined names or macros (e.g. const, which some compilers
|
||||
# do not like..)
|
||||
#
|
||||
|
||||
|
||||
AC_DEFUN([OPAL_CHECK_ATTRIBUTES], [
|
||||
AC_LANG(C)
|
||||
AC_MSG_CHECKING(for __attribute__)
|
||||
|
||||
AC_CACHE_VAL(opal_cv___attribute__, [
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdlib.h>
|
||||
/* Check for the longest available __attribute__ (since gcc-2.3) */
|
||||
struct foo {
|
||||
char a;
|
||||
int x[2] __attribute__ ((__packed__));
|
||||
};
|
||||
],
|
||||
[],
|
||||
[opal_cv___attribute__=1],
|
||||
[opal_cv___attribute__=0],
|
||||
)
|
||||
|
||||
if test "$opal_cv___attribute__" = "1" ; then
|
||||
AC_TRY_COMPILE(
|
||||
[#include <stdlib.h>
|
||||
/* Check for the longest available __attribute__ (since gcc-2.3) */
|
||||
struct foo {
|
||||
char a;
|
||||
int x[2] __attribute__ ((__packed__));
|
||||
};
|
||||
],
|
||||
[],
|
||||
[opal_cv___attribute__=1],
|
||||
[opal_cv___attribute__=0],
|
||||
)
|
||||
fi
|
||||
])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE, [$opal_cv___attribute__],
|
||||
[Whether your compiler has __attribute__ or not])
|
||||
|
||||
#
|
||||
# Now that we know the compiler support __attribute__ let's check which kind of
|
||||
# attributed are supported.
|
||||
#
|
||||
if test "$opal_cv___attribute__" = "0" ; then
|
||||
AC_MSG_RESULT([no])
|
||||
opal_cv___attribute__aligned=0
|
||||
opal_cv___attribute__always_inline=0
|
||||
opal_cv___attribute__cold=0
|
||||
opal_cv___attribute__const=0
|
||||
opal_cv___attribute__deprecated=0
|
||||
opal_cv___attribute__deprecated_argument=0
|
||||
opal_cv___attribute__format=0
|
||||
opal_cv___attribute__format_funcptr=0
|
||||
opal_cv___attribute__hot=0
|
||||
opal_cv___attribute__malloc=0
|
||||
opal_cv___attribute__may_alias=0
|
||||
opal_cv___attribute__no_instrument_function=0
|
||||
opal_cv___attribute__noinline=0
|
||||
opal_cv___attribute__nonnull=0
|
||||
opal_cv___attribute__noreturn=0
|
||||
opal_cv___attribute__noreturn_funcptr=0
|
||||
opal_cv___attribute__packed=0
|
||||
opal_cv___attribute__pure=0
|
||||
opal_cv___attribute__sentinel=0
|
||||
opal_cv___attribute__unused=0
|
||||
opal_cv___attribute__visibility=0
|
||||
opal_cv___attribute__warn_unused_result=0
|
||||
opal_cv___attribute__weak_alias=0
|
||||
opal_cv___attribute__destructor=0
|
||||
opal_cv___attribute__optnone=0
|
||||
opal_cv___attribute__error=0
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([aligned],
|
||||
[struct foo { char text[4]; } __attribute__ ((__aligned__(8)));],
|
||||
[],
|
||||
[])
|
||||
|
||||
#
|
||||
# Ignored by PGI-6.2.5; -- recognized by output-parser
|
||||
#
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([always_inline],
|
||||
[int foo (int arg) __attribute__ ((__always_inline__));],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([cold],
|
||||
[
|
||||
int foo(int arg1, int arg2) __attribute__ ((__cold__));
|
||||
int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([const],
|
||||
[
|
||||
int foo(int arg1, int arg2) __attribute__ ((__const__));
|
||||
int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([deprecated],
|
||||
[
|
||||
int foo(int arg1, int arg2) __attribute__ ((__deprecated__));
|
||||
int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([deprecated_argument],
|
||||
[
|
||||
int foo(int arg1, int arg2) __attribute__ ((__deprecated__("compiler allows argument")));
|
||||
int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([error],
|
||||
[
|
||||
int foo(int arg1, int arg2) __attribute__ ((__error__("")));
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
ATTRIBUTE_CFLAGS=
|
||||
case "$opal_c_vendor" in
|
||||
gnu)
|
||||
ATTRIBUTE_CFLAGS="-Wall"
|
||||
;;
|
||||
intel)
|
||||
# we want specifically the warning on format string conversion
|
||||
ATTRIBUTE_CFLAGS="-we181"
|
||||
;;
|
||||
esac
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([format],
|
||||
[
|
||||
int this_printf (void *my_object, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
],
|
||||
[
|
||||
static int usage (int * argument);
|
||||
extern int this_printf (int arg1, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
|
||||
static int usage (int * argument) {
|
||||
return this_printf (*argument, "%d", argument); /* This should produce a format warning */
|
||||
}
|
||||
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
|
||||
int main(void);
|
||||
],
|
||||
[$ATTRIBUTE_CFLAGS])
|
||||
|
||||
ATTRIBUTE_CFLAGS=
|
||||
case "$opal_c_vendor" in
|
||||
gnu)
|
||||
ATTRIBUTE_CFLAGS="-Wall"
|
||||
;;
|
||||
intel)
|
||||
# we want specifically the warning on format string conversion
|
||||
ATTRIBUTE_CFLAGS="-we181"
|
||||
;;
|
||||
esac
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([format_funcptr],
|
||||
[
|
||||
int (*this_printf)(void *my_object, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
],
|
||||
[
|
||||
static int usage (int * argument);
|
||||
extern int (*this_printf) (int arg1, const char *my_format, ...) __attribute__ ((__format__ (__printf__, 2, 3)));
|
||||
|
||||
static int usage (int * argument) {
|
||||
return (*this_printf) (*argument, "%d", argument); /* This should produce a format warning */
|
||||
}
|
||||
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
|
||||
int main(void);
|
||||
],
|
||||
[$ATTRIBUTE_CFLAGS])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([hot],
|
||||
[
|
||||
int foo(int arg1, int arg2) __attribute__ ((__hot__));
|
||||
int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([malloc],
|
||||
[
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
int * foo(int arg1) __attribute__ ((__malloc__));
|
||||
int * foo(int arg1) { return (int*) malloc(arg1); }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
|
||||
#
|
||||
# Attribute may_alias: No suitable cross-check available, that works for non-supporting compilers
|
||||
# Ignored by intel-9.1.045 -- turn off with -wd1292
|
||||
# Ignored by PGI-6.2.5; ignore not detected due to missing cross-check
|
||||
#
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([may_alias],
|
||||
[int * p_value __attribute__ ((__may_alias__));],
|
||||
[],
|
||||
[])
|
||||
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([no_instrument_function],
|
||||
[int * foo(int arg1) __attribute__ ((__no_instrument_function__));],
|
||||
[],
|
||||
[])
|
||||
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([noinline],
|
||||
[
|
||||
int foo(int arg1, int arg2) __attribute__ ((__noinline__));
|
||||
int foo(int arg1, int arg2) { return arg1 * arg2 + arg1; }
|
||||
static int bar(int arg1, int arg2) __attribute__ ((__noinline__));
|
||||
static int bar(int arg1, int arg2) { return arg1 * arg2 + arg1; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
#
|
||||
# Attribute nonnull:
|
||||
# Ignored by intel-compiler 9.1.045 -- recognized by cross-check
|
||||
# Ignored by PGI-6.2.5 (pgCC) -- recognized by cross-check
|
||||
#
|
||||
ATTRIBUTE_CFLAGS=
|
||||
case "$opal_c_vendor" in
|
||||
gnu)
|
||||
ATTRIBUTE_CFLAGS="-Wall"
|
||||
;;
|
||||
intel)
|
||||
# we do not want to get ignored attributes warnings, but rather real warnings
|
||||
ATTRIBUTE_CFLAGS="-wd1292"
|
||||
;;
|
||||
esac
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([nonnull],
|
||||
[
|
||||
int square(int *arg) __attribute__ ((__nonnull__));
|
||||
int square(int *arg) { return *arg; }
|
||||
],
|
||||
[
|
||||
static int usage(int * argument);
|
||||
int square(int * argument) __attribute__ ((__nonnull__));
|
||||
int square(int * argument) { return (*argument) * (*argument); }
|
||||
|
||||
static int usage(int * argument) {
|
||||
return square( ((void*)0) ); /* This should produce an argument must be nonnull warning */
|
||||
}
|
||||
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
|
||||
int main(void);
|
||||
],
|
||||
[$ATTRIBUTE_CFLAGS])
|
||||
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([noreturn],
|
||||
[
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
void fatal(int arg1) __attribute__ ((__noreturn__));
|
||||
void fatal(int arg1) { exit(arg1); }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([noreturn_funcptr],
|
||||
[
|
||||
#ifdef HAVE_UNISTD_H
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
#endif
|
||||
extern void (*fatal_exit)(int arg1) __attribute__ ((__noreturn__));
|
||||
void fatal(int arg1) { fatal_exit (arg1); }
|
||||
],
|
||||
[],
|
||||
[$ATTRIBUTE_CFLAGS])
|
||||
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([packed],
|
||||
[
|
||||
struct foo {
|
||||
char a;
|
||||
int x[2] __attribute__ ((__packed__));
|
||||
};
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([pure],
|
||||
[
|
||||
int square(int arg) __attribute__ ((__pure__));
|
||||
int square(int arg) { return arg * arg; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
#
|
||||
# Attribute sentinel:
|
||||
# Ignored by the intel-9.1.045 -- recognized by cross-check
|
||||
# intel-10.0beta works fine
|
||||
# Ignored by PGI-6.2.5 (pgCC) -- recognized by output-parser and cross-check
|
||||
# Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore)
|
||||
#
|
||||
ATTRIBUTE_CFLAGS=
|
||||
case "$opal_c_vendor" in
|
||||
gnu)
|
||||
ATTRIBUTE_CFLAGS="-Wall"
|
||||
;;
|
||||
intel)
|
||||
# we do not want to get ignored attributes warnings
|
||||
ATTRIBUTE_CFLAGS="-wd1292"
|
||||
;;
|
||||
esac
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([sentinel],
|
||||
[
|
||||
int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__));
|
||||
],
|
||||
[
|
||||
static int usage(int * argument);
|
||||
int my_execlp(const char * file, const char *arg, ...) __attribute__ ((__sentinel__));
|
||||
|
||||
static int usage(int * argument) {
|
||||
void * last_arg_should_be_null = argument;
|
||||
return my_execlp ("lala", "/home/there", last_arg_should_be_null); /* This should produce a warning */
|
||||
}
|
||||
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
|
||||
int main(void);
|
||||
],
|
||||
[$ATTRIBUTE_CFLAGS])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([unused],
|
||||
[
|
||||
int square(int arg1 __attribute__ ((__unused__)), int arg2);
|
||||
int square(int arg1, int arg2) { return arg2; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
|
||||
#
|
||||
# Ignored by PGI-6.2.5 (pgCC) -- recognized by the output-parser
|
||||
#
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([visibility],
|
||||
[
|
||||
int square(int arg1) __attribute__ ((__visibility__("hidden")));
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
|
||||
#
|
||||
# Attribute warn_unused_result:
|
||||
# Ignored by the intel-compiler 9.1.045 -- recognized by cross-check
|
||||
# Ignored by pathcc-2.2.1 -- recognized by cross-check (through grep ignore)
|
||||
#
|
||||
ATTRIBUTE_CFLAGS=
|
||||
case "$opal_c_vendor" in
|
||||
gnu)
|
||||
ATTRIBUTE_CFLAGS="-Wall"
|
||||
;;
|
||||
intel)
|
||||
# we do not want to get ignored attributes warnings
|
||||
ATTRIBUTE_CFLAGS="-wd1292"
|
||||
;;
|
||||
esac
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([warn_unused_result],
|
||||
[
|
||||
int foo(int arg) __attribute__ ((__warn_unused_result__));
|
||||
int foo(int arg) { return arg + 3; }
|
||||
],
|
||||
[
|
||||
static int usage(int * argument);
|
||||
int foo(int arg) __attribute__ ((__warn_unused_result__));
|
||||
|
||||
int foo(int arg) { return arg + 3; }
|
||||
static int usage(int * argument) {
|
||||
foo (*argument); /* Should produce an unused result warning */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* The autoconf-generated main-function is int main(), which produces a warning by itself */
|
||||
int main(void);
|
||||
],
|
||||
[$ATTRIBUTE_CFLAGS])
|
||||
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([weak_alias],
|
||||
[
|
||||
int foo(int arg);
|
||||
int foo(int arg) { return arg + 3; }
|
||||
int foo2(int arg) __attribute__ ((__weak__, __alias__("foo")));
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([destructor],
|
||||
[
|
||||
void foo(void) __attribute__ ((__destructor__));
|
||||
void foo(void) { return ; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([optnone],
|
||||
[
|
||||
void __attribute__ ((__optnone__)) foo(void);
|
||||
void foo(void) { return ; }
|
||||
],
|
||||
[],
|
||||
[])
|
||||
|
||||
_OPAL_CHECK_SPECIFIC_ATTRIBUTE([extension],
|
||||
[
|
||||
int i = __extension__ 3;
|
||||
],
|
||||
[],
|
||||
[])
|
||||
fi
|
||||
|
||||
# Now that all the values are set, define them
|
||||
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_ALIGNED, [$opal_cv___attribute__aligned],
|
||||
[Whether your compiler has __attribute__ aligned or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_ALWAYS_INLINE, [$opal_cv___attribute__always_inline],
|
||||
[Whether your compiler has __attribute__ always_inline or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_COLD, [$opal_cv___attribute__cold],
|
||||
[Whether your compiler has __attribute__ cold or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_CONST, [$opal_cv___attribute__const],
|
||||
[Whether your compiler has __attribute__ const or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_DEPRECATED, [$opal_cv___attribute__deprecated],
|
||||
[Whether your compiler has __attribute__ deprecated or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_DEPRECATED_ARGUMENT, [$opal_cv___attribute__deprecated_argument],
|
||||
[Whether your compiler has __attribute__ deprecated with optional argument])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_FORMAT, [$opal_cv___attribute__format],
|
||||
[Whether your compiler has __attribute__ format or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_FORMAT_FUNCPTR, [$opal_cv___attribute__format_funcptr],
|
||||
[Whether your compiler has __attribute__ format and it works on function pointers])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_HOT, [$opal_cv___attribute__hot],
|
||||
[Whether your compiler has __attribute__ hot or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_MALLOC, [$opal_cv___attribute__malloc],
|
||||
[Whether your compiler has __attribute__ malloc or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_MAY_ALIAS, [$opal_cv___attribute__may_alias],
|
||||
[Whether your compiler has __attribute__ may_alias or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_NO_INSTRUMENT_FUNCTION, [$opal_cv___attribute__no_instrument_function],
|
||||
[Whether your compiler has __attribute__ no_instrument_function or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_NOINLINE, [$opal_cv___attribute__noinline],
|
||||
[Whether your compiler has __attribute__ noinline or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_NONNULL, [$opal_cv___attribute__nonnull],
|
||||
[Whether your compiler has __attribute__ nonnull or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_NORETURN, [$opal_cv___attribute__noreturn],
|
||||
[Whether your compiler has __attribute__ noreturn or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_NORETURN_FUNCPTR, [$opal_cv___attribute__noreturn_funcptr],
|
||||
[Whether your compiler has __attribute__ noreturn and it works on function pointers])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_PACKED, [$opal_cv___attribute__packed],
|
||||
[Whether your compiler has __attribute__ packed or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_PURE, [$opal_cv___attribute__pure],
|
||||
[Whether your compiler has __attribute__ pure or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_SENTINEL, [$opal_cv___attribute__sentinel],
|
||||
[Whether your compiler has __attribute__ sentinel or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_UNUSED, [$opal_cv___attribute__unused],
|
||||
[Whether your compiler has __attribute__ unused or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_VISIBILITY, [$opal_cv___attribute__visibility],
|
||||
[Whether your compiler has __attribute__ visibility or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_WARN_UNUSED_RESULT, [$opal_cv___attribute__warn_unused_result],
|
||||
[Whether your compiler has __attribute__ warn unused result or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_WEAK_ALIAS, [$opal_cv___attribute__weak_alias],
|
||||
[Whether your compiler has __attribute__ weak alias or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_DESTRUCTOR, [$opal_cv___attribute__destructor],
|
||||
[Whether your compiler has __attribute__ destructor or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_OPTNONE, [$opal_cv___attribute__optnone],
|
||||
[Whether your compiler has __attribute__ optnone or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_EXTENSION, [$opal_cv___attribute__extension],
|
||||
[Whether your compiler has __attribute__ extension or not])
|
||||
AC_DEFINE_UNQUOTED(OPAL_HAVE_ATTRIBUTE_ERROR, [$opal_cv___attribute__error],
|
||||
[Whether your compiler has __attribute__ error or not])
|
||||
])
|
|
@ -0,0 +1,54 @@
|
|||
dnl -*- shell-script -*-
|
||||
dnl
|
||||
dnl Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
||||
dnl University Research and Technology
|
||||
dnl Corporation. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
|
||||
dnl of Tennessee Research Foundation. All rights
|
||||
dnl reserved.
|
||||
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
||||
dnl University of Stuttgart. All rights reserved.
|
||||
dnl Copyright (c) 2004-2005 The Regents of the University of California.
|
||||
dnl All rights reserved.
|
||||
dnl Copyright (c) 2007 Sun Microsystems, Inc. All rights reserved.
|
||||
dnl Copyright (c) 2014 Intel, Inc. All rights reserved.
|
||||
dnl $COPYRIGHT$
|
||||
dnl
|
||||
dnl Additional copyrights may follow
|
||||
dnl
|
||||
dnl $HEADER$
|
||||
dnl
|
||||
dnl There was some mentioning of broken qsort happened for Solaris that could
|
||||
dnl cause qsort to return a bad pointer which could cause some badness.
|
||||
dnl The problem should have been corrected with these patches from SunSolve.
|
||||
dnl Solaris 10 should be free from this problem.
|
||||
dnl
|
||||
dnl 5.8_sparc #108827-27 or later
|
||||
dnl 5.8_x86 #108828-28 or later
|
||||
dnl 5.9_sparc #112874-20 or later
|
||||
dnl 5.9_x86 #114432-07 or later
|
||||
dnl
|
||||
dnl For users who could not patch their systems or are convinced that their
|
||||
dnl native qsort is broken, they could specify this configure flag to use
|
||||
dnl the opal_qsort instead.
|
||||
|
||||
# check for broken qsort
|
||||
# OPAL_CHECK_BROKEN_QSORT(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
AC_DEFUN([OPAL_CHECK_BROKEN_QSORT],[
|
||||
AC_ARG_WITH([broken-qsort],
|
||||
[AC_HELP_STRING([--with-broken-qsort],
|
||||
[Build with FreeBSD qsort instead of native qsort (default: no)])])
|
||||
AC_MSG_CHECKING([for broken qsort])
|
||||
|
||||
if test "$with_broken_qsort" = "yes"; then
|
||||
result="yes"
|
||||
define_result=1
|
||||
else
|
||||
result="no"
|
||||
define_result=0
|
||||
fi
|
||||
AC_MSG_RESULT([$result])
|
||||
AC_DEFINE_UNQUOTED([OPAL_HAVE_BROKEN_QSORT], [$define_result],
|
||||
[whether qsort is broken or not])
|
||||
])
|
|
@ -0,0 +1,136 @@
|
|||
# -*- shell-script -*-
|
||||
#
|
||||
# Copyright (c) 2009 The University of Tennessee and The University
|
||||
# of Tennessee Research Foundation. All rights
|
||||
# reserved.
|
||||
# Copyright (c) 2009-2016 Cisco Systems, Inc. All rights reserved.
|
||||
# Copyright (c) 2010-2012 IBM Corporation. All rights reserved.
|
||||
# Copyright (c) 2013-2016 Los Alamos National Security, LLC. All rights
|
||||
# reserved.
|
||||
# $COPYRIGHT$
|
||||
#
|
||||
# Additional copyrights may follow
|
||||
#
|
||||
# $HEADER$
|
||||
#
|
||||
|
||||
# OPAL_CHECK_CMA(prefix, [action-if-found], [action-if-not-found])
|
||||
# --------------------------------------------------------
|
||||
# check if cma support is wanted.
|
||||
AC_DEFUN([OPAL_CHECK_CMA],[
|
||||
AC_ARG_WITH([cma],
|
||||
[AC_HELP_STRING([--with-cma],
|
||||
[Build Cross Memory Attach support (default: autodetect)])])
|
||||
|
||||
if test "x$with_cma" = "xno" ; then
|
||||
opal_check_cma_happy=0
|
||||
fi
|
||||
|
||||
# We only need to do the back-end test once
|
||||
if test -z "$opal_check_cma_happy" ; then
|
||||
OPAL_CHECK_CMA_BACKEND
|
||||
fi
|
||||
|
||||
AS_IF([test $opal_check_cma_happy -eq 1],
|
||||
[$2],
|
||||
[if test "$with_cma" = "yes"; then
|
||||
AC_MSG_WARN([--with-cma support requested, but not available])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
$3])
|
||||
])
|
||||
|
||||
AC_DEFUN([OPAL_CHECK_CMA_BACKEND],
|
||||
[
|
||||
OPAL_VAR_SCOPE_PUSH([opal_check_cma_need_defs opal_check_cma_kernel_version opal_check_cma_CFLAGS opal_check_cma_msg])
|
||||
|
||||
# Some systems have process_cm_readv() in libc, which means CMA is
|
||||
# supported. Other systems do not have process_cm_readv() in
|
||||
# libc, but have support for it in the kernel if we invoke it
|
||||
# directly. Check for both.
|
||||
AC_CHECK_HEADERS([sys/prctl.h])
|
||||
|
||||
AC_CHECK_FUNC([process_vm_readv], [opal_check_cma_need_defs=0],
|
||||
[opal_check_cma_need_defs=1])
|
||||
AC_DEFINE_UNQUOTED([OPAL_CMA_NEED_SYSCALL_DEFS],
|
||||
[$opal_check_cma_need_defs],
|
||||
[Need CMA syscalls defined])
|
||||
if test $opal_check_cma_need_defs -eq 1 ; then
|
||||
opal_check_cma_CFLAGS=$CFLAGS
|
||||
# Need some extra include paths to locate the appropriate headers
|
||||
CFLAGS="$CFLAGS -I${srcdir} -I${srcdir}/opal/include"
|
||||
AC_MSG_CHECKING([if internal syscall numbers for Linux CMA work])
|
||||
AC_RUN_IFELSE([AC_LANG_PROGRAM([[
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include <sys/uio.h>
|
||||
#include <sys/wait.h>
|
||||
#include <sys/syscall.h>
|
||||
|
||||
#include "opal/include/opal/sys/cma.h"
|
||||
|
||||
static void do_check (pid_t pid, int *in, int *out)
|
||||
{
|
||||
int check[4] = {0, 0, 0, 0}, i;
|
||||
struct iovec rem_iov = {out, sizeof (check)};
|
||||
struct iovec loc_iov = {check, sizeof (check)};
|
||||
ssize_t rc;
|
||||
|
||||
rc = process_vm_readv (pid, &loc_iov, 1, &rem_iov, 1, 0);
|
||||
if (sizeof (check) != rc) {
|
||||
exit (1);
|
||||
}
|
||||
|
||||
for (i = 0 ; i < 4 ; ++i) {
|
||||
if (check[i] != i) {
|
||||
exit (1);
|
||||
}
|
||||
|
||||
check[i] = i * 2;
|
||||
}
|
||||
|
||||
rem_iov.iov_base = in;
|
||||
rc = process_vm_writev (pid, &loc_iov, 1, &rem_iov, 1, 0);
|
||||
if (sizeof (check) != rc) {
|
||||
exit (1);
|
||||
}
|
||||
|
||||
exit (0);
|
||||
}
|
||||
]],[[
|
||||
int i, in[4] = {-1, -1, -1, -1}, out[4] = {0, 1, 2, 3};
|
||||
|
||||
do_check (getpid (), in, out);
|
||||
|
||||
for (i = 0 ; i < 4 ; ++i) {
|
||||
if (in[i] != 2 * i) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/* all good */
|
||||
return 0;
|
||||
]])],
|
||||
[AC_MSG_RESULT([yes])
|
||||
opal_check_cma_happy=1],
|
||||
[AC_MSG_RESULT([no])
|
||||
opal_check_cma_happy=0],
|
||||
[AC_MSG_RESULT([no (cross-compiling)])
|
||||
opal_check_cma_happy=0])
|
||||
CFLAGS=$opal_check_cma_CFLAGS
|
||||
else
|
||||
# If we didn't need the defs, then we have process_vm_readv(),
|
||||
# and CMA is happy.
|
||||
opal_check_cma_happy=1
|
||||
fi
|
||||
|
||||
OPAL_VAR_SCOPE_POP
|
||||
|
||||
AS_IF([test $opal_check_cma_happy -eq 1],
|
||||
[opal_check_cma_msg=yes],
|
||||
[opal_check_cma_msg=no])
|
||||
OPAL_SUMMARY_ADD([[Transports]],[[Shared memory/Linux CMA]],[$1],[$opal_check_cma_msg])
|
||||
])
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue