diff --git a/doc/sphinx/10_microbenchmarks/M2_DAXPY/DAXPY.rst b/doc/sphinx/10_microbenchmarks/M2_DAXPY/DAXPY.rst index a3f93958..aa787b85 100644 --- a/doc/sphinx/10_microbenchmarks/M2_DAXPY/DAXPY.rst +++ b/doc/sphinx/10_microbenchmarks/M2_DAXPY/DAXPY.rst @@ -23,12 +23,6 @@ Figure of Merit Building ======== -RHEL Systems ------------- - -CrayOS Systems --------------- - Running ======= diff --git a/doc/sphinx/10_microbenchmarks/M3_DGEMM/DGEMM.rst b/doc/sphinx/10_microbenchmarks/M3_DGEMM/DGEMM.rst index 6acfecab..6d05d5df 100644 --- a/doc/sphinx/10_microbenchmarks/M3_DGEMM/DGEMM.rst +++ b/doc/sphinx/10_microbenchmarks/M3_DGEMM/DGEMM.rst @@ -61,8 +61,9 @@ Set the number of OpenMP threads before running. .. code-block:: bash - export OPENBLAS_NUM_THREADS = - export OMP_NUM_THREADS = + export OPENBLAS_NUM_THREADS= + export OMP_NUM_THREADS= + export OMP_PLACES=cores .. @@ -81,3 +82,18 @@ These are positional arguments, so, for instance, R cannot be set without settin Example Results =============== +ATS-3 Rocinante HBM +------------------- + +This test was built with the intel 2023.1.0 compiler using the crayOS compiler wrapper where: :math:`N=2500, R=500, \alpha=1.0, \beta=1.0`. The 110 core run (cores are used as OpenMP threads) avoids the OS dedicated cores and takes roughly an hour. All four runs on rocinante hbm take 5-6 hours. + +.. csv-table:: DGEMM microbenchmark FLOPs measurement + :file: dgemm_ats3.csv + :align: center + :widths: 10, 10 + :header-rows: 1 + +.. figure:: dgemm_ats3.png + :align: center + :scale: 50% + :alt: DGEMM microbenchmark FLOPs measurement \ No newline at end of file diff --git a/doc/sphinx/10_microbenchmarks/M3_DGEMM/cpu.gp b/doc/sphinx/10_microbenchmarks/M3_DGEMM/cpu.gp index 14c4ac35..89acce19 100644 --- a/doc/sphinx/10_microbenchmarks/M3_DGEMM/cpu.gp +++ b/doc/sphinx/10_microbenchmarks/M3_DGEMM/cpu.gp @@ -21,7 +21,10 @@ set key autotitle columnheader set style line 1 linetype 6 dashtype 1 linecolor rgb "#FF0000" linewidth 2 pointtype 6 pointsize 3 set style line 2 linetype 1 dashtype 2 linecolor rgb "#FF0000" linewidth 2 -#plot "cpu_66M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 +#plot "dgemm_cts1.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 +set output "dgemm_ats3.png" +set xrange [4:128] +plot "dgemm_ats3.csv" using 1:2 with linespoints linestyle 1 diff --git a/doc/sphinx/10_microbenchmarks/M3_DGEMM/dgemm_ats3.csv b/doc/sphinx/10_microbenchmarks/M3_DGEMM/dgemm_ats3.csv new file mode 100644 index 00000000..73db3793 --- /dev/null +++ b/doc/sphinx/10_microbenchmarks/M3_DGEMM/dgemm_ats3.csv @@ -0,0 +1,5 @@ +No. Cores,GFlops +32,2176.5 +56,3460.0 +88,4949.1 +110,4850.5 \ No newline at end of file diff --git a/doc/sphinx/10_microbenchmarks/M4_IOR/IOR.rst b/doc/sphinx/10_microbenchmarks/M4_IOR/IOR.rst index 3905fa7a..8769b296 100644 --- a/doc/sphinx/10_microbenchmarks/M4_IOR/IOR.rst +++ b/doc/sphinx/10_microbenchmarks/M4_IOR/IOR.rst @@ -5,13 +5,13 @@ IOR Purpose ======= -IOR is used for testing performance of parallel file systems using various interfaces and access patterns. +IOR is used for testing performance of parallel file systems using various interfaces and access patterns at the POSIX and MPI-IO level. Characteristics =============== IOR is available: -- Github: `IOR `_ +- Github: `IOR Public `_ - LANL Crossroads Site: `IOR `_ The github repo also contains mdtest. @@ -22,14 +22,30 @@ Problem Figure of Merit --------------- +Run Rules +--------- + +Modifications to the benchmark application code are only permissible to enable correct compilation and execution on the target platform. Any modifications must be fully documented (e.g., as a diff or patch file) and reported with the benchmark results. + Building ======== -RHEL Systems ------------- +MPI, MPI-IO, and OpenMP are required in order to build and run the code. The +source code used for this benchmark is derived from IOR 3.0.1 and it is +included here. + +Ensure that the MPI compiler wrappers (e.g., `mpicc`) are in `$PATH`. Then create a build directory and an (optional) install directory. + +.. code-block:: bash + + + ${BENCHMARK_PATH}/microbenchmarks/ior/configure --prefix= + make + #make install +.. -CrayOS Systems --------------- +This will build both IOR with the POSIX and MPI-IO interfaces and create the +IOR executable at `src/ior`. Running ======= diff --git a/doc/sphinx/10_microbenchmarks/M4_IOR/cpu.gp b/doc/sphinx/10_microbenchmarks/M4_IOR/cpu.gp index e4bb7155..89acce19 100644 --- a/doc/sphinx/10_microbenchmarks/M4_IOR/cpu.gp +++ b/doc/sphinx/10_microbenchmarks/M4_IOR/cpu.gp @@ -1,10 +1,10 @@ #!/usr/bin/gnuplot set terminal pngcairo enhanced size 1024, 768 dashed font 'Helvetica,18' -set output "cpu_66M.png" +set output "dgemm_cts1.png" -set title "Branson Strong Scaling Performance on CTS-1, 66M particles" font "serif,22" +set title " Single node Dgemm" font "serif,22" set xlabel "No. Processing Elements" -set ylabel "Figure of Merit (particles/sec)" +set ylabel "Figure of Merit (GFlops)" set xrange [1:64] set key left top @@ -21,15 +21,10 @@ set key autotitle columnheader set style line 1 linetype 6 dashtype 1 linecolor rgb "#FF0000" linewidth 2 pointtype 6 pointsize 3 set style line 2 linetype 1 dashtype 2 linecolor rgb "#FF0000" linewidth 2 -plot "cpu_66M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 +#plot "dgemm_cts1.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 -set output "cpu_133M.png" -set title "Branson Strong Scaling Performance on CTS-1, 133M particles" font "serif,22" -plot "cpu_133M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 - - -set output "cpu_200M.png" -set title "Branson Strong Scaling Performance on CTS-1, 200M particles" font "serif,22" -plot "cpu_200M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 +set output "dgemm_ats3.png" +set xrange [4:128] +plot "dgemm_ats3.csv" using 1:2 with linespoints linestyle 1 diff --git a/doc/sphinx/10_microbenchmarks/M5_OSUMB/OSUMB.rst b/doc/sphinx/10_microbenchmarks/M5_OSUMB/OSUMB.rst index f64d4e2d..00c70ed1 100644 --- a/doc/sphinx/10_microbenchmarks/M5_OSUMB/OSUMB.rst +++ b/doc/sphinx/10_microbenchmarks/M5_OSUMB/OSUMB.rst @@ -16,6 +16,9 @@ Problem Figure of Merit --------------- +Run Rules +--------- + Building ======== diff --git a/doc/sphinx/10_microbenchmarks/M5_OSUMB/cpu.gp b/doc/sphinx/10_microbenchmarks/M5_OSUMB/cpu.gp index e4bb7155..89acce19 100644 --- a/doc/sphinx/10_microbenchmarks/M5_OSUMB/cpu.gp +++ b/doc/sphinx/10_microbenchmarks/M5_OSUMB/cpu.gp @@ -1,10 +1,10 @@ #!/usr/bin/gnuplot set terminal pngcairo enhanced size 1024, 768 dashed font 'Helvetica,18' -set output "cpu_66M.png" +set output "dgemm_cts1.png" -set title "Branson Strong Scaling Performance on CTS-1, 66M particles" font "serif,22" +set title " Single node Dgemm" font "serif,22" set xlabel "No. Processing Elements" -set ylabel "Figure of Merit (particles/sec)" +set ylabel "Figure of Merit (GFlops)" set xrange [1:64] set key left top @@ -21,15 +21,10 @@ set key autotitle columnheader set style line 1 linetype 6 dashtype 1 linecolor rgb "#FF0000" linewidth 2 pointtype 6 pointsize 3 set style line 2 linetype 1 dashtype 2 linecolor rgb "#FF0000" linewidth 2 -plot "cpu_66M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 +#plot "dgemm_cts1.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 -set output "cpu_133M.png" -set title "Branson Strong Scaling Performance on CTS-1, 133M particles" font "serif,22" -plot "cpu_133M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 - - -set output "cpu_200M.png" -set title "Branson Strong Scaling Performance on CTS-1, 200M particles" font "serif,22" -plot "cpu_200M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 +set output "dgemm_ats3.png" +set xrange [4:128] +plot "dgemm_ats3.csv" using 1:2 with linespoints linestyle 1 diff --git a/doc/sphinx/10_microbenchmarks/M6_MDTEST/MDTEST.rst b/doc/sphinx/10_microbenchmarks/M6_MDTEST/MDTEST.rst index ffc1477a..ef9994ac 100644 --- a/doc/sphinx/10_microbenchmarks/M6_MDTEST/MDTEST.rst +++ b/doc/sphinx/10_microbenchmarks/M6_MDTEST/MDTEST.rst @@ -15,6 +15,9 @@ Characteristics Problem ------- +Run Rules +--------- + Figure of Merit --------------- diff --git a/doc/sphinx/10_microbenchmarks/M6_MDTEST/cpu.gp b/doc/sphinx/10_microbenchmarks/M6_MDTEST/cpu.gp index fe119181..89acce19 100644 --- a/doc/sphinx/10_microbenchmarks/M6_MDTEST/cpu.gp +++ b/doc/sphinx/10_microbenchmarks/M6_MDTEST/cpu.gp @@ -1,10 +1,10 @@ #!/usr/bin/gnuplot set terminal pngcairo enhanced size 1024, 768 dashed font 'Helvetica,18' -set output "" +set output "dgemm_cts1.png" -set title "Branson Strong Scaling Performance on CTS-1, 66M particles" font "serif,22" +set title " Single node Dgemm" font "serif,22" set xlabel "No. Processing Elements" -set ylabel "Figure of Merit (particles/sec)" +set ylabel "Figure of Merit (GFlops)" set xrange [1:64] set key left top @@ -21,6 +21,10 @@ set key autotitle columnheader set style line 1 linetype 6 dashtype 1 linecolor rgb "#FF0000" linewidth 2 pointtype 6 pointsize 3 set style line 2 linetype 1 dashtype 2 linecolor rgb "#FF0000" linewidth 2 -plot "cpu_66M.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 +#plot "dgemm_cts1.csv" using 1:2 with linespoints linestyle 1, "" using 1:3 with line linestyle 2 + +set output "dgemm_ats3.png" +set xrange [4:128] +plot "dgemm_ats3.csv" using 1:2 with linespoints linestyle 1 diff --git a/microbenchmarks/ior/COPYRIGHT b/microbenchmarks/ior/COPYRIGHT new file mode 100644 index 00000000..70008a28 --- /dev/null +++ b/microbenchmarks/ior/COPYRIGHT @@ -0,0 +1,256 @@ +Copyright (c) 2003, The Regents of the University of California. +Produced at the Lawrence Livermore National Laboratory. +Written by William Loewe , Tyce McLarty , +and Christopher Morrone . +UCRL-CODE-2003-016. +All rights reserved. + +This file is part of IOR. + +Please also read Our Notice and GNU General Public License. + +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) version 2, dated June 1991. + +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 terms and conditions of 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, write to the Free Software Foundation, Inc., 59 Temple +Place, Suite 330, Boston, MA 02111-1307 USA + + +OUR NOTICE AND TERMS AND CONDITIONS OF THE GNU GENERAL PUBLIC LICENSE + +Our Preamble Notice + +A. This notice is required to be provided under our contract with the U.S. +Department of Energy (DOE). This work was produced at the University of +California, Lawrence Livermore National Laboratory under Contract No. +W-7405-ENG-48 with the DOE. + +B. Neither the United States Government nor the University of California nor +any of their employees, makes any warranty, express or implied, or assumes any +liability or responsibility for the accuracy, completeness, or usefulness of +any information, apparatus, product, or process disclosed, or represents that +its use would not infringe privately-owned rights. + +C. Also, reference herein to any specific commercial products, process, or +services by trade name, trademark, manufacturer or otherwise does not +necessarily constitute or imply its endorsement, recommendation, or favoring +by the United States Government or the University of California. The views and +opinions of authors expressed herein do not necessarily state or reflect those +of the United States Government or the University of California, and shall not +be used for advertising or product endorsement purposes. + +The precise terms and conditions for copying, distribution and modification +follows. + +GNU Terms and Conditions for Copying, Distribution, and Modification + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program," below, refers to any such program +or work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included +without limitation in the term "modification".) Each licensee is addressed as +"you." + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is +not restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice and +disclaimer of warranty; keep intact all the notices that refer to this License +and to the absence of any warranty; and give any other recipients of the +Program a copy of this License along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may +at your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, +thus forming a work based on the Program, and copy and distribute such +modifications or work under the terms of Section 1 above, provided that you +also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices stating + that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in whole + or in part contains or is derived from the Program or any part thereof, + to be licensed as a whole at no charge to all third parties under the terms + of this License. + + c) If the modified program normally reads commands interactively when run, + you must cause it, when started running for such interactive use in the + most ordinary way, to print or display an announcement including an + appropriate copyright notice and a notice that there is no warranty (or + else, saying that you provide a warranty) and that users may redistribute + the program under these conditions, and telling the user how to view a copy + of this License. (Exception: if the Program itself is interactive but does + not normally print such an announcement, your work based on the Program is + not required to print an announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +work. But when you distribute the same section as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms +of this License, whose permissions for other licensees extend to the entire +whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on +the Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this +License. + +3. You may copy and distribute the Program (or a work based on it, under +Section 2) in object code or executable form under the terms of Sections 1 and +2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source + code, which must be distributed under the terms of Sections 1 and 2 above + on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three years, to + give any third party, for a charge no more than your cost of physically + performing source distribution, a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of Sections 1 + and 2 above on a medium customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer to + distribute corresponding source code. (This alternative is allowed only + for noncommercial distribution and only if you received the program in + object code or executable form with such an offer, in accord with + Subsection b above.) + +The source code for a work means the preferred form the work for making +modifications to it. For an executable work, complete source code means all +the source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code +distributed need not include anything that is normally distributed (in either +source or binary form) with the major components (compiler, kernel, and so on) +of the operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source +code from the same place counts as distribution of the source code, even though +third parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or +any work based on the Program), you indicate your acceptance of this License to +do so, and all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by +third parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), conditions +are imposed on you (whether by court order, agreement or otherwise) that +contradict the conditions of this License, they do not excuse you from the +conditions of this License. If you cannot distribute so as to satisfy +simultaneously your obligations under this License and any other pertinent +obligations, then as a consequence you may not distribute the Program at all. +For example, if a patent license would not permit royalty-free redistribution +of the Program by all those who receive copies directly or indirectly through +you, then the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and +the section as a whole is intended to apply in other circumstances. + +It is not the purpose to this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original +copyright holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In +such case, this License incorporates the limitation as if written in the body +of this License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any later +version," you have the option of following the terms and conditions either of +that version of any later version published by the Free Software Foundation. +If the Program does not specify a version number of this License, you may +choose any version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision to grant permission will be guided by the two goals of preserving +the free status of all derivatives of our free software and or promoting the +sharing and reuse of software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR +THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE +STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE +PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND +PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, +YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR +INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA +BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER +OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +END OF TERMS AND CONDITIONS diff --git a/microbenchmarks/ior/META b/microbenchmarks/ior/META new file mode 100644 index 00000000..fc267a7e --- /dev/null +++ b/microbenchmarks/ior/META @@ -0,0 +1,3 @@ +Package: ior +Version: 3.0.1 +Release: 0 diff --git a/microbenchmarks/ior/Makefile.in b/microbenchmarks/ior/Makefile.in new file mode 100644 index 00000000..9ea89e50 --- /dev/null +++ b/microbenchmarks/ior/Makefile.in @@ -0,0 +1,774 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/ax_prog_cc_mpi.m4 \ + $(top_srcdir)/config/x_ac_meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ + $(am__configure_deps) $(am__DIST_COMMON) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno config.status.lineno +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +CSCOPE = cscope +DIST_SUBDIRS = $(SUBDIRS) +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/compile \ + $(top_srcdir)/config/config.guess \ + $(top_srcdir)/config/config.sub \ + $(top_srcdir)/config/install-sh $(top_srcdir)/config/missing \ + ChangeLog README config/compile config/config.guess \ + config/config.sub config/install-sh config/missing +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi +am__post_remove_distdir = $(am__remove_distdir) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +DIST_TARGETS = dist-gzip +distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +MKDIR_P = @MKDIR_P@ +MPICC = @MPICC@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = src doc contrib +EXTRA_DIST = META COPYRIGHT README ChangeLog +all: all-recursive + +.SUFFIXES: +am--refresh: Makefile + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ + $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + $(am__cd) $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +$(am__aclocal_m4_deps): + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files + +distdir: $(DISTFILES) + $(am__remove_distdir) + test -d "$(distdir)" || mkdir "$(distdir)" + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done + -test -n "$(am__skip_mode_fix)" \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r "$(distdir)" +dist-gzip: distdir + tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__post_remove_distdir) + +dist-bzip2: distdir + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__post_remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz + $(am__post_remove_distdir) + +dist-xz: distdir + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz + $(am__post_remove_distdir) + +dist-tarZ: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z + $(am__post_remove_distdir) + +dist-shar: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__post_remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__post_remove_distdir) + +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ + *.tar.bz2*) \ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ + *.tar.xz*) \ + xz -dc $(distdir).tar.xz | $(am__untar) ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst + chmod a-w $(distdir) + test -d $(distdir)/_build || exit 0; \ + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && am__cwd=`pwd` \ + && $(am__cd) $(distdir)/_build/sub \ + && ../../configure \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=../.. --prefix="$$dc_install_base" \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ + && cd "$$am__cwd" \ + || exit 1 + $(am__post_remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' +distuninstallcheck: + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ + dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ + distcheck distclean distclean-generic distclean-tags \ + distcleancheck distdir distuninstallcheck dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ + pdf-am ps ps-am tags tags-am uninstall uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/microbenchmarks/ior/README b/microbenchmarks/ior/README new file mode 100644 index 00000000..258beae0 --- /dev/null +++ b/microbenchmarks/ior/README @@ -0,0 +1,19 @@ +Building +-------- + +0. If "configure" is missing from the top level directory, you + probably retrieved this code directly from the repository. + Run "./bootstrap". + + If your versions of the autotools are not new enough to run + this script, download and official tarball in which the + configure script is already provided. + +1. Run "./configure" + + See "./configure --help" for configuration options. + +2. Run "make" + +3. Optionally, run "make install". The installation prefix + can be changed as an option to the "configure" script. diff --git a/microbenchmarks/ior/README.XROADS.md b/microbenchmarks/ior/README.XROADS.md new file mode 100644 index 00000000..5c211ef1 --- /dev/null +++ b/microbenchmarks/ior/README.XROADS.md @@ -0,0 +1,243 @@ +Crossroads/NERSC-9 IOR Benchmark +================================================================================ + +I. Benchmark Description +-------------------------------------------------------------------------------- +IOR is designed to measure parallel I/O performance at both the POSIX and MPI-IO +level. All of the general run rules for APEX benchmarking apply. + + +II. Build Instructions +-------------------------------------------------------------------------------- +MPI, MPI-IO, and OpenMP are required in order to build and run the code. The +source code used for this benchmark is derived from IOR 3.0.1 and it is +included here. More information about IOR is available on +https://github.com/LLNL/ior. + +After extracting the tar file, ensure that the MPI compiler wrappers (e.g., +`mpicc`) are in `$PATH` and then + + cd ior-3.0.1-xroads + ./configure + make + +This will build both IOR with the POSIX and MPI-IO interfaces and create the +IOR executable at `src/ior`. + + +III. Run Rules +-------------------------------------------------------------------------------- +The intent of these benchmarks is to measure the performance of I/O operations +on the platform storage under three loads: + +1. fully sequential, large-transaction reads and writes +2. fully random, small-transaction reads and writes + +Observed benchmark performance shall be obtained from a storage system +configured as closely as possible to the proposed platform storage. If the +proposed solution includes multiple file access protocols (e.g., pNFS and NFS) +or multiple tiers accessible by applications, benchmark results for IOR +shall be provided for each protocol and/or tier. + +Performance projections are permissible if they are derived from a similar +system that is considered an earlier generation of the proposed system. + +### Load 1: Sequential Loads + +This benchmark is intended to measure the throughput of the storage subsystem +and contains features that minimize caching/buffering effects. As such, the +Offerer should not utilize optimizations that cache or buffer the transferred +data in compute node memory. + +The Offeror shall run the following tests: + +* MPI/IO file per process (i.e., N processes operate on N files) +* MPI/IO shared file (i.e., N processes operate on 1 file) +* POSIX I/O file per process +* POSIX I/O shared file + +Each of these four tests must be run at the following levels of concurrency: + +1. a single compute node +2. 10% of the proposed system's compute nodes +3. 50% of the proposed system's compute nodes +4. sufficient compute nodes to achieve the maximum bandwidth results + +These tests must be configured via a combination of input configuration files +and command line options. Annotated input configuration files are provided in +the `inputs.xroads/` subdirectory and demonstrate how these tests can be defined +for the purposes of these benchmarks. + +The Offeror MUST modify the following parameters for each benchmark test: + +* `numTasks` - the number of MPI processes to use. The Offeror may choose to + run multiple MPI processes per compute node to achieve the highest bandwidth + results. +* `segmentCount` - number of segments (blocks * numTasks) in a file. This + governs the size of the file(s) written/read, and the amount of data + written/read by each node must exceed 1.5 times the memory available for the + file system's page cache (typically the entire node's RAM). +* `memoryPerNode` - size (in %) of each node's RAM to be filled before + running the benchmark test. This value must be no less than 80% of the total + RAM available on each compute node and is intended to represent the memory + footprint of a real application. + +In addition, the Offeror MAY modify the following parameters for each test: + +* `transferSize` - the size (in bytes) of a single data buffer to be transferred + in a single I/O call. The Offeror should find the transferSize that produces + the highest bandwidth results and report this optimal transferSize. + `blockSize` must always be equal to `transferSize`. +* `testFile` - path to data files to be read or written for this benchmark +* `hintsFileName` - path to MPI-IO hints file +* `collective` - MPI-IO collective vs. independent operation mode + +As mentioned above, `segmentCount` must be set so that the total amount of +data written is greater than 1.5 times the amount of RAM on the compute nodes. +The total fileSize is given by + + fileSize = segmentCount * blockSize * numTasks + +So for a 10-node test with an aggregate 640 GB of RAM, fileSize must be at +least 960 GB. Assuming `blockSize=1MB` and `numTasks=240` (24 MPI processes +per node) is optimal, an appropriate `segmentCount` would be + + segmentCount = fileSize / ( blockSize * numTasks ) = 4096 + +Page caches on the storage subsystem's servers may still be used, but they must +be configured as they would be for the delivered Crossroads/NERSC-9 systems. + +Providing an MPI-IO "hints" file for the MPI-IO runs, which IOR will look for in +the file specified by the `hintsFileName` keyword in the input file, is allowed. +Documentation on IOR's support for MPI-IO hints can be found in the "HOW DO I +USE HINTS?" section of the IOR User Guide (found in `doc/USER_GUIDE`). + +### Load 2: Fully Random Loads + +As with Load 1, this benchmark is intended to measure the throughput of the +storage subsystem and contains features that minimize caching/buffering effects. +As such, the Offerer should not utilize optimizations that cache or buffer the +transferred data in system memory. + +The Offeror shall run the following tests: + +* POSIX I/O file per process +* POSIX I/O shared file + +Both of these tests must be run at the following levels of concurrency: + +1. a single compute node +2. 10% of the proposed system's compute nodes +3. 20% of the proposed system's compute nodes + +These tests must be configured via a combination of input configuration files +and command line options. Annotated input configuration files are provided in +the `inputs.xroads/` subdirectory and demonstrate how these tests can be defined +for the purposes of these benchmarks. + +The Offeror MUST modify the following parameters for each benchmark test: + +* `numTasks` - the number of MPI processes to use. The Offeror may choose to + run multiple MPI processes per compute node to achieve the highest bandwidth + results. +* `segmentCount` - number of segments (blocks * numTasks) in a file. This + governs the size of the file(s) written/read, and the amount of data + written/read by each node must exceed 1.5 times the memory available for the + file system's page cache (typically the entire node's RAM). +* `memoryPerNode` - size (in %) of each node's RAM to be filled before + running the benchmark test. This value must be no less than 80% of the total + RAM available on each compute node and is intended to represent the memory + footprint of a real application. + +In addition, the Offeror MAY modify the following parameter for each test: + +* `testFile` - path to data files to be read or written for this benchmark + +As with the other loads, `segmentCount` must be set so that the total amount +of data written is greater than 1.5 times the amount of RAM on the compute +nodes. The total fileSize is given by + + fileSize = segmentCount * 4K * numTasks + +So for a 10-node test with an aggregate 640 GB of RAM, fileSize must be at +least 960 GB. Assuming `numTasks=240` (24 MPI processes per node), an +appropriate `segmentCount` would be + + segmentCount = fileSize / ( 4K * numTasks ) = 1048576 + +### Running IOR + +IOR is executed as any other standard MPI application would be on the proposed +system. For example, + + mpirun -np 64 ./ior -f ./load1-posix-filepertask.ior + +or + + srun -n 64 ./ior -f ./load1-posix-filepertask.ior + +will execute IOR with 64 processes and use the input configuration file called +`load1-posix-filepertask.ior`. + +Example input configuration files for all required tests are supplied in the +`inputs.apex/` directory with additional annotations and details where +appropriate. + + +IV. Permitted Modifications +-------------------------------------------------------------------------------- + +Modifications to the benchmark application code are only permissible to enable +correct compilation and execution on the target platform. Any modifications +must be fully documented (e.g., as a diff or patch file) and reported with the +benchmark results. + + +V. Reporting Results +-------------------------------------------------------------------------------- + +### Load 1: Sequential Loads + +IOR will execute both read and write tests for each run. The bandwidth +measurements to be reported are the `Max Write` and `Max Read` values (in +units of `MB/s`) reported to stdout. In addition, the concurrency (number of +compute nodes and number of MPI processes used) for each run must be stated. + +The maximum write and read bandwidths for a single read-and-write test must be +reported for Load 1. Reporting the maximum read bandwidth from one run and the +maximum write bandwidth from a different run is NOT valid. Write bandwidth +has slightly higher importance for this test, so if the highest observed read +rate came from a different run than the highest observed write rate, report the +results from the run with the highest write rate. + +### Load 2: Fully Random Loads + +IOR will execute both read and write tests for each run. The bandwidth +measurements to be reported are the `Max Write` and `Max Read` values (in +units of `MB/s`) reported to stdout. + +As with Load 1, the maximum write and read bandwidths for a single +read-and-write test must be reported for Load 2. Read bandwidth has slightly +higher importance for this test, so report results from the run with the highest +read rate. + +### Benchmark Platform Description + +In addition to maximum bandwidths, the Offeror must also provide a comprehensive +description of the environment in which each benchmark was run. This must +include: + +* Client and server system configurations, including node and processor counts, + processor models, memory size and speed, and OS (names and versions) +* Storage media and their configurations used for each tier of the storage + subsystem +* Network fabric used to connect servers, clients, and storage, including + network configuration settings and topology +* Client and server configuration settings including + * Client and server sysctl settings + * Driver options + * Network interface options + * File system configuration and mount options +* Compiler name and version, compiler options, and libraries used to build + benchmarks + diff --git a/microbenchmarks/ior/config/compile b/microbenchmarks/ior/config/compile new file mode 100755 index 00000000..a85b723c --- /dev/null +++ b/microbenchmarks/ior/config/compile @@ -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 . +# +# 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 . + +# 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 or send patches to +# . + +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 . +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: diff --git a/microbenchmarks/ior/config/config.guess b/microbenchmarks/ior/config/config.guess new file mode 100755 index 00000000..6c32c864 --- /dev/null +++ b/microbenchmarks/ior/config/config.guess @@ -0,0 +1,1421 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright 1992-2014 Free Software Foundation, Inc. + +timestamp='2014-11-04' + +# This file 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 3 of the License, 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 . +# +# 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 Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). +# +# Originally written by Per Bothner; maintained since 2000 by Ben Elliston. +# +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches to . + + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright 1992-2014 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ; set_cc_for_build= ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` + ;; +esac + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + sh5el) machine=sh5le-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ELF__ + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; + *:OpenBSD:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} + exit ;; + *:ekkoBSD:*:*) + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} + exit ;; + *:SolidBSD:*:*) + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} + exit ;; + macppc:MirBSD:*:*) + echo powerpc-unknown-mirbsd${UNAME_RELEASE} + exit ;; + *:MirBSD:*:*) + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} + exit ;; + alpha:OSF1:*:*) + case $UNAME_RELEASE in + *4.0) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + ;; + *5.*) + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + ;; + esac + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Pn.n version is a patched version. + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit ;; + *:z/VM:*:*) + echo s390-ibm-zvmoe + exit ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit ;; + arm*:riscos:*:*|arm*:RISCOS:*:*) + echo arm-unknown-riscos + exit ;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit ;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit ;; + DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7; exit ;; + esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; + i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && + dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && + SYSTEM_NAME=`$dummy $dummyarg` && + { echo "$SYSTEM_NAME"; exit; } + echo mips-mips-riscos${UNAME_RELEASE} + exit ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` + then + echo "$SYSTEM_NAME" + else + echo rs6000-ibm-aix3.2.5 + fi + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit ;; + *:AIX:*:[4567]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/lslpp ] ; then + IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | + awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + eval $set_cc_for_build + + # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating + # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler + # generating 64-bit code. GNU and HP use different nomenclature: + # + # $ CC_FOR_BUILD=cc ./config.guess + # => hppa2.0w-hp-hpux11.23 + # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess + # => hppa64-hp-hpux11.23 + + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | + grep -q __LP64__ + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && + { echo "$SYSTEM_NAME"; exit; } + echo unknown-hitachi-hiuxwe2 + exit ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + *:UNICOS/mp:*:*) + echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit ;; + *:FreeBSD:*:*) + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in + amd64) + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + *) + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + esac + exit ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; + *:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit ;; + *:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; + i*:windows32*:*) + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 + exit ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit ;; + *:Interix*:*) + case ${UNAME_MACHINE} in + x86) + echo i586-pc-interix${UNAME_RELEASE} + exit ;; + authenticamd | genuineintel | EM64T) + echo x86_64-unknown-interix${UNAME_RELEASE} + exit ;; + IA64) + echo ia64-unknown-interix${UNAME_RELEASE} + exit ;; + esac ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit ;; + amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) + echo x86_64-unknown-cygwin + exit ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} + exit ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arm*:Linux:*:*) + eval $set_cc_for_build + if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_EABI__ + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + else + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi + else + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf + fi + fi + exit ;; + avr32*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + cris:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + crisv32:Linux:*:*) + echo ${UNAME_MACHINE}-axis-linux-${LIBC} + exit ;; + frv:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:Linux:*:*) + echo ${UNAME_MACHINE}-pc-linux-${LIBC} + exit ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m32r*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + mips:Linux:*:* | mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=${UNAME_MACHINE}el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=${UNAME_MACHINE} + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } + ;; + openrisc*:Linux:*:*) + echo or1k-unknown-linux-${LIBC} + exit ;; + or32:Linux:*:* | or1k*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + padre:Linux:*:*) + echo sparc-unknown-linux-${LIBC} + exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-${LIBC} + exit ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; + esac + exit ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-${LIBC} + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} + exit ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + exit ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + vax:Linux:*:*) + echo ${UNAME_MACHINE}-dec-linux-${LIBC} + exit ;; + x86_64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + xtensa*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit ;; + i*86:*:5:[678]*) + # UnixWare 7.x, OpenUNIX and OpenServer 6. + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit ;; + M68*:*:R3V[5678]*:*) + test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit ;; + i*86:VOS:*:*) + # From Paul.Green@stratus.com. + echo ${UNAME_MACHINE}-stratus-vos + exit ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit ;; + BePC:Haiku:*:*) # Haiku running on Intel PC compatible. + echo i586-pc-haiku + exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit ;; + SX-7:SUPER-UX:*:*) + echo sx7-nec-superux${UNAME_RELEASE} + exit ;; + SX-8:SUPER-UX:*:*) + echo sx8-nec-superux${UNAME_RELEASE} + exit ;; + SX-8R:SUPER-UX:*:*) + echo sx8r-nec-superux${UNAME_RELEASE} + exit ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit ;; + *:Darwin:*:*) + UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi + elif test "$UNAME_PROCESSOR" = i386 ; then + # Avoid executing cc on OS X 10.9, as it ships with a stub + # that puts up a graphical alert prompting to install + # developer tools. Any system running Mac OS X 10.7 or + # later (Darwin 11 and later) is required to have a 64-bit + # processor. This is not true of the ARM version of Darwin + # that Apple uses in portable devices. + UNAME_PROCESSOR=x86_64 + fi + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; + NSE-*:NONSTOP_KERNEL:*:*) + echo nse-tandem-nsk${UNAME_RELEASE} + exit ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit ;; + *:*VMS:*:*) + UNAME_MACHINE=`(uname -p) 2>/dev/null` + case "${UNAME_MACHINE}" in + A*) echo alpha-dec-vms ; exit ;; + I*) echo ia64-dec-vms ; exit ;; + V*) echo vax-dec-vms ; exit ;; + esac ;; + *:XENIX:*:SysV) + echo i386-pc-xenix + exit ;; + i*86:skyos:*:*) + echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' + exit ;; + i*86:rdos:*:*) + echo ${UNAME_MACHINE}-pc-rdos + exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; +esac + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/microbenchmarks/ior/config/config.sub b/microbenchmarks/ior/config/config.sub new file mode 100755 index 00000000..7ffe3737 --- /dev/null +++ b/microbenchmarks/ior/config/config.sub @@ -0,0 +1,1807 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright 1992-2014 Free Software Foundation, Inc. + +timestamp='2014-12-03' + +# This file 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 3 of the License, 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 . +# +# 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 Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). + + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright 1992-2014 Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit ;; + --version | -v ) + echo "$version" ; exit ;; + --help | --h* | -h ) + echo "$usage"; exit ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit ;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ + storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis | -knuth | -cray | -microblaze*) + os= + basic_machine=$1 + ;; + -bluegene*) + os=-cnk + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco6) + os=-sco5v6 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco5v6*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | aarch64 | aarch64_be \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ + | bfin \ + | c4x | c8051 | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | epiphany \ + | fido | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | k1om \ + | le32 | le64 \ + | lm32 \ + | m32c | m32r | m32rle | m68000 | m68k | m88k \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64octeon | mips64octeonel \ + | mips64orion | mips64orionel \ + | mips64r5900 | mips64r5900el \ + | mips64vr | mips64vrel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mips64vr5900 | mips64vr5900el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa32r6 | mipsisa32r6el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64r6 | mipsisa64r6el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | moxie \ + | mt \ + | msp430 \ + | nds32 | nds32le | nds32be \ + | nios | nios2 | nios2eb | nios2el \ + | ns16k | ns32k \ + | open8 | or1k | or1knd | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ + | pyramid \ + | riscv32 | riscv64 \ + | rl78 | rx \ + | score \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ + | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ + | visium \ + | we32k \ + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) + basic_machine=$basic_machine-unknown + ;; + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + leon|leon[3-9]) + basic_machine=sparc-$basic_machine + ;; + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + ms1) + basic_machine=mt-unknown + ;; + + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | aarch64-* | aarch64_be-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* | avr32-* \ + | be32-* | be64-* \ + | bfin-* | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | k1om-* \ + | le32-* | le64-* \ + | lm32-* \ + | m32c-* | m32r-* | m32rle-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64octeon-* | mips64octeonel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64r5900-* | mips64r5900el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mips64vr5900-* | mips64vr5900el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa32r6-* | mipsisa32r6el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64r6-* | mipsisa64r6el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ + | mipstx39-* | mipstx39el-* \ + | mmix-* \ + | mt-* \ + | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ + | or1k*-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ + | pyramid-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ + | sparclite-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile*-* \ + | tron-* \ + | ubicom32-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ + | visium-* \ + | we32k-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ + | xstormy16-* | xtensa*-* \ + | ymp-* \ + | z8k-* | z80-*) + ;; + # Recognize the basic CPU types without company name, with glob match. + xtensa*) + basic_machine=$basic_machine-unknown + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + abacus) + basic_machine=abacus-unknown + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aros) + basic_machine=i386-pc + os=-aros + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + blackfin) + basic_machine=bfin-unknown + os=-linux + ;; + blackfin-*) + basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + craynv) + basic_machine=craynv-cray + os=-unicosmp + ;; + cr16 | cr16-*) + basic_machine=cr16-unknown + os=-elf + ;; + crds | unos) + basic_machine=m68k-crds + ;; + crisv32 | crisv32-* | etraxfs*) + basic_machine=crisv32-axis + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + crx) + basic_machine=crx-unknown + os=-elf + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dicos) + basic_machine=i686-pc + os=-dicos + ;; + djgpp) + basic_machine=i586-pc + os=-msdosdjgpp + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + leon-*|leon[3-9]-*) + basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` + ;; + m68knommu) + basic_machine=m68k-unknown + os=-linux + ;; + m68knommu-*) + basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + microblaze*) + basic_machine=microblaze-xilinx + ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; + mingw32) + basic_machine=i686-pc + os=-mingw32 + ;; + mingw32ce) + basic_machine=arm-unknown + os=-mingw32ce + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + moxiebox) + basic_machine=moxie-unknown + os=-moxiebox + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + ms1-*) + basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` + ;; + msys) + basic_machine=i686-pc + os=-msys + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + openrisc | openrisc-*) + basic_machine=or32-unknown + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + parisc) + basic_machine=hppa-unknown + os=-linux + ;; + parisc-*) + basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` + os=-linux + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pc98) + basic_machine=i386-pc + ;; + pc98-*) + basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc | ppcbe) basic_machine=powerpc-unknown + ;; + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) + basic_machine=i386-pc + os=-rdos + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sde) + basic_machine=mipsisa32-sde + os=-elf + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh5el) + basic_machine=sh5le-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tile*) + basic_machine=$basic_machine-unknown + os=-linux-gnu + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xbox) + basic_machine=i686-pc + os=-mingw32 + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + mmix) + basic_machine=mmix-knuth + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* | -plan9* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* | -aros* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ + | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ + | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* | -cegcc* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ + | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -zvmoe) + os=-zvmoe + ;; + -dicos*) + os=-dicos + ;; + -nacl*) + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + score-*) + os=-elf + ;; + spu-*) + os=-elf + ;; + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + c8051-*) + os=-elf + ;; + hexagon-*) + os=-elf + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + ;; + m68*-cisco) + os=-aout + ;; + mep-*) + os=-elf + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-haiku) + os=-haiku + ;; + *-ibm) + os=-aix + ;; + *-knuth) + os=-mmixware + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -cnk*|-aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/microbenchmarks/ior/config/depcomp b/microbenchmarks/ior/config/depcomp new file mode 100755 index 00000000..fc98710e --- /dev/null +++ b/microbenchmarks/ior/config/depcomp @@ -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 . + +# 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 . + +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 . +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: diff --git a/microbenchmarks/ior/config/install-sh b/microbenchmarks/ior/config/install-sh new file mode 100755 index 00000000..0b0fdcbb --- /dev/null +++ b/microbenchmarks/ior/config/install-sh @@ -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: diff --git a/microbenchmarks/ior/config/missing b/microbenchmarks/ior/config/missing new file mode 100755 index 00000000..f62bbae3 --- /dev/null +++ b/microbenchmarks/ior/config/missing @@ -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 , 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 . + +# 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 ." + 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: diff --git a/microbenchmarks/ior/configure b/microbenchmarks/ior/configure new file mode 100755 index 00000000..cf94d0e9 --- /dev/null +++ b/microbenchmarks/ior/configure @@ -0,0 +1,6813 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.69. +# +# +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : + +else + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null; then : + as_have_required=yes +else + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : + +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir/$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : + CONFIG_SHELL=$as_shell as_have_required=yes + if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : + break 2 +fi +fi + done;; + esac + as_found=false +done +$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi; } +IFS=$as_save_IFS + + + if test "x$CONFIG_SHELL" != x; then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno; then : + $as_echo "$0: This script requires a shell more modern than all" + $as_echo "$0: the shells that I found on your system." + if test x${ZSH_VERSION+set} = xset ; then + $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" + $as_echo "$0: be upgraded to zsh 4.3.4 or later." + else + $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, +$0: including any error possibly output before this +$0: message. Then install a modern shell, or manually run +$0: the script under such a shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +test -n "$DJDIR" || exec 7<&0 &1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME= +PACKAGE_TARNAME= +PACKAGE_VERSION= +PACKAGE_STRING= +PACKAGE_BUGREPORT= +PACKAGE_URL= + +ac_unique_file="src/ior.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_STRING_H +# if !defined STDC_HEADERS && defined HAVE_MEMORY_H +# include +# endif +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_subst_vars='am__EXEEXT_FALSE +am__EXEEXT_TRUE +LTLIBOBJS +LIBOBJS +USE_CAPS_FALSE +USE_CAPS_TRUE +OPENMP_CFLAGS +USE_NCMPI_AIORI_FALSE +USE_NCMPI_AIORI_TRUE +USE_HDF5_AIORI_FALSE +USE_HDF5_AIORI_TRUE +USE_MPIIO_AIORI_FALSE +USE_MPIIO_AIORI_TRUE +USE_POSIX_AIORI_FALSE +USE_POSIX_AIORI_TRUE +EGREP +GREP +CPP +am__fastdepCC_FALSE +am__fastdepCC_TRUE +CCDEPMODE +am__nodep +AMDEPBACKSLASH +AMDEP_FALSE +AMDEP_TRUE +am__quote +am__include +DEPDIR +OBJEXT +EXEEXT +CPPFLAGS +LDFLAGS +CFLAGS +ac_ct_CC +CC +MPICC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE +AM_BACKSLASH +AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V +am__untar +am__tar +AMTAR +am__leading_dot +SET_MAKE +AWK +mkdir_p +MKDIR_P +INSTALL_STRIP_PROGRAM +STRIP +install_sh +MAKEINFO +AUTOHEADER +AUTOMAKE +AUTOCONF +ACLOCAL +VERSION +PACKAGE +CYGPATH_W +am__isrc +INSTALL_DATA +INSTALL_SCRIPT +INSTALL_PROGRAM +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +META_LT_AGE +META_LT_REVISION +META_LT_CURRENT +META_AUTHOR +META_DATE +META_ALIAS +META_RELEASE +META_VERSION +META_NAME +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_silent_rules +enable_maintainer_mode +enable_dependency_tracking +enable_largefile +with_lustre +with_posix +with_mpiio +with_hdf5 +with_ncmpi +enable_openmp +enable_caps +' + ac_precious_vars='build_alias +host_alias +target_alias +MPICC +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +CPP' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' +docdir='${datarootdir}/doc/${PACKAGE}' +infodir='${datarootdir}/info' +htmldir='${docdir}' +dvidir='${docdir}' +pdfdir='${docdir}' +psdir='${docdir}' +libdir='${exec_prefix}/lib' +localedir='${datarootdir}/locale' +mandir='${datarootdir}/man' + +ac_prev= +ac_dashdash= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval $ac_prev=\$ac_option + ac_prev= + continue + fi + + case $ac_option in + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_dashdash$ac_option in + --) + ac_dashdash=yes ;; + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=*) + datadir=$ac_optarg ;; + + -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ + | --dataroo | --dataro | --datar) + ac_prev=datarootdir ;; + -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ + | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) + datarootdir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=no ;; + + -docdir | --docdir | --docdi | --doc | --do) + ac_prev=docdir ;; + -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) + docdir=$ac_optarg ;; + + -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) + ac_prev=dvidir ;; + -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) + dvidir=$ac_optarg ;; + + -enable-* | --enable-*) + ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid feature name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"enable_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval enable_$ac_useropt=\$ac_optarg ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) + ac_prev=htmldir ;; + -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ + | --ht=*) + htmldir=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localedir | --localedir | --localedi | --localed | --locale) + ac_prev=localedir ;; + -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) + localedir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst | --locals) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) + ac_prev=pdfdir ;; + -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) + pdfdir=$ac_optarg ;; + + -psdir | --psdir | --psdi | --psd | --ps) + ac_prev=psdir ;; + -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) + psdir=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=\$ac_optarg ;; + + -without-* | --without-*) + ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && + as_fn_error $? "invalid package name: $ac_useropt" + ac_useropt_orig=$ac_useropt + ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` + case $ac_user_opts in + *" +"with_$ac_useropt" +"*) ;; + *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" + ac_unrecognized_sep=', ';; + esac + eval with_$ac_useropt=no ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + case $ac_envvar in #( + '' | [0-9]* | *[!_$as_cr_alnum]* ) + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; + esac + eval $ac_envvar=\$ac_optarg + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + as_fn_error $? "missing argument to $ac_option" +fi + +if test -n "$ac_unrecognized_opts"; then + case $enable_option_checking in + no) ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; + *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; + esac +fi + +# Check all directory arguments for consistency. +for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ + datadir sysconfdir sharedstatedir localstatedir includedir \ + oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ + libdir localedir mandir +do + eval ac_val=\$$ac_var + # Remove trailing slashes. + case $ac_val in + */ ) + ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` + eval $ac_var=\$ac_val;; + esac + # Be sure to have absolute directory names. + case $ac_val in + [\\/$]* | ?:[\\/]* ) continue;; + NONE | '' ) case $ac_var in *prefix ) continue;; esac;; + esac + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +ac_pwd=`pwd` && test -n "$ac_pwd" && +ac_ls_di=`ls -di .` && +ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || + as_fn_error $? "working directory cannot be determined" +test "X$ac_ls_di" = "X$ac_pwd_ls_di" || + as_fn_error $? "pwd does not report name of working directory" + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then the parent directory. + ac_confdir=`$as_dirname -- "$as_myself" || +$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_myself" : 'X\(//\)[^/]' \| \ + X"$as_myself" : 'X\(//\)$' \| \ + X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_myself" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r "$srcdir/$ac_unique_file"; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r "$srcdir/$ac_unique_file"; then + test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" +fi +ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" +ac_abs_confdir=`( + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" + pwd)` +# When building in place, set srcdir=. +if test "$ac_abs_confdir" = "$ac_pwd"; then + srcdir=. +fi +# Remove unnecessary trailing slashes from srcdir. +# Double slashes in file names in object file debugging info +# mess up M-x gdb in Emacs. +case $srcdir in +*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; +esac +for ac_var in $ac_precious_vars; do + eval ac_env_${ac_var}_set=\${${ac_var}+set} + eval ac_env_${ac_var}_value=\$${ac_var} + eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} + eval ac_cv_env_${ac_var}_value=\$${ac_var} +done + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures this package to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking ...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] + --datadir=DIR read-only architecture-independent data [DATAROOTDIR] + --infodir=DIR info documentation [DATAROOTDIR/info] + --localedir=DIR locale-dependent data [DATAROOTDIR/locale] + --mandir=DIR man documentation [DATAROOTDIR/man] + --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] + --htmldir=DIR html documentation [DOCDIR] + --dvidir=DIR dvi documentation [DOCDIR] + --pdfdir=DIR pdf documentation [DOCDIR] + --psdir=DIR ps documentation [DOCDIR] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + + cat <<\_ACEOF + +Optional Features: + --disable-option-checking ignore unrecognized --enable/--with options + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --enable-maintainer-mode + enable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build + --disable-largefile omit support for large files + --disable-openmp do not use OpenMP + --enable-caps build "IOR" binary (name is in all-caps) + [default=no] + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-lustre support configurable Lustre striping values + [default=check] + --with-posix support IO with POSIX backend [default=yes] + --with-mpiio support IO with MPI-IO backend [default=yes] + --with-hdf5 support IO with HDF5 backend [default=no] + --with-ncmpi support IO with NCMPI backend [default=no] + +Some influential environment variables: + MPICC MPI C compiler command + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + LIBS libraries to pass to the linker, e.g. -l + CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if + you have headers in a nonstandard directory + CPP C preprocessor + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to the package provider. +_ACEOF +ac_status=$? +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d "$ac_dir" || + { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || + continue + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + cd "$ac_dir" || { ac_status=$?; continue; } + # Check for guested configure. + if test -f "$ac_srcdir/configure.gnu"; then + echo && + $SHELL "$ac_srcdir/configure.gnu" --help=recursive + elif test -f "$ac_srcdir/configure"; then + echo && + $SHELL "$ac_srcdir/configure" --help=recursive + else + $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi || ac_status=$? + cd "$ac_pwd" || { ac_status=$?; break; } + done +fi + +test -n "$ac_init_help" && exit $ac_status +if $ac_init_version; then + cat <<\_ACEOF +configure +generated by GNU Autoconf 2.69 + +Copyright (C) 2012 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. +_ACEOF + exit +fi + +## ------------------------ ## +## Autoconf initialization. ## +## ------------------------ ## + +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest.$ac_objext; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_compile + +# ac_fn_c_try_link LINENO +# ----------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_link () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + rm -f conftest.$ac_objext conftest$ac_exeext + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || + test ! -s conftest.err + } && test -s conftest$ac_exeext && { + test "$cross_compiling" = yes || + test -x conftest$ac_exeext + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information + # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would + # interfere with the next link command; also delete a directory that is + # left behind by Apple's compiler. We do this before executing the actions. + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_link + +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + grep -v '^ *+' conftest.err >conftest.er1 + cat conftest.er1 >&5 + mv -f conftest.er1 conftest.err + fi + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test ! -s conftest.err + }; then : + ac_retval=0 +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=1 +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_cpp + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel + +# ac_fn_c_try_run LINENO +# ---------------------- +# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes +# that executables *can* be run. +ac_fn_c_try_run () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + ac_retval=0 +else + $as_echo "$as_me: program exited with status $ac_status" >&5 + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_retval=$ac_status +fi + rm -rf conftest.dSYM conftest_ipa8_conftest.oo + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + as_fn_set_status $ac_retval + +} # ac_fn_c_try_run + +# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists and can be compiled using the include files in +# INCLUDES, setting the cache variable VAR accordingly. +ac_fn_c_check_header_compile () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_compile + +# ac_fn_c_check_type LINENO TYPE VAR INCLUDES +# ------------------------------------------- +# Tests whether TYPE exists after having included INCLUDES, setting cache +# variable VAR accordingly. +ac_fn_c_check_type () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=no" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof ($2)) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +int +main () +{ +if (sizeof (($2))) + return 0; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + eval "$3=yes" +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_type + +# ac_fn_c_check_func LINENO FUNC VAR +# ---------------------------------- +# Tests whether FUNC exists, setting the cache variable VAR accordingly +ac_fn_c_check_func () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +/* Define $2 to an innocuous variant, in case declares $2. + For example, HP-UX 11i declares gettimeofday. */ +#define $2 innocuous_$2 + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $2 (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $2 + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char $2 (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined __stub_$2 || defined __stub___$2 +choke me +#endif + +int +main () +{ +return $2 (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + eval "$3=yes" +else + eval "$3=no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_func +cat >config.log <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by $as_me, which was +generated by GNU Autoconf 2.69. Invocation command line was + + $ $0 $@ + +_ACEOF +exec 5>>config.log +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + $as_echo "PATH: $as_dir" + done +IFS=$as_save_IFS + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *\'*) + ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; + 2) + as_fn_append ac_configure_args1 " '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + as_fn_append ac_configure_args " '$ac_arg'" + ;; + esac + done +done +{ ac_configure_args0=; unset ac_configure_args0;} +{ ac_configure_args1=; unset ac_configure_args1;} + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Use '\'' to represent an apostrophe within the trap. +# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + $as_echo "## ---------------- ## +## Cache variables. ## +## ---------------- ##" + echo + # The following way of writing the cache mishandles newlines in values, +( + for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + (set) 2>&1 | + case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + sed -n \ + "s/'\''/'\''\\\\'\'''\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" + ;; #( + *) + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) + echo + + $as_echo "## ----------------- ## +## Output variables. ## +## ----------------- ##" + echo + for ac_var in $ac_subst_vars + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + + if test -n "$ac_subst_files"; then + $as_echo "## ------------------- ## +## File substitutions. ## +## ------------------- ##" + echo + for ac_var in $ac_subst_files + do + eval ac_val=\$$ac_var + case $ac_val in + *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; + esac + $as_echo "$ac_var='\''$ac_val'\''" + done | sort + echo + fi + + if test -s confdefs.h; then + $as_echo "## ----------- ## +## confdefs.h. ## +## ----------- ##" + echo + cat confdefs.h + echo + fi + test "$ac_signal" != 0 && + $as_echo "$as_me: caught signal $ac_signal" + $as_echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core core.conftest.* && + rm -f -r conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status +' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -f -r conftest* confdefs.h + +$as_echo "/* confdefs.h */" > confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_URL "$PACKAGE_URL" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer an explicitly selected file to automatically selected ones. +ac_site_file1=NONE +ac_site_file2=NONE +if test -n "$CONFIG_SITE"; then + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac +elif test "x$prefix" != xNONE; then + ac_site_file1=$prefix/share/config.site + ac_site_file2=$prefix/etc/config.site +else + ac_site_file1=$ac_default_prefix/share/config.site + ac_site_file2=$ac_default_prefix/etc/config.site +fi +for ac_site_file in "$ac_site_file1" "$ac_site_file2" +do + test "x$ac_site_file" = xNONE && continue + if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 +$as_echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special files + # actually), so we avoid doing that. DJGPP emulates it as a regular file. + if test /dev/null != "$cache_file" && test -f "$cache_file"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 +$as_echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . "$cache_file";; + *) . "./$cache_file";; + esac + fi +else + { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 +$as_echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in $ac_precious_vars; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val=\$ac_cv_env_${ac_var}_value + eval ac_new_val=\$ac_env_${ac_var}_value + case $ac_old_set,$ac_new_set in + set,) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 +$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + # differences in whitespace do not lead to failure. + ac_old_val_w=`echo x $ac_old_val` + ac_new_val_w=`echo x $ac_new_val` + if test "$ac_old_val_w" != "$ac_new_val_w"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 +$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + ac_cache_corrupted=: + else + { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 +$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} + eval $ac_var=\$ac_old_val + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 +$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 +$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) as_fn_append ac_configure_args " '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 +$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 +fi +## -------------------- ## +## Main body of script. ## +## -------------------- ## + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking metadata" >&5 +$as_echo_n "checking metadata... " >&6; } + + META="$srcdir/META" + _x_ac_meta_got_file=no + if test -f "$META"; then + _x_ac_meta_got_file=yes + + META_NAME=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + '(?:NAME|PROJECT|PACKAGE)' $META`; + if test -n "$META_NAME"; then + +cat >>confdefs.h <<_ACEOF +#define META_NAME "$META_NAME" +_ACEOF + + + fi + + META_VERSION=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'VERSION' $META`; + if test -n "$META_VERSION"; then + +cat >>confdefs.h <<_ACEOF +#define META_VERSION "$META_VERSION" +_ACEOF + + + fi + + META_RELEASE=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'RELEASE' $META`; + if test -n "$META_RELEASE"; then + +cat >>confdefs.h <<_ACEOF +#define META_RELEASE "$META_RELEASE" +_ACEOF + + + fi + + if test -n "$META_NAME" -a -n "$META_VERSION"; then + META_ALIAS="$META_NAME-$META_VERSION" + test -n "$META_RELEASE" -a "$META_RELEASE" != "1" \ + && META_ALIAS="$META_ALIAS-$META_RELEASE" + +cat >>confdefs.h <<_ACEOF +#define META_ALIAS "$META_ALIAS" +_ACEOF + + + fi + + META_DATE=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'DATE' $META`; + if test -n "$META_DATE"; then + +cat >>confdefs.h <<_ACEOF +#define META_DATE "$META_DATE" +_ACEOF + + + fi + + META_AUTHOR=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'AUTHOR' $META`; + if test -n "$META_AUTHOR"; then + +cat >>confdefs.h <<_ACEOF +#define META_AUTHOR "$META_AUTHOR" +_ACEOF + + + fi + + + META_LT_CURRENT=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'LT_CURRENT' $META`; + META_LT_REVISION=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'LT_REVISION' $META`; + META_LT_AGE=`perl -n\ + -e "BEGIN { \\$key=shift @ARGV; }"\ + -e "next unless s/^\s*\\$key[:=]//i;"\ + -e "s/^((?:[^'\"#]*(?:(['\"])[^\2]*\2)*)*)#.*/\\$1/;"\ + -e "s/^\s+//;"\ + -e "s/\s+$//;"\ + -e "s/^(['\"])(.*)\1/\\$2/;"\ + -e "\\$val=\\$_;"\ + -e "END { print \\$val if defined \\$val; }"\ + 'LT_AGE' $META`; + if test -n "$META_LT_CURRENT" \ + -o -n "$META_LT_REVISION" \ + -o -n "$META_LT_AGE"; then + test -n "$META_LT_CURRENT" || META_LT_CURRENT="0" + test -n "$META_LT_REVISION" || META_LT_REVISION="0" + test -n "$META_LT_AGE" || META_LT_AGE="0" + +cat >>confdefs.h <<_ACEOF +#define META_LT_CURRENT "$META_LT_CURRENT" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define META_LT_REVISION "$META_LT_REVISION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define META_LT_AGE "$META_LT_AGE" +_ACEOF + + + + + fi + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_x_ac_meta_got_file" >&5 +$as_echo "$_x_ac_meta_got_file" >&6; } + + +ac_aux_dir= +for ac_dir in config "$srcdir"/config; do + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 +fi + +# These three variables are undocumented and unsupported, +# and are intended to be withdrawn in a future Autoconf release. +# They can cause serious problems if a builder's source tree is in a directory +# whose full name contains unusual characters. +ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. +ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. +ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. + + + +ac_config_headers="$ac_config_headers src/config.h" + + +# Make sure we can run config.sub. +$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 +$as_echo_n "checking build system type... " >&6; } +if ${ac_cv_build+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_build_alias=$build_alias +test "x$ac_build_alias" = x && + ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` +test "x$ac_build_alias" = x && + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 +ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 +$as_echo "$ac_cv_build" >&6; } +case $ac_cv_build in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; +esac +build=$ac_cv_build +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_build +shift +build_cpu=$1 +build_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +build_os=$* +IFS=$ac_save_IFS +case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 +$as_echo_n "checking host system type... " >&6; } +if ${ac_cv_host+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test "x$host_alias" = x; then + ac_cv_host=$ac_cv_build +else + ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 +$as_echo "$ac_cv_host" >&6; } +case $ac_cv_host in +*-*-*) ;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; +esac +host=$ac_cv_host +ac_save_IFS=$IFS; IFS='-' +set x $ac_cv_host +shift +host_cpu=$1 +host_vendor=$2 +shift; shift +# Remember, the first character of IFS is used to create $*, +# except with old shells: +host_os=$* +IFS=$ac_save_IFS +case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac + + + +# Automake support +am__api_version='1.15' + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +# Reject install programs that cannot install multiple files. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 +$as_echo_n "checking for a BSD-compatible install... " >&6; } +if test -z "$INSTALL"; then +if ${ac_cv_path_install+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in #(( + ./ | .// | /[cC]/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + rm -rf conftest.one conftest.two conftest.dir + echo one > conftest.one + echo two > conftest.two + mkdir conftest.dir + if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && + test -s conftest.one && test -s conftest.two && + test -s conftest.dir/conftest.one && + test -s conftest.dir/conftest.two + then + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + fi + done + done + ;; +esac + + done +IFS=$as_save_IFS + +rm -rf conftest.one conftest.two conftest.dir + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. Don't cache a + # value for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + INSTALL=$ac_install_sh + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 +$as_echo "$INSTALL" >&6; } + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 +$as_echo_n "checking whether build environment is sane... " >&6; } +# Reject unsafe characters in $srcdir or the absolute working directory +# name. Accept space and tab only in the latter. +am_lf=' +' +case `pwd` in + *[\\\"\#\$\&\'\`$am_lf]*) + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; +esac +case $srcdir in + *[\\\"\#\$\&\'\`$am_lf\ \ ]*) + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; +esac + +# Do 'set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done + test "$2" = conftest.file + ) +then + # Ok. + : +else + as_fn_error $? "newly created file is older than distributed files! +Check your system clock" "$LINENO" 5 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + +test "$program_prefix" != NONE && + program_transform_name="s&^&$program_prefix&;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s&\$&$program_suffix&;$program_transform_name" +# Double any \ or $. +# By default was `s,x,x', remove it if useless. +ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' +program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` + +# Expand $ac_aux_dir to an absolute path. +am_aux_dir=`cd "$ac_aux_dir" && pwd` + +if test x"${MISSING+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; + *) + MISSING="\${SHELL} $am_aux_dir/missing" ;; + esac +fi +# Use eval to expand $SHELL +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " +else + am_missing_run= + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} +fi + +if test x"${install_sh+set}" != xset; then + case $am_aux_dir in + *\ * | *\ *) + install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; + *) + install_sh="\${SHELL} $am_aux_dir/install-sh" + esac +fi + +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the 'STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 +$as_echo "$STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 +$as_echo "$ac_ct_STRIP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_STRIP" = x; then + STRIP=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + STRIP=$ac_ct_STRIP + fi +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 +$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } +if test -z "$MKDIR_P"; then + if ${ac_cv_path_mkdir+:} false; then : + $as_echo_n "(cached) " >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in mkdir gmkdir; do + for ac_exec_ext in '' $ac_executable_extensions; do + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue + case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( + 'mkdir (GNU coreutils) '* | \ + 'mkdir (coreutils) '* | \ + 'mkdir (fileutils) '4.1*) + ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext + break 3;; + esac + done + done + done +IFS=$as_save_IFS + +fi + + test -d ./--version && rmdir ./--version + if test "${ac_cv_path_mkdir+set}" = set; then + MKDIR_P="$ac_cv_path_mkdir -p" + else + # As a last resort, use the slow shell script. Don't cache a + # value for MKDIR_P within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the value is a relative name. + MKDIR_P="$ac_install_sh -d" + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 +$as_echo "$MKDIR_P" >&6; } + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AWK+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 +$as_echo "$AWK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$AWK" && break +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } +set x ${MAKE-make} +ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat >conftest.make <<\_ACEOF +SHELL = /bin/sh +all: + @echo '@@@%%%=$(MAKE)=@@@%%%' +_ACEOF +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. +case `${MAKE-make} -f conftest.make 2>/dev/null` in + *@@@%%%=?*=@@@%%%*) + eval ac_cv_prog_make_${ac_make}_set=yes;; + *) + eval ac_cv_prog_make_${ac_make}_set=no;; +esac +rm -f conftest.make +fi +if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + SET_MAKE= +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + +if test "`cd $srcdir && pwd`" != "`pwd`"; then + # Use -I$(srcdir) only when $(srcdir) != ., so that make's output + # is not polluted with repeated "-I." + am__isrc=' -I$(srcdir)' + # test to see if srcdir already configured + if test -f $srcdir/config.status; then + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + fi +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + + PACKAGE=$META_NAME + VERSION=$META_VERSION + + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + +# We need awk for the "check" target (and possibly the TAP driver). The +# system "awk" is bad on some platforms. +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' + + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + + + + + + +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 +$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } + # Check whether --enable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then : + enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 +$as_echo "$USE_MAINTAINER_MODE" >&6; } + if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +# Necessary for OpenMP +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Checks for programs. +DEPDIR="${am__leading_dot}deps" + +ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo this is the am__doit target +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 +$as_echo_n "checking for style of include used by $am_make... " >&6; } +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# Ignore all kinds of additional output from 'make'. +case `$am_make -s -f confmf 2> /dev/null` in #( +*the\ am__doit\ target*) + am__include=include + am__quote= + _am_result=GNU + ;; +esac +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + case `$am_make -s -f confmf 2> /dev/null` in #( + *the\ am__doit\ target*) + am__include=.include + am__quote="\"" + _am_result=BSD + ;; + esac +fi + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 +$as_echo "$_am_result" >&6; } +rm -f confinc confmf + +# Check whether --enable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then : + enableval=$enable_dependency_tracking; +fi + +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' + am__nodep='_no' +fi + if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + + + _ax_prog_cc_mpi_mpi_wanted=yes + if test x"$_ax_prog_cc_mpi_mpi_wanted" = xyes; then + if test -z "$CC" && test -n "$MPICC"; then + CC="$MPICC" + else + if test -n "$ac_tool_prefix"; then + for ac_prog in mpicc mpixlc_r mpixlc hcc mpxlc_r mpxlc sxmpicc mpifcc mpgcc mpcc cmpicc cc gcc + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in mpicc mpixlc_r mpixlc hcc mpxlc_r mpxlc sxmpicc mpifcc mpgcc mpcc cmpicc cc gcc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + + fi + fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + fi +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl.exe + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 +$as_echo "$CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl.exe +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 +$as_echo "$ac_ct_CC" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$ac_ct_CC" && break +done + + if test "x$ac_ct_CC" = x; then + CC="" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + CC=$ac_ct_CC + fi +fi + +fi + + +test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } + +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } +done + +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 +$as_echo_n "checking whether the C compiler works... " >&6; } +ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` + +# The possible output files: +ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" + +ac_rmfiles= +for ac_file in $ac_files +do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + * ) ac_rmfiles="$ac_rmfiles $ac_file";; + esac +done +rm -f $ac_rmfiles + +if { { ac_try="$ac_link_default" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link_default") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. +# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' +# in a Makefile. We should not override ac_cv_exeext if it was cached, +# so that the user can short-circuit this test for compilers unknown to +# Autoconf. +for ac_file in $ac_files '' +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; + then :; else + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + fi + # We set ac_cv_exeext here because the later test for it is not + # safe: cross compilers may not add the suffix if given an `-o' + # argument, so we may need to know it at that point already. + # Even if this section looks crufty: it has the advantage of + # actually working. + break;; + * ) + break;; + esac +done +test "$ac_cv_exeext" = no && ac_cv_exeext= + +else + ac_file='' +fi +if test -z "$ac_file"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +$as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 +$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 +$as_echo "$ac_file" >&6; } +ac_exeext=$ac_cv_exeext + +rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 +$as_echo_n "checking for suffix of executables... " >&6; } +if { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + break;; + * ) break;; + esac +done +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest conftest$ac_cv_exeext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 +$as_echo "$ac_cv_exeext" >&6; } + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ +FILE *f = fopen ("conftest.out", "w"); + return ferror (f) || fclose (f) != 0; + + ; + return 0; +} +_ACEOF +ac_clean_files="$ac_clean_files conftest.out" +# Check that the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 +$as_echo_n "checking whether we are cross compiling... " >&6; } +if test "$cross_compiling" != yes; then + { { ac_try="$ac_link" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_link") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if { ac_try='./conftest$ac_cv_exeext' + { { case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details" "$LINENO" 5; } + fi + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 +$as_echo "$cross_compiling" >&6; } + +rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out +ac_clean_files=$ac_clean_files_save +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 +$as_echo_n "checking for suffix of object files... " >&6; } +if ${ac_cv_objext+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { { ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compile") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then : + for ac_file in conftest.o conftest.obj conftest.*; do + test -f "$ac_file" || continue; + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + $as_echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } +fi +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 +$as_echo "$ac_cv_objext" >&6; } +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 +$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } +if ${ac_cv_c_compiler_gnu+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_compiler_gnu=yes +else + ac_compiler_gnu=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 +$as_echo "$ac_cv_c_compiler_gnu" >&6; } +if test $ac_compiler_gnu = yes; then + GCC=yes +else + GCC= +fi +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 +$as_echo_n "checking whether $CC accepts -g... " >&6; } +if ${ac_cv_prog_cc_g+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_save_c_werror_flag=$ac_c_werror_flag + ac_c_werror_flag=yes + ac_cv_prog_cc_g=no + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +else + CFLAGS="" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + +else + ac_c_werror_flag=$ac_save_c_werror_flag + CFLAGS="-g" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_g=yes +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_c_werror_flag=$ac_save_c_werror_flag +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 +$as_echo "$ac_cv_prog_cc_g" >&6; } +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 +$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } +if ${ac_cv_prog_cc_c89+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_prog_cc_c89=no +ac_save_CC=$CC +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +struct stat; +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters + inside strings and character constants. */ +#define FOO(x) 'x' +int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ + -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_prog_cc_c89=$ac_arg +fi +rm -f core conftest.err conftest.$ac_objext + test "x$ac_cv_prog_cc_c89" != "xno" && break +done +rm -f conftest.$ac_ext +CC=$ac_save_CC + +fi +# AC_CACHE_VAL +case "x$ac_cv_prog_cc_c89" in + x) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 +$as_echo "none needed" >&6; } ;; + xno) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 +$as_echo "unsupported" >&6; } ;; + *) + CC="$CC $ac_cv_prog_cc_c89" + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 +$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; +esac +if test "x$ac_cv_prog_cc_c89" != xno; then : + +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +depcc="$CC" am_compiler_list= + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 +$as_echo_n "checking dependency style of $depcc... " >&6; } +if ${am_cv_CC_dependencies_compiler_type+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". + rm -rf conftest.dir + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + am__universal=false + case " $depcc " in #( + *\ -arch\ *\ -arch\ *) am__universal=true ;; + esac + + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + # We check with '-c' and '-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. + am__obj=sub/conftest.${OBJEXT-o} + am__minus_obj="-o $am__obj" + case $depmode in + gcc) + # This depmode causes a compiler race in universal mode. + test "$am__universal" = false || continue + ;; + nosideeffect) + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + msvc7 | msvc7msys | msvisualcpp | msvcmsys) + # This compiler won't grok '-c -o', but also, the minuso test has + # not run yet. These depmodes are late enough in the game, and + # so weak that their functioning should not be impacted. + am__obj=conftest.${OBJEXT-o} + am__minus_obj= + ;; + none) break ;; + esac + if depmode=$depmode \ + source=sub/conftest.c object=$am__obj \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep $am__obj sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # or remarks (even with -Werror). So we grep stderr for any message + # that says an option was ignored or not supported. + # When given -MP, icc 7.0 and 7.1 complain thusly: + # icc: Command line warning: ignoring option '-M'; no argument required + # The diagnosis changed in icc 8.0: + # icc: Command line remark: option '-MP' not supported + if (grep 'ignoring option' conftest.err || + grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + + + + + +# Check for compiler +# Needs to be split off into an extra macro to ensure right expansion +# order. + + +if test x"$_ax_prog_cc_mpi_mpi_wanted" = xno; then : + _ax_prog_cc_mpi_mpi_found=no +else + + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + # test whether MPI_Init is available + # We do not use AC_SEARCH_LIBS here, as it caches its outcome and + # thus disallows corresponding calls in the other AX_PROG_*_MPI + # macros. + for lib in NONE mpi mpich; do + save_LIBS=$LIBS + if test x"$lib" = xNONE; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function MPI_Init" >&5 +$as_echo_n "checking for function MPI_Init... " >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for function MPI_Init in -l$lib" >&5 +$as_echo_n "checking for function MPI_Init in -l$lib... " >&6; } + LIBS="-l$lib $LIBS" + fi + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char MPI_Init (); +int +main () +{ +return MPI_Init (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + _ax_prog_cc_mpi_mpi_found=yes +else + _ax_prog_cc_mpi_mpi_found=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_ax_prog_cc_mpi_mpi_found" >&5 +$as_echo "$_ax_prog_cc_mpi_mpi_found" >&6; } + if test "x$_ax_prog_cc_mpi_mpi_found" = "xyes"; then + break; + fi + LIBS=$save_LIBS + done + + # Check for header + if test x"$_ax_prog_cc_mpi_mpi_found" = xyes; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mpi.h" >&5 +$as_echo_n "checking for mpi.h... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _ax_prog_cc_mpi_mpi_found=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +fi + +# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: +if test x"$_ax_prog_cc_mpi_mpi_found" = xyes; then : + + +$as_echo "#define HAVE_MPI 1" >>confdefs.h + + : + +else + + + : + +fi + + + +# Checks for libraries. + +# Checks for header files. +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 +$as_echo_n "checking how to run the C preprocessor... " >&6; } +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if ${ac_cv_prog_CPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 +$as_echo "$CPP" >&6; } +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 +$as_echo_n "checking for grep that handles long lines and -e... " >&6; } +if ${ac_cv_path_GREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -z "$GREP"; then + ac_path_GREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in grep ggrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_GREP" || continue +# Check for GNU ac_path_GREP and select it if it is found. + # Check for GNU $ac_path_GREP +case `"$ac_path_GREP" --version 2>&1` in +*GNU*) + ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'GREP' >> "conftest.nl" + "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_GREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_GREP="$ac_path_GREP" + ac_path_GREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_GREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_GREP"; then + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_GREP=$GREP +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 +$as_echo "$ac_cv_path_GREP" >&6; } + GREP="$ac_cv_path_GREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 +$as_echo_n "checking for egrep... " >&6; } +if ${ac_cv_path_EGREP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 + then ac_cv_path_EGREP="$GREP -E" + else + if test -z "$EGREP"; then + ac_path_EGREP_found=false + # Loop through the user's path and test for each of PROGNAME-LIST + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_prog in egrep; do + for ac_exec_ext in '' $ac_executable_extensions; do + ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" + as_fn_executable_p "$ac_path_EGREP" || continue +# Check for GNU ac_path_EGREP and select it if it is found. + # Check for GNU $ac_path_EGREP +case `"$ac_path_EGREP" --version 2>&1` in +*GNU*) + ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; +*) + ac_count=0 + $as_echo_n 0123456789 >"conftest.in" + while : + do + cat "conftest.in" "conftest.in" >"conftest.tmp" + mv "conftest.tmp" "conftest.in" + cp "conftest.in" "conftest.nl" + $as_echo 'EGREP' >> "conftest.nl" + "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break + diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break + as_fn_arith $ac_count + 1 && ac_count=$as_val + if test $ac_count -gt ${ac_path_EGREP_max-0}; then + # Best one so far, save it but keep looking for a better one + ac_cv_path_EGREP="$ac_path_EGREP" + ac_path_EGREP_max=$ac_count + fi + # 10*(2^10) chars as input seems more than enough + test $ac_count -gt 10 && break + done + rm -f conftest.in conftest.tmp conftest.nl conftest.out;; +esac + + $ac_path_EGREP_found && break 3 + done + done + done +IFS=$as_save_IFS + if test -z "$ac_cv_path_EGREP"; then + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + fi +else + ac_cv_path_EGREP=$EGREP +fi + + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 +$as_echo "$ac_cv_path_EGREP" >&6; } + EGREP="$ac_cv_path_EGREP" + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 +$as_echo_n "checking for ANSI C header files... " >&6; } +if ${ac_cv_header_stdc+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_header_stdc=yes +else + ac_cv_header_stdc=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then : + +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then : + : +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + return 2; + return 0; +} +_ACEOF +if ac_fn_c_try_run "$LINENO"; then : + +else + ac_cv_header_stdc=no +fi +rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ + conftest.$ac_objext conftest.beam conftest.$ac_ext +fi + +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 +$as_echo "$ac_cv_header_stdc" >&6; } +if test $ac_cv_header_stdc = yes; then + +$as_echo "#define STDC_HEADERS 1" >>confdefs.h + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default +" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +for ac_header in fcntl.h libintl.h stdlib.h string.h strings.h sys/ioctl.h sys/param.h sys/statfs.h sys/statvfs.h sys/time.h unistd.h wchar.h +do : + as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` +ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +# Checks for typedefs, structures, and compiler characteristics. +ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" +if test "x$ac_cv_type_size_t" = xyes; then : + +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned int +_ACEOF + +fi + + +# Checks for library functions. +for ac_func in getpagesize gettimeofday memset mkdir pow putenv realpath regcomp sqrt strcasecmp strchr strerror strncasecmp strstr uname +do : + as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` +ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : + cat >>confdefs.h <<_ACEOF +#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sqrt" >&5 +$as_echo_n "checking for library containing sqrt... " >&6; } +if ${ac_cv_search_sqrt+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_func_search_save_LIBS=$LIBS +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char sqrt (); +int +main () +{ +return sqrt (); + ; + return 0; +} +_ACEOF +for ac_lib in '' m; do + if test -z "$ac_lib"; then + ac_res="none required" + else + ac_res=-l$ac_lib + LIBS="-l$ac_lib $ac_func_search_save_LIBS" + fi + if ac_fn_c_try_link "$LINENO"; then : + ac_cv_search_sqrt=$ac_res +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext + if ${ac_cv_search_sqrt+:} false; then : + break +fi +done +if ${ac_cv_search_sqrt+:} false; then : + +else + ac_cv_search_sqrt=no +fi +rm conftest.$ac_ext +LIBS=$ac_func_search_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sqrt" >&5 +$as_echo "$ac_cv_search_sqrt" >&6; } +ac_res=$ac_cv_search_sqrt +if test "$ac_res" != no; then : + test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + +else + as_fn_error $? "Math library not found" "$LINENO" 5 +fi + + +# Check for system capabilities +# Check whether --enable-largefile was given. +if test "${enable_largefile+set}" = set; then : + enableval=$enable_largefile; +fi + +if test "$enable_largefile" != no; then + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 +$as_echo_n "checking for special C compiler options needed for large files... " >&6; } +if ${ac_cv_sys_largefile_CC+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + if ac_fn_c_try_compile "$LINENO"; then : + break +fi +rm -f core conftest.err conftest.$ac_objext + CC="$CC -n32" + if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_largefile_CC=' -n32'; break +fi +rm -f core conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 +$as_echo "$ac_cv_sys_largefile_CC" >&6; } + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } +if ${ac_cv_sys_file_offset_bits+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_file_offset_bits=64; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_file_offset_bits=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 +$as_echo "$ac_cv_sys_file_offset_bits" >&6; } +case $ac_cv_sys_file_offset_bits in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF +;; +esac +rm -rf conftest* + if test $ac_cv_sys_file_offset_bits = unknown; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 +$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } +if ${ac_cv_sys_large_files+:} false; then : + $as_echo_n "(cached) " >&6 +else + while :; do + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=no; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_cv_sys_large_files=1; break +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cv_sys_large_files=unknown + break +done +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 +$as_echo "$ac_cv_sys_large_files" >&6; } +case $ac_cv_sys_large_files in #( + no | unknown) ;; + *) +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF +;; +esac +rm -rf conftest* + fi + + +fi + + +# Check for lustre availability + +# Check whether --with-lustre was given. +if test "${with_lustre+set}" = set; then : + withval=$with_lustre; +else + with_lustre=check +fi + +if test "x$with_lustre" != xno; then : + + for ac_header in lustre/lustre_user.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "lustre/lustre_user.h" "ac_cv_header_lustre_lustre_user_h" "$ac_includes_default" +if test "x$ac_cv_header_lustre_lustre_user_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LUSTRE_LUSTRE_USER_H 1 +_ACEOF + +else + + if test "x$with_lustre" != xcheck; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "--with-lustre was given, not found +See \`config.log' for more details" "$LINENO" 5; } + fi + +fi + +done + + +fi + +# POSIX IO support + +# Check whether --with-posix was given. +if test "${with_posix+set}" = set; then : + withval=$with_posix; +else + with_posix=yes +fi + + if test x$with_posix = xyes; then + USE_POSIX_AIORI_TRUE= + USE_POSIX_AIORI_FALSE='#' +else + USE_POSIX_AIORI_TRUE='#' + USE_POSIX_AIORI_FALSE= +fi + +if test -z "$USE_POSIX_AIORI_TRUE"; then : + + +$as_echo "#define USE_POSIX_AIORI /**/" >>confdefs.h + + +fi + +# MPIIO support + +# Check whether --with-mpiio was given. +if test "${with_mpiio+set}" = set; then : + withval=$with_mpiio; +else + with_mpiio=yes +fi + + if test x$with_mpiio = xyes; then + USE_MPIIO_AIORI_TRUE= + USE_MPIIO_AIORI_FALSE='#' +else + USE_MPIIO_AIORI_TRUE='#' + USE_MPIIO_AIORI_FALSE= +fi + +if test -z "$USE_MPIIO_AIORI_TRUE"; then : + + +$as_echo "#define USE_MPIIO_AIORI /**/" >>confdefs.h + + +fi + +# HDF5 support + +# Check whether --with-hdf5 was given. +if test "${with_hdf5+set}" = set; then : + withval=$with_hdf5; +else + with_hdf5=no +fi + + if test x$with_hdf5 = xyes; then + USE_HDF5_AIORI_TRUE= + USE_HDF5_AIORI_FALSE='#' +else + USE_HDF5_AIORI_TRUE='#' + USE_HDF5_AIORI_FALSE= +fi + +if test -z "$USE_HDF5_AIORI_TRUE"; then : + + +$as_echo "#define USE_HDF5_AIORI /**/" >>confdefs.h + + +fi + +# NCMPI (Parallel netcdf) support + +# Check whether --with-ncmpi was given. +if test "${with_ncmpi+set}" = set; then : + withval=$with_ncmpi; +else + with_ncmpi=no +fi + + if test x$with_ncmpi = xyes; then + USE_NCMPI_AIORI_TRUE= + USE_NCMPI_AIORI_FALSE='#' +else + USE_NCMPI_AIORI_TRUE='#' + USE_NCMPI_AIORI_FALSE= +fi + +if test -z "$USE_NCMPI_AIORI_TRUE"; then : + + +$as_echo "#define USE_NCMPI_AIORI /**/" >>confdefs.h + + +fi + +# OpenMP for blastMode support (not optional right now) + + OPENMP_CFLAGS= + # Check whether --enable-openmp was given. +if test "${enable_openmp+set}" = set; then : + enableval=$enable_openmp; +fi + + if test "$enable_openmp" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5 +$as_echo_n "checking for $CC option to support OpenMP... " >&6; } +if ${ac_cv_prog_c_openmp+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _OPENMP + choke me +#endif +#include +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_c_openmp='none needed' +else + ac_cv_prog_c_openmp='unsupported' + for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ + -Popenmp --openmp; do + ac_save_CFLAGS=$CFLAGS + CFLAGS="$CFLAGS $ac_option" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#ifndef _OPENMP + choke me +#endif +#include +int main () { return omp_get_num_threads (); } + +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_prog_c_openmp=$ac_option +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + CFLAGS=$ac_save_CFLAGS + if test "$ac_cv_prog_c_openmp" != unsupported; then + break + fi + done +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5 +$as_echo "$ac_cv_prog_c_openmp" >&6; } + case $ac_cv_prog_c_openmp in #( + "none needed" | unsupported) + ;; #( + *) + OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;; + esac + fi + + + +# Enable building "IOR", in all capitals +# Check whether --enable-caps was given. +if test "${enable_caps+set}" = set; then : + enableval=$enable_caps; +else + enable_caps=no +fi + + if test x$enable_caps = xyes; then + USE_CAPS_TRUE= + USE_CAPS_FALSE='#' +else + USE_CAPS_TRUE='#' + USE_CAPS_FALSE= +fi + + + +ac_config_files="$ac_config_files Makefile src/Makefile contrib/Makefile doc/Makefile" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, we kill variables containing newlines. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +( + for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do + eval ac_val=\$$ac_var + case $ac_val in #( + *${as_nl}*) + case $ac_var in #( + *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 +$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; + esac + case $ac_var in #( + _ | IFS | as_nl) ;; #( + BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( + *) { eval $ac_var=; unset $ac_var;} ;; + esac ;; + esac + done + + (set) 2>&1 | + case $as_nl`(ac_space=' '; set) 2>&1` in #( + *${as_nl}ac_space=\ *) + # `set' does not quote correctly, so add quotes: double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \. + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; #( + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" + ;; + esac | + sort +) | + sed ' + /^ac_cv_env_/b end + t clear + :clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + :end' >>confcache +if diff "$cache_file" confcache >/dev/null 2>&1; then :; else + if test -w "$cache_file"; then + if test "x$cache_file" != "x/dev/null"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 +$as_echo "$as_me: updating cache $cache_file" >&6;} + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi + else + { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 +$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +U= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' + ac_i=`$as_echo "$ac_i" | sed "$ac_script"` + # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR + # will be set to the directory where LIBOBJS objects are built. + as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" + as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } + if test -n "$EXEEXT"; then + am__EXEEXT_TRUE= + am__EXEEXT_FALSE='#' +else + am__EXEEXT_TRUE='#' + am__EXEEXT_FALSE= +fi + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + as_fn_error $? "conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_POSIX_AIORI_TRUE}" && test -z "${USE_POSIX_AIORI_FALSE}"; then + as_fn_error $? "conditional \"USE_POSIX_AIORI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_MPIIO_AIORI_TRUE}" && test -z "${USE_MPIIO_AIORI_FALSE}"; then + as_fn_error $? "conditional \"USE_MPIIO_AIORI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_HDF5_AIORI_TRUE}" && test -z "${USE_HDF5_AIORI_FALSE}"; then + as_fn_error $? "conditional \"USE_HDF5_AIORI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_NCMPI_AIORI_TRUE}" && test -z "${USE_NCMPI_AIORI_FALSE}"; then + as_fn_error $? "conditional \"USE_NCMPI_AIORI\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi +if test -z "${USE_CAPS_TRUE}" && test -z "${USE_CAPS_FALSE}"; then + as_fn_error $? "conditional \"USE_CAPS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi + +: "${CONFIG_STATUS=./config.status}" +ac_write_fail=0 +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 +$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} +as_write_fail=0 +cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false + +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + +as_nl=' +' +export as_nl +# Printing a long string crashes Solaris 7 /usr/bin/printf. +as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo +as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo +# Prefer a ksh shell builtin over an external printf program on Solaris, +# but without wasting forks for bash or zsh. +if test -z "$BASH_VERSION$ZSH_VERSION" \ + && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='print -r --' + as_echo_n='print -rn --' +elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then + as_echo='printf %s\n' + as_echo_n='printf %s' +else + if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then + as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' + as_echo_n='/usr/ucb/echo -n' + else + as_echo_body='eval expr "X$1" : "X\\(.*\\)"' + as_echo_n_body='eval + arg=$1; + case $arg in #( + *"$as_nl"*) + expr "X$arg" : "X\\(.*\\)$as_nl"; + arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; + esac; + expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" + ' + export as_echo_n_body + as_echo_n='sh -c $as_echo_n_body as_echo' + fi + export as_echo_body + as_echo='sh -c $as_echo_body as_echo' +fi + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# IFS +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent editors from complaining about space-tab. +# (If _AS_PATH_WALK were called with IFS unset, it would disable word +# splitting by setting IFS to empty value.) +IFS=" "" $as_nl" + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + +# Unset variables that we do not need and which cause bugs (e.g. in +# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" +# suppresses any "Segmentation fault" message there. '((' could +# trigger a bug in pdksh 5.2.14. +for as_var in BASH_ENV ENV MAIL MAILPATH +do eval test x\${$as_var+set} = xset \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# CDPATH. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + $as_echo "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit + +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +exec 6>&1 +## ----------------------------------- ## +## Main body of $CONFIG_STATUS script. ## +## ----------------------------------- ## +_ASEOF +test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# Save the log message, to keep $0 and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. +ac_log=" +This file was extended by $as_me, which was +generated by GNU Autoconf 2.69. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +on `(hostname || uname -n) 2>/dev/null | sed 1q` +" + +_ACEOF + +case $ac_config_files in *" +"*) set x $ac_config_files; shift; ac_config_files=$*;; +esac + +case $ac_config_headers in *" +"*) set x $ac_config_headers; shift; ac_config_headers=$*;; +esac + + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# Files that config.status was made for. +config_files="$ac_config_files" +config_headers="$ac_config_headers" +config_commands="$ac_config_commands" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +ac_cs_usage="\ +\`$as_me' instantiates files and other configuration actions +from templates according to the current configuration. Unless the files +and actions are specified as TAGs, all are instantiated by default. + +Usage: $0 [OPTION]... [TAG]... + + -h, --help print this help, then exit + -V, --version print version number and configuration settings, then exit + --config print configuration, then exit + -q, --quiet, --silent + do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to the package provider." + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" +ac_cs_version="\\ +config.status +configured by $0, generated by GNU Autoconf 2.69, + with options \\"\$ac_cs_config\\" + +Copyright (C) 2012 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." + +ac_pwd='$ac_pwd' +srcdir='$srcdir' +INSTALL='$INSTALL' +MKDIR_P='$MKDIR_P' +AWK='$AWK' +test -n "\$AWK" || AWK=awk +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# The default lists apply if the user does not specify any file. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=?*) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` + ac_shift=: + ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; + *) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + esac + + case $ac_option in + # Handling of the options. + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) + $as_echo "$ac_cs_version"; exit ;; + --config | --confi | --conf | --con | --co | --c ) + $as_echo "$ac_cs_config"; exit ;; + --debug | --debu | --deb | --de | --d | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; + esac + as_fn_append CONFIG_FILES " '$ac_optarg'" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + case $ac_optarg in + *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + as_fn_append CONFIG_HEADERS " '$ac_optarg'" + ac_need_defaults=false;; + --he | --h) + # Conflict between --help and --header + as_fn_error $? "ambiguous option: \`$1' +Try \`$0 --help' for more information.";; + --help | --hel | -h ) + $as_echo "$ac_cs_usage"; exit ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) as_fn_error $? "unrecognized option: \`$1' +Try \`$0 --help' for more information." ;; + + *) as_fn_append ac_config_targets " $1" + ac_need_defaults=false ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +if \$ac_cs_recheck; then + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + shift + \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 + CONFIG_SHELL='$SHELL' + export CONFIG_SHELL + exec "\$@" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX + $as_echo "$ac_log" +} >&5 + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +# +# INIT-COMMANDS +# +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + +# Handling of arguments. +for ac_config_target in $ac_config_targets +do + case $ac_config_target in + "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; + "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; + "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + esac +done + + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason against having it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Hook for its removal unless debugging. +# Note that there is a small window in which the directory will not be cleaned: +# after its creation but before its name has been assigned to `$tmp'. +$debug || +{ + tmp= ac_tmp= + trap 'exit_status=$? + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status +' 0 + trap 'as_fn_exit 1' 1 2 13 15 +} +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && + test -d "$tmp" +} || +{ + tmp=./conf$$-$RANDOM + (umask 077 && mkdir "$tmp") +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp + +# Set up the scripts for CONFIG_FILES section. +# No need to generate them if there are no CONFIG_FILES. +# This happens for instance with `./config.status config.h'. +if test -n "$CONFIG_FILES"; then + + +ac_cr=`echo X | tr X '\015'` +# On cygwin, bash can eat \r inside `` if the user requested igncr. +# But we know of no other shell where ac_cr would be empty at this +# point, so we can use a bashism as a fallback. +if test "x$ac_cr" = x; then + eval ac_cr=\$\'\\r\' +fi +ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` +if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then + ac_cs_awk_cr='\\r' +else + ac_cs_awk_cr=$ac_cr +fi + +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && +_ACEOF + + +{ + echo "cat >conf$$subs.awk <<_ACEOF" && + echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && + echo "_ACEOF" +} >conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` +ac_delim='%!_!# ' +for ac_last_try in false false false false false :; do + . ./conf$$subs.sh || + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + + ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` + if test $ac_delim_n = $ac_delim_num; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done +rm -f conf$$subs.sh + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && +_ACEOF +sed -n ' +h +s/^/S["/; s/!.*/"]=/ +p +g +s/^[^!]*!// +:repl +t repl +s/'"$ac_delim"'$// +t delim +:nl +h +s/\(.\{148\}\)..*/\1/ +t more1 +s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ +p +n +b repl +:more1 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t nl +:delim +h +s/\(.\{148\}\)..*/\1/ +t more2 +s/["\\]/\\&/g; s/^/"/; s/$/"/ +p +b +:more2 +s/["\\]/\\&/g; s/^/"/; s/$/"\\/ +p +g +s/.\{148\}// +t delim +' >$CONFIG_STATUS || ac_write_fail=1 +rm -f conf$$subs.awk +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +_ACAWK +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && + for (key in S) S_is_set[key] = 1 + FS = "" + +} +{ + line = $ 0 + nfields = split(line, field, "@") + substed = 0 + len = length(field[1]) + for (i = 2; i < nfields; i++) { + key = field[i] + keylen = length(key) + if (S_is_set[key]) { + value = S[key] + line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) + len += length(value) + length(field[++i]) + substed = 1 + } else + len += 1 + keylen + } + + print line +} + +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then + sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" +else + cat +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 +_ACEOF + +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// +s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// +s/^[^=]*=[ ]*$// +}' +fi + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +fi # test -n "$CONFIG_FILES" + +# Set up the scripts for CONFIG_HEADERS section. +# No need to generate them if there are no CONFIG_HEADERS. +# This happens for instance with `./config.status Makefile'. +if test -n "$CONFIG_HEADERS"; then +cat >"$ac_tmp/defines.awk" <<\_ACAWK || +BEGIN { +_ACEOF + +# Transform confdefs.h into an awk script `defines.awk', embedded as +# here-document in config.status, that substitutes the proper values into +# config.h.in to produce config.h. + +# Create a delimiter string that does not exist in confdefs.h, to ease +# handling of long lines. +ac_delim='%!_!# ' +for ac_last_try in false false :; do + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then + break + elif $ac_last_try; then + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 + else + ac_delim="$ac_delim!$ac_delim _$ac_delim!! " + fi +done + +# For the awk script, D is an array of macro values keyed by name, +# likewise P contains macro parameters if any. Preserve backslash +# newline sequences. + +ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* +sed -n ' +s/.\{148\}/&'"$ac_delim"'/g +t rset +:rset +s/^[ ]*#[ ]*define[ ][ ]*/ / +t def +d +:def +s/\\$// +t bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3"/p +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p +d +:bsnl +s/["\\]/\\&/g +s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ +D["\1"]=" \3\\\\\\n"\\/p +t cont +s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p +t cont +d +:cont +n +s/.\{148\}/&'"$ac_delim"'/g +t clear +:clear +s/\\$// +t bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/"/p +d +:bsnlc +s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p +b cont +' >$CONFIG_STATUS || ac_write_fail=1 + +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + for (key in D) D_is_set[key] = 1 + FS = "" +} +/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { + line = \$ 0 + split(line, arg, " ") + if (arg[1] == "#") { + defundef = arg[2] + mac1 = arg[3] + } else { + defundef = substr(arg[1], 2) + mac1 = arg[2] + } + split(mac1, mac2, "(") #) + macro = mac2[1] + prefix = substr(line, 1, index(line, defundef) - 1) + if (D_is_set[macro]) { + # Preserve the white space surrounding the "#". + print prefix "define", macro P[macro] D[macro] + next + } else { + # Replace #undef with comments. This is necessary, for example, + # in the case of _POSIX_SOURCE, which is predefined and required + # on some systems where configure will not decide to define it. + if (defundef == "undef") { + print "/*", prefix defundef, macro, "*/" + next + } + } +} +{ print } +_ACAWK +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 +fi # test -n "$CONFIG_HEADERS" + + +eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" +shift +for ac_tag +do + case $ac_tag in + :[FHLC]) ac_mode=$ac_tag; continue;; + esac + case $ac_mode$ac_tag in + :[FHL]*:*);; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; + :[FH]-) ac_tag=-:-;; + :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; + esac + ac_save_IFS=$IFS + IFS=: + set x $ac_tag + IFS=$ac_save_IFS + shift + ac_file=$1 + shift + + case $ac_mode in + :L) ac_source=$1;; + :[FH]) + ac_file_inputs= + for ac_f + do + case $ac_f in + -) ac_f="$ac_tmp/stdin";; + *) # Look for the file first in the build tree, then in the source tree + # (if the path is not absolute). The absolute path cannot be DOS-style, + # because $ac_f cannot contain `:'. + test -f "$ac_f" || + case $ac_f in + [\\/$]*) false;; + *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; + esac || + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; + esac + case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac + as_fn_append ac_file_inputs " '$ac_f'" + done + + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + configure_input='Generated from '` + $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' + `' by configure.' + if test x"$ac_file" != x-; then + configure_input="$ac_file. $configure_input" + { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 +$as_echo "$as_me: creating $ac_file" >&6;} + fi + # Neutralize special characters interpreted by sed in replacement strings. + case $configure_input in #( + *\&* | *\|* | *\\* ) + ac_sed_conf_input=`$as_echo "$configure_input" | + sed 's/[\\\\&|]/\\\\&/g'`;; #( + *) ac_sed_conf_input=$configure_input;; + esac + + case $ac_tag in + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; + esac + ;; + esac + + ac_dir=`$as_dirname -- "$ac_file" || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir="$ac_dir"; as_fn_mkdir_p + ac_builddir=. + +case "$ac_dir" in +.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; +*) + ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` + # A ".." for each directory in $ac_dir_suffix. + ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` + case $ac_top_builddir_sub in + "") ac_top_builddir_sub=. ac_top_build_prefix= ;; + *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; + esac ;; +esac +ac_abs_top_builddir=$ac_pwd +ac_abs_builddir=$ac_pwd$ac_dir_suffix +# for backward compatibility: +ac_top_builddir=$ac_top_build_prefix + +case $srcdir in + .) # We are building in place. + ac_srcdir=. + ac_top_srcdir=$ac_top_builddir_sub + ac_abs_top_srcdir=$ac_pwd ;; + [\\/]* | ?:[\\/]* ) # Absolute name. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir + ac_abs_top_srcdir=$srcdir ;; + *) # Relative name. + ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_build_prefix$srcdir + ac_abs_top_srcdir=$ac_pwd/$srcdir ;; +esac +ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix + + + case $ac_mode in + :F) + # + # CONFIG_FILE + # + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; + esac + ac_MKDIR_P=$MKDIR_P + case $MKDIR_P in + [\\/$]* | ?:[\\/]* ) ;; + */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; + esac +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +# If the template does not know about datarootdir, expand it. +# FIXME: This hack should be removed a few years after 2.60. +ac_datarootdir_hack=; ac_datarootdir_seen= +ac_sed_dataroot=' +/datarootdir/ { + p + q +} +/@datadir@/p +/@docdir@/p +/@infodir@/p +/@localedir@/p +/@mandir@/p' +case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in +*datarootdir*) ac_datarootdir_seen=yes;; +*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 +$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 + ac_datarootdir_hack=' + s&@datadir@&$datadir&g + s&@docdir@&$docdir&g + s&@infodir@&$infodir&g + s&@localedir@&$localedir&g + s&@mandir@&$mandir&g + s&\\\${datarootdir}&$datarootdir&g' ;; +esac +_ACEOF + +# Neutralize VPATH when `$srcdir' = `.'. +# Shell code in configure.ac might set extrasub. +# FIXME: do we really want to maintain this feature? +cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 +ac_sed_extra="$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s|@configure_input@|$ac_sed_conf_input|;t t +s&@top_builddir@&$ac_top_builddir_sub&;t t +s&@top_build_prefix@&$ac_top_build_prefix&;t t +s&@srcdir@&$ac_srcdir&;t t +s&@abs_srcdir@&$ac_abs_srcdir&;t t +s&@top_srcdir@&$ac_top_srcdir&;t t +s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t +s&@builddir@&$ac_builddir&;t t +s&@abs_builddir@&$ac_abs_builddir&;t t +s&@abs_top_builddir@&$ac_abs_top_builddir&;t t +s&@INSTALL@&$ac_INSTALL&;t t +s&@MKDIR_P@&$ac_MKDIR_P&;t t +$ac_datarootdir_hack +" +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + +test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&5 +$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' +which seems to be undefined. Please make sure it is defined" >&2;} + + rm -f "$ac_tmp/stdin" + case $ac_file in + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; + esac \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + ;; + :H) + # + # CONFIG_HEADER + # + if test x"$ac_file" != x-; then + { + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then + { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 +$as_echo "$as_me: $ac_file is unchanged" >&6;} + else + rm -f "$ac_file" + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + fi + else + $as_echo "/* $configure_input */" \ + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 + fi +# Compute "$ac_file"'s index in $config_headers. +_am_arg="$ac_file" +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $_am_arg | $_am_arg:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || +$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$_am_arg" : 'X\(//\)[^/]' \| \ + X"$_am_arg" : 'X\(//\)$' \| \ + X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$_am_arg" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'`/stamp-h$_am_stamp_count + ;; + + :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 +$as_echo "$as_me: executing $ac_file commands" >&6;} + ;; + esac + + + case $ac_file$ac_mode in + "depfiles":C) test x"$AMDEP_TRUE" != x"" || { + # Older Autoconf quotes --file arguments for eval, but not when files + # are listed without --file. Let's play safe and only enable the eval + # if we detect the quoting. + case $CONFIG_FILES in + *\'*) eval set x "$CONFIG_FILES" ;; + *) set x $CONFIG_FILES ;; + esac + shift + for mf + do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named 'Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # Grep'ing the whole file is not good either: AIX grep has a line + # limit of 2048, but all sed's we know have understand at least 4000. + if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then + dirpart=`$as_dirname -- "$mf" || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + else + continue + fi + # Extract the definition of DEPDIR, am__include, and am__quote + # from the Makefile without running 'make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + am__include=`sed -n 's/^am__include = //p' < "$mf"` + test -z "$am__include" && continue + am__quote=`sed -n 's/^am__quote = //p' < "$mf"` + # Find all dependency output files, they are included files with + # $(DEPDIR) in their names. We invoke sed twice because it is the + # simplest approach to changing $(DEPDIR) to its actual value in the + # expansion. + for file in `sed -n " + s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`$as_dirname -- "$file" || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| . 2>/dev/null || +$as_echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + as_dir=$dirpart/$fdir; as_fn_mkdir_p + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done + done +} + ;; + + esac +done # for ac_tag + + +as_fn_exit 0 +_ACEOF +ac_clean_files=$ac_clean_files_save + +test $ac_write_fail = 0 || + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || as_fn_exit 1 +fi +if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 +$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} +fi + diff --git a/microbenchmarks/ior/contrib/Makefile.in b/microbenchmarks/ior/contrib/Makefile.in new file mode 100644 index 00000000..9d115ad0 --- /dev/null +++ b/microbenchmarks/ior/contrib/Makefile.in @@ -0,0 +1,539 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +noinst_PROGRAMS = cbif$(EXEEXT) +subdir = contrib +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/ax_prog_cc_mpi.m4 \ + $(top_srcdir)/config/x_ac_meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +PROGRAMS = $(noinst_PROGRAMS) +am_cbif_OBJECTS = cbif.$(OBJEXT) +cbif_OBJECTS = $(am_cbif_OBJECTS) +cbif_LDADD = $(LDADD) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/src +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(cbif_SOURCES) +DIST_SOURCES = $(cbif_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +MKDIR_P = @MKDIR_P@ +MPICC = @MPICC@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +cbif_SOURCES = cbif.c +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign contrib/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign contrib/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +clean-noinstPROGRAMS: + -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) + +cbif$(EXEEXT): $(cbif_OBJECTS) $(cbif_DEPENDENCIES) $(EXTRA_cbif_DEPENDENCIES) + @rm -f cbif$(EXEEXT) + $(AM_V_CCLD)$(LINK) $(cbif_OBJECTS) $(cbif_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cbif.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-noinstPROGRAMS mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/microbenchmarks/ior/contrib/cbif.c b/microbenchmarks/ior/contrib/cbif.c new file mode 100644 index 00000000..a700a35c --- /dev/null +++ b/microbenchmarks/ior/contrib/cbif.c @@ -0,0 +1,145 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2006, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Purpose: +* Changes a specific Byte offset In File +* +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include +#include + +#ifndef lseek64 /* necessary for TRU64 and Mac OS X */ + #define lseek64 lseek +#endif +#ifndef open64 + #define open64 open +#endif + +#define ERR(MSG) do { \ + fprintf(stdout, "** error **\n"); \ + fprintf(stdout, "ERROR in %s (line %d): %s.\n", \ + __FILE__, __LINE__, MSG); \ + fprintf(stdout, "ERROR: %s\n", strerror(errno)); \ + fprintf(stdout, "** exiting **\n"); \ + fflush(stdout); \ + exit(1); \ +} while (0) + +#define BYTE_BOUNDARY 8 + +int +main(int argc, char **argv) +{ + int i; + int fd; + int value; + unsigned char oldBuffer[BYTE_BOUNDARY]; + unsigned char newBuffer[BYTE_BOUNDARY]; + char *fileName; + long long int offset; + long long int alignedOffset; + long long int bufferIndex; + long long int indexMask = (long long int)(BYTE_BOUNDARY - 1); + long long int alignedMask = (long long int)(BYTE_BOUNDARY - 1) + ^ (long long int)(-1); + + /* check usage */ + if (argc != 3 && argc !=4) { + printf("Usage: %s []\n", argv[0]); + printf("Returns value of byte offset, or modifies to new value.\n"); + exit(1); + } + + /* gather arguments */ + fileName = argv[1]; + sscanf(argv[2], "%lld", &offset); + alignedOffset = offset & alignedMask; + bufferIndex = offset & indexMask; + if (argc == 4) { + sscanf(argv[3], "%d", &value); + if (value < 0 || value > 255) ERR("ERROR: must be 0-255"); + } + + /* open file */ + fd = open64(fileName, O_RDWR); + if (fd < 0) ERR("ERROR: Unable to open file"); + + /* seek to offset */ + if (lseek64(fd, alignedOffset, SEEK_SET) == -1) + ERR("ERROR: Unable to seek to file offset"); + + /* read into buffer */ + if (read(fd, &oldBuffer, BYTE_BOUNDARY) <= 0) + ERR("ERROR: Unable to read file offset"); + + if (argc == 4) { + /* write from buffer */ + /* update buffer with new value */ + memcpy(newBuffer, oldBuffer, BYTE_BOUNDARY); + newBuffer[bufferIndex] = (unsigned char)value; + + /* seek to offset */ + if (lseek64(fd, alignedOffset, SEEK_SET) == -1) + ERR("ERROR: Unable to seek to file offset"); + + /* write buffer */ + if (write(fd, &newBuffer, BYTE_BOUNDARY) != BYTE_BOUNDARY) + ERR("ERROR: Unable to write to file offset"); + } + + /* print data */ + /* print header */ + if (argc == 3) { + fprintf(stdout, "offset: original value: \n"); + fprintf(stdout, "------------------ ------------------\n"); + } else { + fprintf(stdout, + "offset: original value: new value: \n"); + fprintf(stdout, + "------------------ ------------------ ------------------\n"); + } + + /* next hex, multiple bytes */ + fprintf(stdout, "0x%016llx 0x", alignedOffset); + for (i = 0; i < BYTE_BOUNDARY; i++) { + fprintf(stdout, "%02x", oldBuffer[i]); + } + if (argc == 4) { + fprintf(stdout, " 0x"); + for (i = 0; i < BYTE_BOUNDARY; i++) { + fprintf(stdout, "%02x", newBuffer[i]); + } + } + fprintf(stdout, "\n"); + + /* finally decimal, single byte */ + fprintf(stdout, "%-16lld %-3d (0x%02x)", offset, + oldBuffer[bufferIndex], oldBuffer[bufferIndex]); + if (argc == 4) { + fprintf(stdout, " %-3d (0x%02x)\n", + newBuffer[bufferIndex], newBuffer[bufferIndex]); + } + fprintf(stdout, "\n"); + + /* finished */ + fflush(stdout); + close(fd); + return(0); + +} /* main() */ diff --git a/microbenchmarks/ior/doc/Makefile.in b/microbenchmarks/ior/doc/Makefile.in new file mode 100644 index 00000000..69e1ba05 --- /dev/null +++ b/microbenchmarks/ior/doc/Makefile.in @@ -0,0 +1,474 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = doc +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/ax_prog_cc_mpi.m4 \ + $(top_srcdir)/config/x_ac_meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(dist_data_DATA) \ + $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } +am__installdirs = "$(DESTDIR)$(datadir)" +DATA = $(dist_data_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +am__DIST_COMMON = $(srcdir)/Makefile.in +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +MKDIR_P = @MKDIR_P@ +MPICC = @MPICC@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +dist_data_DATA = USER_GUIDE +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): +install-dist_dataDATA: $(dist_data_DATA) + @$(NORMAL_INSTALL) + @list='$(dist_data_DATA)'; test -n "$(datadir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(datadir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(datadir)" || exit 1; \ + fi; \ + for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + echo "$$d$$p"; \ + done | $(am__base_list) | \ + while read files; do \ + echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(datadir)'"; \ + $(INSTALL_DATA) $$files "$(DESTDIR)$(datadir)" || exit $$?; \ + done + +uninstall-dist_dataDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_data_DATA)'; test -n "$(datadir)" || list=; \ + files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ + dir='$(DESTDIR)$(datadir)'; $(am__uninstall_files_from_dir) +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(datadir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: install-dist_dataDATA + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-dist_dataDATA + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic cscopelist-am \ + ctags-am distclean distclean-generic distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dist_dataDATA install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_dataDATA + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/microbenchmarks/ior/doc/USER_GUIDE b/microbenchmarks/ior/doc/USER_GUIDE new file mode 100644 index 00000000..5ef5027c --- /dev/null +++ b/microbenchmarks/ior/doc/USER_GUIDE @@ -0,0 +1,628 @@ +Copyright (c) 2003, The Regents of the University of California +See the file COPYRIGHT for a complete copyright notice and license. + + IOR USER GUIDE + +Index: + * Basics + 1. Description + 2. Running IOR + 3. Options + + * More Information + 4. Option details + 5. Verbosity levels + 6. Using Scripts + + * Troubleshooting + 7. Compatibility with older versions + + * Frequently Asked Questions + 8. How do I . . . ? + +******************* +* 1. DESCRIPTION * +******************* +IOR can be used for testing performance of parallel file systems using various +interfaces and access patterns. IOR uses MPI for process synchronization. +IOR version 2 is a complete rewrite of the original IOR (Interleaved-Or-Random) +version 1 code. + + +****************** +* 2. RUNNING IOR * +****************** +Two ways to run IOR: + + * Command line with arguments -- executable followed by command line options. + + E.g., to execute: IOR -w -r -o filename + This performs a write and a read to the file 'filename'. + + * Command line with scripts -- any arguments on the command line will + establish the default for the test run, but a script may be used in + conjunction with this for varying specific tests during an execution of the + code. + + E.g., to execute: IOR -W -f script + This defaults all tests in 'script' to use write data checking. + + +************** +* 3. OPTIONS * +************** +These options are to be used on the command line. E.g., 'IOR -a POSIX -b 4K'. + -a S api -- API for I/O [POSIX|MPIIO|HDF5|NCMPI] + -A N refNum -- user reference number to include in long summary + -b N blockSize -- contiguous bytes to write per task (e.g.: 8, 4k, 2m, 1g) + -B useO_DIRECT -- uses O_DIRECT for POSIX, bypassing I/O buffers + -c collective -- collective I/O + -C reorderTasksConstant -- changes task ordering to n+1 ordering for readback + -d N interTestDelay -- delay between reps in seconds + -D N deadlineForStonewalling -- seconds before stopping write or read phase + -e fsync -- perform fsync upon POSIX write close + -E useExistingTestFile -- do not remove test file before write access + -f S scriptFile -- test script name + -F filePerProc -- file-per-process + -g intraTestBarriers -- use barriers between open, write/read, and close + -G N setTimeStampSignature -- set value for time stamp signature + -h showHelp -- displays options and help + -H showHints -- show hints + -i N repetitions -- number of repetitions of test + -I individualDataSets -- datasets not shared by all procs [not working] + -j N outlierThreshold -- warn on outlier N seconds from mean + -J N setAlignment -- HDF5 alignment in bytes (e.g.: 8, 4k, 2m, 1g) + -k keepFile -- don't remove the test file(s) on program exit + -K keepFileWithError -- keep error-filled file(s) after data-checking + -l storeFileOffset -- use file offset as stored signature + -m multiFile -- use number of reps (-i) for multiple file count + -M N memoryPerNode -- hog memory on the node (e.g.: 2g, 75%) + -n noFill -- no fill in HDF5 file creation + -N N numTasks -- number of tasks that should participate in the test + -o S testFile -- full name for test + -O S string of IOR directives (e.g. -O checkRead=1,lustreStripeCount=32) + -p preallocate -- preallocate file size + -P useSharedFilePointer -- use shared file pointer [not working] + -q quitOnError -- during file error-checking, abort on error + -Q N taskPerNodeOffset for read tests use with -C & -Z options (-C constant N, -Z at least N) [!HDF5] + -r readFile -- read existing file + -R checkRead -- check read after read + -s N segmentCount -- number of segments + -S useStridedDatatype -- put strided access into datatype [not working] + -t N transferSize -- size of transfer in bytes (e.g.: 8, 4k, 2m, 1g) + -T N maxTimeDuration -- max time in minutes to run tests + -u uniqueDir -- use unique directory name for each file-per-process + -U S hintsFileName -- full name for hints file + -v verbose -- output information (repeating flag increases level) + -V useFileView -- use MPI_File_set_view + -w writeFile -- write file + -W checkWrite -- check read after write + -x singleXferAttempt -- do not retry transfer if incomplete + -X N reorderTasksRandomSeed -- random seed for -Z option + -Y fsyncPerWrite -- perform fsync after each POSIX write + -z randomOffset -- access is to random, not sequential, offsets within a file + -Z reorderTasksRandom -- changes task ordering to random ordering for readback + + +NOTES: * S is a string, N is an integer number. + * For transfer and block sizes, the case-insensitive K, M, and G + suffices are recognized. I.e., '4k' or '4K' is accepted as 4096. + + +********************* +* 4. OPTION DETAILS * +********************* +For each of the general settings, note the default is shown in brackets. +IMPORTANT NOTE: For all true/false options below [1]=true, [0]=false +IMPORTANT NOTE: Contrary to appearance, the script options below are NOT case sensitive + +GENERAL: +======== + * refNum - user supplied reference number, included in + long summary [0] + + * api - must be set to one of POSIX, MPIIO, HDF5, or NCMPI + depending on test [POSIX] + + * testFile - name of the output file [testFile] + NOTE: with filePerProc set, the tasks can round + robin across multiple file names '-o S@S@S' + + * hintsFileName - name of the hints file [] + + * repetitions - number of times to run each test [1] + + * multiFile - creates multiple files for single-shared-file or + file-per-process modes; i.e. each iteration creates + a new file [0=FALSE] + + * reorderTasksConstant - reorders tasks by a constant node offset for writing/reading neighbor's + data from different nodes [0=FALSE] + + * taskPerNodeOffset - for read tests. Use with -C & -Z options. [1] + With reorderTasks, constant N. With reordertasksrandom, >= N + + * reorderTasksRandom - reorders tasks to random ordering for readback [0=FALSE] + + * reorderTasksRandomSeed - random seed for reordertasksrandom option. [0] + >0, same seed for all iterations. <0, different seed for each iteration + + * quitOnError - upon error encountered on checkWrite or checkRead, + display current error and then stop execution; + if not set, count errors and continue [0=FALSE] + + * numTasks - number of tasks that should participate in the test + [0] + NOTE: 0 denotes all tasks + + * interTestDelay - this is the time in seconds to delay before + beginning a write or read in a series of tests [0] + NOTE: it does not delay before a check write or + check read + + * outlierThreshold - gives warning if any task is more than this number + of seconds from the mean of all participating tasks. + If so, the task is identified, its time (start, + elapsed create, elapsed transfer, elapsed close, or + end) is reported, as is the mean and standard + deviation for all tasks. The default for this is 0, + which turns it off. If set to a positive value, for + example 3, any task not within 3 seconds of the mean + displays its times. [0] + + * intraTestBarriers - use barrier between open, write/read, and close [0=FALSE] + + * uniqueDir - create and use unique directory for each + file-per-process [0=FALSE] + + * writeFile - writes file(s), first deleting any existing file [1=TRUE] + NOTE: the defaults for writeFile and readFile are + set such that if there is not at least one of + the following -w, -r, -W, or -R, it is assumed + that -w and -r are expected and are + consequently used -- this is only true with + the command line, and may be overridden in + a script + + * readFile - reads existing file(s) (from current or previous + run) [1=TRUE] + NOTE: see writeFile notes + + * filePerProc - accesses a single file for each processor; default + is a single file accessed by all processors [0=FALSE] + + * checkWrite - read data back and check for errors against known + pattern; can be used independently of writeFile [0=FALSE] + NOTES: * data checking is not timed and does not + affect other performance timings + * all errors tallied and returned as program + exit code, unless quitOnError set + + * checkRead - reread data and check for errors between reads; can + be used independently of readFile [0=FALSE] + NOTE: see checkWrite notes + + * keepFile - stops removal of test file(s) on program exit [0=FALSE] + + * keepFileWithError - ensures that with any error found in data-checking, + the error-filled file(s) will not be deleted [0=FALSE] + + * useExistingTestFile - do not remove test file before write access [0=FALSE] + + * segmentCount - number of segments in file [1] + NOTES: * a segment is a contiguous chunk of data + accessed by multiple clients each writing/ + reading their own contiguous data; + comprised of blocks accessed by multiple + clients + * with HDF5 this repeats the pattern of an + entire shared dataset + + * blockSize - size (in bytes) of a contiguous chunk of data + accessed by a single client; it is comprised of one + or more transfers [1048576] + + * transferSize - size (in bytes) of a single data buffer to be + transferred in a single I/O call [262144] + + * verbose - output information [0] + NOTE: this can be set to levels 0-5 on the command + line; repeating the -v flag will increase + verbosity level + + * setTimeStampSignature - set value for time stamp signature [0] + NOTE: used to rerun tests with the exact data + pattern by setting data signature to contain + positive integer value as timestamp to be + written in data file; if set to 0, is + disabled + + * showHelp - display options and help [0=FALSE] + + * storeFileOffset - use file offset as stored signature when writing + file [0=FALSE] + NOTE: this will affect performance measurements + + * memoryPerNode - Allocate memory on each node to simulate real + application memory usage. Accepts a percentage of + node memory (e.g. "50%") on machines that support + sysconf(_SC_PHYS_PAGES) or a size. Allocation will + be split between tasks that share the node. + + * memoryPerTask - Allocate secified amount of memory per task to + simulate real application memory usage. + + * maxTimeDuration - max time in minutes to run tests [0] + NOTES: * setting this to zero (0) unsets this option + * this option allows the current read/write + to complete without interruption + + * deadlineForStonewalling - seconds before stopping write or read phase [0] + NOTES: * used for measuring the amount of data moved + in a fixed time. After the barrier, each + task starts its own timer, begins moving + data, and the stops moving data at a pre- + arranged time. Instead of measuring the + amount of time to move a fixed amount of + data, this option measures the amount of + data moved in a fixed amount of time. The + objective is to prevent tasks slow to + complete from skewing the performance. + * setting this to zero (0) unsets this option + * this option is incompatible w/data checking + + * randomOffset - access is to random, not sequential, offsets within a file [0=FALSE] + NOTES: * this option is currently incompatible with: + -checkRead + -storeFileOffset + -MPIIO collective or useFileView + -HDF5 or NCMPI + * summaryAlways - Always print the long summary for each test. + Useful for long runs that may be interrupted, preventing + the final long summary for ALL tests to be printed. + + +POSIX-ONLY: +=========== + * useO_DIRECT - use O_DIRECT for POSIX, bypassing I/O buffers [0] + + * singleXferAttempt - will not continue to retry transfer entire buffer + until it is transferred [0=FALSE] + NOTE: when performing a write() or read() in POSIX, + there is no guarantee that the entire + requested size of the buffer will be + transferred; this flag keeps the retrying a + single transfer until it completes or returns + an error + + * fsyncPerWrite - perform fsync after each POSIX write [0=FALSE] + * fsync - perform fsync after POSIX write close [0=FALSE] + +MPIIO-ONLY: +=========== + * preallocate - preallocate the entire file before writing [0=FALSE] + + * useFileView - use an MPI datatype for setting the file view option + to use individual file pointer [0=FALSE] + NOTE: default IOR uses explicit file pointers + + * useSharedFilePointer - use a shared file pointer [0=FALSE] (not working) + NOTE: default IOR uses explicit file pointers + + * useStridedDatatype - create a datatype (max=2GB) for strided access; akin + to MULTIBLOCK_REGION_SIZE [0] (not working) + +HDF5-ONLY: +========== + * individualDataSets - within a single file each task will access its own + dataset [0=FALSE] (not working) + NOTE: default IOR creates a dataset the size of + numTasks * blockSize to be accessed by all + tasks + + * noFill - no pre-filling of data in HDF5 file creation [0=FALSE] + + * setAlignment - HDF5 alignment in bytes (e.g.: 8, 4k, 2m, 1g) [1] + +MPIIO-, HDF5-, AND NCMPI-ONLY: +============================== + * collective - uses collective operations for access [0=FALSE] + + * showHints - show hint/value pairs attached to open file [0=FALSE] + NOTE: not available in NCMPI + +LUSTRE-SPECIFIC: +================ + * lustreStripeCount - set the lustre stripe count for the test file(s) [0] + + * lustreStripeSize - set the lustre stripe size for the test file(s) [0] + + * lustreStartOST - set the starting OST for the test file(s) [-1] + + * lustreIgnoreLocks - disable lustre range locking [0] + + +*********************** +* 5. VERBOSITY LEVELS * +*********************** +The verbosity of output for IOR can be set with -v. Increasing the number of +-v instances on a command line sets the verbosity higher. + +Here is an overview of the information shown for different verbosity levels: + 0 - default; only bare essentials shown + 1 - max clock deviation, participating tasks, free space, access pattern, + commence/verify access notification w/time + 2 - rank/hostname, machine name, timer used, individual repetition + performance results, timestamp used for data signature + 3 - full test details, transfer block/offset compared, individual data + checking errors, environment variables, task writing/reading file name, + all test operation times + 4 - task id and offset for each transfer + 5 - each 8-byte data signature comparison (WARNING: more data to STDOUT + than stored in file, use carefully) + + +******************** +* 6. USING SCRIPTS * +******************** + +IOR can use a script with the command line. Any options on the command line +will be considered the default settings for running the script. (I.e., +'IOR -W -f script' will have all tests in the script run with the -W option as +default.) The script itself can override these settings and may be set to run +run many different tests of IOR under a single execution. The command line is: + + IOR/bin/IOR -f script + +In IOR/scripts, there are scripts of testcases for simulating I/O behavior of +various application codes. Details are included in each script as necessary. + +An example of a script: +===============> start script <=============== +IOR START + api=[POSIX|MPIIO|HDF5|NCMPI] + testFile=testFile + hintsFileName=hintsFile + repetitions=8 + multiFile=0 + interTestDelay=5 + readFile=1 + writeFile=1 + filePerProc=0 + checkWrite=0 + checkRead=0 + keepFile=1 + quitOnError=0 + segmentCount=1 + blockSize=32k + outlierThreshold=0 + setAlignment=1 + transferSize=32 + singleXferAttempt=0 + individualDataSets=0 + verbose=0 + numTasks=32 + collective=1 + preallocate=0 + useFileView=0 + keepFileWithError=0 + setTimeStampSignature=0 + useSharedFilePointer=0 + useStridedDatatype=0 + uniqueDir=0 + fsync=0 + storeFileOffset=0 + maxTimeDuration=60 + deadlineForStonewalling=0 + useExistingTestFile=0 + useO_DIRECT=0 + showHints=0 + showHelp=0 +RUN + # additional tests are optional + +RUN + +RUN +IOR STOP +===============> stop script <=============== + +NOTES: * Not all test parameters need be set. + * White space is ignored in script, as are comments starting with '#'. + + +**************************************** +* 7. COMPATIBILITY WITH OLDER VERSIONS * +**************************************** +1) IOR version 1 (c. 1996-2002) and IOR version 2 (c. 2003-present) are + incompatible. Input decks from one will not work on the other. As version + 1 is not included in this release, this shouldn't be case for concern. All + subsequent compatibility issues are for IOR version 2. + +2) IOR versions prior to release 2.8 provided data size and rates in powers + of two. E.g., 1 MB/sec referred to 1,048,576 bytes per second. With the + IOR release 2.8 and later versions, MB is now defined as 1,000,000 bytes + and MiB is 1,048,576 bytes. + +3) In IOR versions 2.5.3 to 2.8.7, IOR could be run without any command line + options. This assumed that if both write and read options (-w -r) were + omitted, the run with them both set as default. Later, it became clear + that in certain cases (data checking, e.g.) this caused difficulties. In + IOR versions 2.8.8 and later, if not one of the -w -r -W or -R options is + set, then -w and -r are set implicitly. + +4) IOR version 3 (Jan 2012-present) has changed the output of IOR somewhat, + and the "testNum" option was renamed "refNum". + +********************************* +* 8. FREQUENTLY ASKED QUESTIONS * +********************************* +HOW DO I PERFORM MULTIPLE DATA CHECKS ON AN EXISTING FILE? + + Use this command line: IOR -k -E -W -i 5 -o file + + -k keeps the file after the access rather than deleting it + -E uses the existing file rather than truncating it first + -W performs the writecheck + -i number of iterations of checking + -o filename + + On versions of IOR prior to 2.8.8, you need the -r flag also, otherwise + you'll first overwrite the existing file. (In earlier versions, omitting -w + and -r implied using both. This semantic has been subsequently altered to be + omitting -w, -r, -W, and -R implied using both -w and -r.) + + If you're running new tests to create a file and want repeat data checking on + this file multiple times, there is an undocumented option for this. It's -O + multiReRead=1, and you'd need to have an IOR version compiled with the + USE_UNDOC_OPT=1 (in iordef.h). The command line would look like this: + + IOR -k -E -w -W -i 5 -o file -O multiReRead=1 + + For the first iteration, the file would be written (w/o data checking). Then + for any additional iterations (four, in this example) the file would be + reread for whatever data checking option is used. + + +HOW DOES IOR CALCULATE PERFORMANCE? + + IOR performs get a time stamp START, then has all participating tasks open a + shared or independent file, transfer data, close the file(s), and then get a + STOP time. A stat() or MPI_File_get_size() is performed on the file(s) and + compared against the aggregate amount of data transferred. If this value + does not match, a warning is issued and the amount of data transferred as + calculated from write(), e.g., return codes is used. The calculated + bandwidth is the amount of data transferred divided by the elapsed + STOP-minus-START time. + + IOR also gets time stamps to report the open, transfer, and close times. + Each of these times is based on the earliest start time for any task and the + latest stop time for any task. Without using barriers between these + operations (-g), the sum of the open, transfer, and close times may not equal + the elapsed time from the first open to the last close. + + +HOW DO I ACCESS MULTIPLE FILE SYSTEMS IN IOR? + + It is possible when using the filePerProc option to have tasks round-robin + across multiple file names. Rather than use a single file name '-o file', + additional names '-o file1@file2@file3' may be used. In this case, a file + per process would have three different file names (which may be full path + names) to access. The '@' delimiter is arbitrary, and may be set in the + FILENAME_DELIMITER definition in iordef.h. + + Note that this option of multiple filenames only works with the filePerProc + -F option. This will not work for shared files. + + +HOW DO I BALANCE LOAD ACROSS MULTIPLE FILE SYSTEMS? + + As for the balancing of files per file system where different file systems + offer different performance, additional instances of the same destination + path can generally achieve good balance. + + For example, with FS1 getting 50% better performance than FS2, set the '-o' + flag such that there are additional instances of the FS1 directory. In this + case, '-o FS1/file@FS1/file@FS1/file@FS2/file@FS2/file' should adjust for + the performance difference and balance accordingly. + + +HOW DO I USE STONEWALLING? + + To use stonewalling (-D), it's generally best to separate write testing from + read testing. Start with writing a file with '-D 0' (stonewalling disabled) + to determine how long the file takes to be written. If it takes 10 seconds + for the data transfer, run again with a shorter duration, '-D 7' e.g., to + stop before the file would be completed without stonewalling. For reading, + it's best to create a full file (not an incompletely written file from a + stonewalling run) and then run with stonewalling set on this preexisting + file. If a write and read test are performed in the same run with + stonewalling, it's likely that the read will encounter an error upon hitting + the EOF. Separating the runs can correct for this. E.g., + + IOR -w -k -o file -D 10 # write and keep file, stonewall after 10 seconds + IOR -r -E -o file -D 7 # read existing file, stonewall after 7 seconds + + Also, when running multiple iterations of a read-only stonewall test, it may + be necessary to set the -D value high enough so that each iteration is not + reading from cache. Otherwise, in some cases, the first iteration may show + 100 MB/s, the next 200 MB/s, the third 300 MB/s. Each of these tests is + actually reading the same amount from disk in the allotted time, but they + are also reading the cached data from the previous test each time to get the + increased performance. Setting -D high enough so that the cache is + overfilled will prevent this. + + +HOW DO I BYPASS CACHING WHEN READING BACK A FILE I'VE JUST WRITTEN? + + One issue with testing file systems is handling cached data. When a file is + written, that data may be stored locally on the node writing the file. When + the same node attempts to read the data back from the file system either for + performance or data integrity checking, it may be reading from its own cache + rather from the file system. + + The reorderTasksConstant '-C' option attempts to address this by having a + different node read back data than wrote it. For example, node N writes the + data to file, node N+1 reads back the data for read performance, node N+2 + reads back the data for write data checking, and node N+3 reads the data for + read data checking, comparing this with the reread data from node N+4. The + objective is to make sure on file access that the data is not being read from + cached data. + + Node 0: writes data + Node 1: reads data + Node 2: reads written data for write checking + Node 3: reads written data for read checking + Node 4: reads written data for read checking, comparing with Node 3 + + The algorithm for skipping from N to N+1, e.g., expects consecutive task + numbers on nodes (block assignment), not those assigned round robin (cyclic + assignment). For example, a test running 6 tasks on 3 nodes would expect + tasks 0,1 on node 0; tasks 2,3 on node 1; and tasks 4,5 on node 2. Were the + assignment for tasks-to-node in round robin fashion, there would be tasks 0,3 + on node 0; tasks 1,4 on node 1; and tasks 2,5 on node 2. In this case, there + would be no expectation that a task would not be reading from data cached on + a node. + + +HOW DO I USE HINTS? + + It is possible to pass hints to the I/O library or file system layers + following this form: + 'setenv IOR_HINT____ ' + For example: + 'setenv IOR_HINT__MPI__IBM_largeblock_io true' + 'setenv IOR_HINT__GPFS__important_hint true' + or, in a file in the form: + 'IOR_HINT____=' + Note that hints to MPI from the HDF5 or NCMPI layers are of the form: + 'setenv IOR_HINT__MPI__ ' + + +HOW DO I EXPLICITY SET THE FILE DATA SIGNATURE? + + The data signature for a transfer contains the MPI task number, transfer- + buffer offset, and also timestamp for the start of iteration. As IOR works + with 8-byte long long ints, the even-numbered long longs written contain a + 32-bit MPI task number and a 32-bit timestamp. The odd-numbered long longs + contain a 64-bit transferbuffer offset (or file offset if the '-l' + storeFileOffset option is used). To set the timestamp value, use '-G' or + setTimeStampSignature. + + +HOW DO I EASILY CHECK OR CHANGE A BYTE IN AN OUTPUT DATA FILE? + + There is a simple utility IOR/src/C/cbif/cbif.c that may be built. This is a + stand-alone, serial application called cbif (Change Byte In File). The + utility allows a file offset to be checked, returning the data at that + location in IOR's data check format. It also allows a byte at that location + to be changed. + + +HOW DO I CORRECT FOR CLOCK SKEW BETWEEN NODES IN A CLUSTER? + + To correct for clock skew between nodes, IOR compares times between nodes, + then broadcasts the root node's timestamp so all nodes can adjust by the + difference. To see an egregious outlier, use the '-j' option. Be sure + to set this value high enough to only show a node outside a certain time + from the mean. diff --git a/microbenchmarks/ior/inputs.xroads/load1-mpiio-filepertask.ior b/microbenchmarks/ior/inputs.xroads/load1-mpiio-filepertask.ior new file mode 100644 index 00000000..f992c97a --- /dev/null +++ b/microbenchmarks/ior/inputs.xroads/load1-mpiio-filepertask.ior @@ -0,0 +1,36 @@ +################################################################################ +# +# Run the IOR benchmark with the MPI-IO I/O API and one file per task +# +################################################################################ +IOR START + +### You MUST change the following parameters (see README.XROADS) + numTasks=240 # number of MPI processes to use. You may choose to use one or more MPI processes per node. + segmentCount=4096 # must be > fileSize / ( blockSize * numTasks ) where fileSize must be greater than 1.5 times the aggregate DRAM available for use by the page cache + memoryPerNode=80% # must be > 80% of the node's DRAM available for use by the page cache + +### You MAY change the following parameters + transferSize=1M # size of a single data buffer to be transferred by a single I/O call. You must find the optimal transferSize for the storage system. + blockSize=1M # must be the same as transferSize + testFile=datafile.dat # will read/write files called ./datafile.dat.00000000 ./datafile.dat.00000001 etc + collective=1 # for MPIIO api use collectives (e.g. MPI_File_read_all) instead of independent calls (e.g. MPI_File_read) + keepFile=0 # do not delete files used by the test at the end of each execution + +### You MUST NOT change the following parameters + reorderTasksConstant=1 # each node n writes data; that data is then read by node n+1 + intraTestBarriers=1 # use barriers between open/read/write/close + repetitions=1 # executes the same test multiple times + verbose=2 # print additional information about the job geometry + fsync=1 # for POSIX api call fsync(2) before close(2) + +### The following parameters define the nature of the benchmark test + api=MPIIO # use POSIX open/close/read/write + filePerProc=1 # read/write one file per MPI process + randomOffset=0 # randomize order in which reads/writes occur + writeFile=1 # perform the write component of the test + readFile=1 # perform the read component of the test after the write component has completed + +RUN + +IOR STOP diff --git a/microbenchmarks/ior/inputs.xroads/load1-mpiio-sharedfile.ior b/microbenchmarks/ior/inputs.xroads/load1-mpiio-sharedfile.ior new file mode 100644 index 00000000..94d47c0e --- /dev/null +++ b/microbenchmarks/ior/inputs.xroads/load1-mpiio-sharedfile.ior @@ -0,0 +1,36 @@ +################################################################################ +# +# Run the IOR benchmark with the MPI-IO I/O API and a single shared file +# +################################################################################ +IOR START + +### You MUST change the following parameters (see README.XROADS) + numTasks=240 # number of MPI processes to use. You may choose to use one or more MPI processes per node. + segmentCount=4096 # must be > fileSize / ( blockSize * numTasks ) where fileSize must be greater than 1.5 times the aggregate DRAM available for use by the page cache + memoryPerNode=80% # must be > 80% of the node's DRAM available for use by the page cache + +### You MAY change the following parameters + transferSize=1M # size of a single data buffer to be transferred by a single I/O call. You must find the optimal transferSize for the storage system. + blockSize=1M # must be the same as transferSize + testFile=datafile.dat # will read/write to a shared file called datafile.dat + collective=1 # for MPIIO api use collectives (e.g. MPI_File_read_all) instead of independent calls (e.g. MPI_File_read) + keepFile=0 # do not delete files used by the test at the end of each execution + +### You MUST NOT change the following parameters + reorderTasksConstant=1 # each node n writes data; that data is then read by node n+1 + intraTestBarriers=1 # use barriers between open/read/write/close + repetitions=1 # executes the same test multiple times + verbose=2 # print additional information about the job geometry + fsync=1 # for POSIX api call fsync(2) before close(2) + +### The following parameters define the nature of the benchmark test + api=MPIIO # use POSIX open/close/read/write + filePerProc=0 # read/write one file per MPI process + randomOffset=0 # randomize order in which reads/writes occur + writeFile=1 # perform the write component of the test + readFile=1 # perform the read component of the test after the write component has completed + +RUN + +IOR STOP diff --git a/microbenchmarks/ior/inputs.xroads/load1-posix-filepertask.ior b/microbenchmarks/ior/inputs.xroads/load1-posix-filepertask.ior new file mode 100644 index 00000000..33930fc2 --- /dev/null +++ b/microbenchmarks/ior/inputs.xroads/load1-posix-filepertask.ior @@ -0,0 +1,36 @@ +################################################################################ +# +# Run the IOR benchmark with the POSIX I/O API and one file per task +# +################################################################################ +IOR START + +### You MUST change the following parameters (see README.XROADS) + numTasks=240 # number of MPI processes to use. You may choose to use one or more MPI processes per node. + segmentCount=4096 # must be > fileSize / ( blockSize * numTasks ) where fileSize must be greater than 1.5 times the aggregate DRAM available for use by the page cache + memoryPerNode=80% # must be > 80% of the node's DRAM available for use by the page cache + +### You MAY change the following parameters + transferSize=1M # size of a single data buffer to be transferred by a single I/O call. You must find the optimal transferSize for the storage system. + blockSize=1M # must be the same as transferSize + testFile=datafile.dat # will read/write files called ./datafile.dat.00000000 ./datafile.dat.00000001 etc + collective=0 # for MPIIO api use collectives (e.g. MPI_File_read_all) instead of independent calls (e.g. MPI_File_read) + keepFile=0 # do not delete files used by the test at the end of each execution + +### You MUST NOT change the following parameters + reorderTasksConstant=1 # each node n writes data; that data is then read by node n+1 + intraTestBarriers=1 # use barriers between open/read/write/close + repetitions=1 # executes the same test multiple times + verbose=2 # print additional information about the job geometry + fsync=1 # for POSIX api call fsync(2) before close(2) + +### The following parameters define the nature of the benchmark test + api=POSIX # use POSIX open/close/read/write + filePerProc=1 # read/write one file per MPI process + randomOffset=0 # randomize order in which reads/writes occur + writeFile=1 # perform the write component of the test + readFile=1 # perform the read component of the test after the write component has completed + +RUN + +IOR STOP diff --git a/microbenchmarks/ior/inputs.xroads/load1-posix-sharedfile.ior b/microbenchmarks/ior/inputs.xroads/load1-posix-sharedfile.ior new file mode 100644 index 00000000..096afa60 --- /dev/null +++ b/microbenchmarks/ior/inputs.xroads/load1-posix-sharedfile.ior @@ -0,0 +1,36 @@ +################################################################################ +# +# Run the IOR benchmark with the POSIX I/O API and a single shared file +# +################################################################################ +IOR START + +### You MUST change the following parameters (see README.XROADS) + numTasks=240 # number of MPI processes to use. You may choose to use one or more MPI processes per node. + segmentCount=4096 # must be > fileSize / ( blockSize * numTasks ) where fileSize must be greater than 1.5 times the aggregate DRAM available for use by the page cache + memoryPerNode=80% # must be > 80% of the node's DRAM available for use by the page cache + +### You MAY change the following parameters + transferSize=1M # size of a single data buffer to be transferred by a single I/O call. You must find the optimal transferSize for the storage system. + blockSize=1M # must be the same as transferSize + testFile=datafile.dat # will read/write to a shared file called datafile.dat + collective=0 # for MPIIO api use collectives (e.g. MPI_File_read_all) instead of independent calls (e.g. MPI_File_read) + keepFile=0 # do not delete files used by the test at the end of each execution + +### You MUST NOT change the following parameters + reorderTasksConstant=1 # each node n writes data; that data is then read by node n+1 + intraTestBarriers=1 # use barriers between open/read/write/close + repetitions=1 # executes the same test multiple times + verbose=2 # print additional information about the job geometry + fsync=1 # for POSIX api call fsync(2) before close(2) + +### The following parameters define the nature of the benchmark test + api=POSIX # use POSIX open/close/read/write + filePerProc=0 # read/write one file per MPI process + randomOffset=0 # randomize order in which reads/writes occur + writeFile=1 # perform the write component of the test + readFile=1 # perform the read component of the test after the write component has completed + +RUN + +IOR STOP diff --git a/microbenchmarks/ior/inputs.xroads/load2-posix-filepertask.ior b/microbenchmarks/ior/inputs.xroads/load2-posix-filepertask.ior new file mode 100644 index 00000000..04d1d326 --- /dev/null +++ b/microbenchmarks/ior/inputs.xroads/load2-posix-filepertask.ior @@ -0,0 +1,35 @@ +################################################################################ +# +# Run the IOR benchmark with the POSIX I/O API and one file per task +# +################################################################################ +IOR START + +### You MUST change the following parameters (see README.XROADS) + numTasks=240 # number of MPI processes to use. You may choose to use one or more MPI processes per node. + segmentCount=1048576 # must be > fileSize / ( blockSize * numTasks ) where fileSize must be greater than 1.5 times the aggregate DRAM available for use by the page cache + memoryPerNode=80% # must be > 80% of the node's DRAM available for use by the page cache + +### You MAY change the following parameters + testFile=datafile.dat # will read/write files called ./datafile.dat.00000000 ./datafile.dat.00000001 etc + keepFile=0 # do not delete files used by the test at the end of each execution + +### You MUST NOT change the following parameters + transferSize=4K # size of a single data buffer to be transferred by a single I/O call + blockSize=4K # must be the same as transferSize + reorderTasksConstant=1 # each node n writes data; that data is then read by node n+1 + intraTestBarriers=1 # use barriers between open/read/write/close + repetitions=1 # executes the same test multiple times + verbose=2 # print additional information about the job geometry + fsync=1 # for POSIX api call fsync(2) before close(2) + +### The following parameters define the nature of the benchmark test + api=POSIX # use POSIX open/close/read/write + filePerProc=1 # read/write one file per MPI process + randomOffset=1 # randomize order in which reads/writes occur + writeFile=1 # perform the write component of the test + readFile=1 # perform the read component of the test after the write component has completed + +RUN + +IOR STOP diff --git a/microbenchmarks/ior/inputs.xroads/load2-posix-sharedfile.ior b/microbenchmarks/ior/inputs.xroads/load2-posix-sharedfile.ior new file mode 100644 index 00000000..4271e471 --- /dev/null +++ b/microbenchmarks/ior/inputs.xroads/load2-posix-sharedfile.ior @@ -0,0 +1,34 @@ +################################################################################ +# +# Run the IOR benchmark with the POSIX I/O API and a single shared file +# +################################################################################ +IOR START + +### You MUST change the following parameters (see README.XROADS) + numTasks=240 # number of MPI processes to use. You may choose to use one or more MPI processes per node. + segmentCount=1048576 # must be > fileSize / ( blockSize * numTasks ) where fileSize must be greater than 1.5 times the aggregate DRAM available for use by the page cache + memoryPerNode=80% # must be > 80% of the node's DRAM available for use by the page cache + +### You MAY change the following parameters + testFile=datafile.dat # will read/write to a shared file called datafile.dat + keepFile=0 # do not delete files used by the test at the end of each execution + +### You MUST NOT change the following parameters + transferSize=4K # size of a single data buffer to be transferred by a single I/O call + blockSize=4K # must be the same as transferSize + reorderTasksConstant=1 # each node n writes data; that data is then read by node n+1 + intraTestBarriers=1 # use barriers between open/read/write/close + repetitions=1 # executes the same test multiple times + verbose=2 # print additional information about the job geometry + fsync=1 # for POSIX api call fsync(2) before close(2) + +### The following parameters define the nature of the benchmark test + api=POSIX # use POSIX open/close/read/write + filePerProc=0 # read/write one file per MPI process + writeFile=1 # perform the write component of the test + readFile=1 # perform the read component of the test after the write component has completed + +RUN + +IOR STOP diff --git a/microbenchmarks/ior/scripts/exampleScript b/microbenchmarks/ior/scripts/exampleScript new file mode 100644 index 00000000..c17e284e --- /dev/null +++ b/microbenchmarks/ior/scripts/exampleScript @@ -0,0 +1,24 @@ +IOR START + testFile = /tmp/work/swh13/testfile + filePerProc=1 + api=POSIX + repetitions=2 + verbose=1 + reordertasksrandom=1 + reordertasksrandomseed=-113 + RUN + verbose = 2 + repetitions=1#more foo + reordertasksconstant=1 + #foobar + blockSize=10m + transferSize=128k + randomoffset=1 + + RUN + verbose = 0 + + #blockSize= + transferSize=64k + RUN +IOR STOP diff --git a/microbenchmarks/ior/scripts/run_script.cnl b/microbenchmarks/ior/scripts/run_script.cnl new file mode 100644 index 00000000..a38edbd7 --- /dev/null +++ b/microbenchmarks/ior/scripts/run_script.cnl @@ -0,0 +1,93 @@ +#!/bin/bash -x + +#PBS -N IOR +#PBS -j oe +#PBS -q batch +#PBS -A stf006 +#PBS -V +#PBS -l walltime=0:60:00,size=8 + +VERS=IOR-2.10.1.ornl.16 +WORK=/tmp/work/${USER} +echo $PBS_O_WORKDIR + +cd /ccs/proj/quadcore +tar -czvf ${WORK}/${VERS}.tar.gz ./${VERS} +cd ${WORK} +rm -fr ./${VERS} +tar -xzvf ${WORK}/${VERS}.tar.gz +cd ${WORK}/${VERS} +gmake clean +gmake mpiio +EXEC=${WORK}/${VERS}/src/C/IOR +IODIR=/tmp/work/swh13/test_files_x +cd ${WORK}/${VERS}/tests + +which mpirun + +rm -fr $IODIR +mkdir $IODIR + +let "w=128" +let "s=1024*1024" +let "i=3" + +MPIRUN="aprun -n" + +RESULTS="." + +let "tid=1" +XFERS="1048576 262144 32768 4096 1024" +XFERS="262144" +for xfer in `echo $XFERS` +do + let "n=8" +until [ "$n" -gt 8 ] +do + + let "m=$n/4" + #TESTS="POSIX MPIIO HDF5 NCMPI" + TESTS="POSIX MPIIO" + for test in `echo $TESTS` + do + runid="p$n.$xfer.${test}" + date + + V=" " + BLOCKS="1 10 1 10 1 10" + for blocks in `echo $BLOCKS` + do + + let "block=${xfer} * ${blocks}" + + #fileperproc tests + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -F -o $IODIR/testwrite.${runid} -Y -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C -Q $m ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m -X 13 ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m -X -13 ${V} -F -o $IODIR/testwrite.${runid} -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + + #shared tests + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -o $IODIR/testwrite.${runid} -Y -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + + #test mutually exclusive options + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -Z -C ${V} -o $IODIR/testwrite.${runid} -i${i} -m -t ${xfer} -b ${block} -d 0.0 + let "tid=$tid + 17" + + V=$V" -v" + + done #blocks + + date + done #test + let "n = $n * 2" + done #n +done #xfer +exit diff --git a/microbenchmarks/ior/scripts/run_script.linux b/microbenchmarks/ior/scripts/run_script.linux new file mode 100644 index 00000000..42d444f6 --- /dev/null +++ b/microbenchmarks/ior/scripts/run_script.linux @@ -0,0 +1,93 @@ +#!/bin/bash -x + +#PBS -N IOR +#PBS -j oe +#PBS -q batch +#PBS -A stf006 +#PBS -V +#PBS -l walltime=0:60:00,nodes=8:ppn=2 + +VERS=IOR-2.10.1 +WORK=/tmp/work/${USER} +echo $PBS_O_WORKDIR + +cd /ccs/proj/quadcore +tar -czvf ${WORK}/${VERS}.tar.gz ./${VERS} +cd ${WORK} +rm -fr ./${VERS} +tar -xzvf ${WORK}/${VERS}.tar.gz +cd ${WORK}/${VERS} +gmake clean +gmake mpiio +EXEC=${WORK}/${VERS}/src/C/IOR +IODIR=/tmp/work/swh13/test_files_x +cd ${WORK}/${VERS}/tests + +which mpirun + +rm -fr $IODIR +mkdir $IODIR + +let "w=128" +let "s=1024*1024" +let "i=3" + +MPIRUN="mpirun -np" + +RESULTS="." + +let "tid=1" +XFERS="1048576 262144 32768 4096 1024" +XFERS="262144" +for xfer in `echo $XFERS` +do + let "n=8" +until [ "$n" -gt 8 ] +do + + let "m=$n/4" + #TESTS="POSIX MPIIO HDF5 NCMPI" + TESTS="POSIX MPIIO" + for test in `echo $TESTS` + do + runid="p$n.$xfer.${test}" + date + + V=" " + BLOCKS="1 10 1 10 1 10" + for blocks in `echo $BLOCKS` + do + + let "block=${xfer} * ${blocks}" + + #fileperproc tests + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -F -o $IODIR/testwrite.${runid} -Y -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C -Q $m ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m -X 13 ${V} -F -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z -Q $m -X -13 ${V} -F -o $IODIR/testwrite.${runid} -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + + #shared tests + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w -z ${V} -o $IODIR/testwrite.${runid} -Y -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -w ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + + #test mutually exclusive options + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -C ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -z -Z ${V} -o $IODIR/testwrite.${runid} -k -e -i${i} -m -t ${xfer} -b ${block} -d 0.1 + ${MPIRUN} $n ${EXEC} -A ${tid} -a ${test} -r -Z -C ${V} -o $IODIR/testwrite.${runid} -i${i} -m -t ${xfer} -b ${block} -d 0.0 + let "tid=$tid + 17" + + V=$V" -v" + + done #blocks + + date + done #test + let "n = $n * 2" + done #n +done #xfer +exit diff --git a/microbenchmarks/ior/src/Makefile.in b/microbenchmarks/ior/src/Makefile.in new file mode 100644 index 00000000..eb0f8229 --- /dev/null +++ b/microbenchmarks/ior/src/Makefile.in @@ -0,0 +1,861 @@ +# Makefile.in generated by automake 1.15 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2014 Free Software Foundation, Inc. + +# This Makefile.in 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. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +am__is_gnu_make = { \ + if test -z '$(MAKELEVEL)'; then \ + false; \ + elif test -n '$(MAKE_HOST)'; then \ + true; \ + elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ + true; \ + else \ + false; \ + fi; \ +} +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +bin_PROGRAMS = ior$(EXEEXT) $(am__EXEEXT_1) +@USE_CAPS_TRUE@am__append_1 = IOR +@USE_POSIX_AIORI_TRUE@am__append_2 = aiori-POSIX.c +@USE_MPIIO_AIORI_TRUE@am__append_3 = aiori-MPIIO.c +@USE_HDF5_AIORI_TRUE@am__append_4 = aiori-HDF5.c +@USE_HDF5_AIORI_TRUE@am__append_5 = -lhdf5 -lz +@USE_NCMPI_AIORI_TRUE@am__append_6 = aiori-NCMPI.c +@USE_NCMPI_AIORI_TRUE@am__append_7 = -lpnetcdf +subdir = src +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/config/ax_prog_cc_mpi.m4 \ + $(top_srcdir)/config/x_ac_meta.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +@USE_CAPS_TRUE@am__EXEEXT_1 = IOR$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__IOR_SOURCES_DIST = ior.c utilities.c parse_options.c ior.h \ + utilities.h parse_options.h aiori.h iordef.h aiori-POSIX.c \ + aiori-MPIIO.c aiori-HDF5.c aiori-NCMPI.c +@USE_POSIX_AIORI_TRUE@am__objects_1 = IOR-aiori-POSIX.$(OBJEXT) +@USE_MPIIO_AIORI_TRUE@am__objects_2 = IOR-aiori-MPIIO.$(OBJEXT) +@USE_HDF5_AIORI_TRUE@am__objects_3 = IOR-aiori-HDF5.$(OBJEXT) +@USE_NCMPI_AIORI_TRUE@am__objects_4 = IOR-aiori-NCMPI.$(OBJEXT) +am__objects_5 = IOR-ior.$(OBJEXT) IOR-utilities.$(OBJEXT) \ + IOR-parse_options.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ + $(am__objects_3) $(am__objects_4) +am_IOR_OBJECTS = $(am__objects_5) +IOR_OBJECTS = $(am_IOR_OBJECTS) +am__DEPENDENCIES_1 = +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +IOR_DEPENDENCIES = $(am__DEPENDENCIES_2) +IOR_LINK = $(CCLD) $(IOR_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +am__ior_SOURCES_DIST = ior.c utilities.c parse_options.c ior.h \ + utilities.h parse_options.h aiori.h iordef.h aiori-POSIX.c \ + aiori-MPIIO.c aiori-HDF5.c aiori-NCMPI.c +@USE_POSIX_AIORI_TRUE@am__objects_6 = ior-aiori-POSIX.$(OBJEXT) +@USE_MPIIO_AIORI_TRUE@am__objects_7 = ior-aiori-MPIIO.$(OBJEXT) +@USE_HDF5_AIORI_TRUE@am__objects_8 = ior-aiori-HDF5.$(OBJEXT) +@USE_NCMPI_AIORI_TRUE@am__objects_9 = ior-aiori-NCMPI.$(OBJEXT) +am_ior_OBJECTS = ior-ior.$(OBJEXT) ior-utilities.$(OBJEXT) \ + ior-parse_options.$(OBJEXT) $(am__objects_6) $(am__objects_7) \ + $(am__objects_8) $(am__objects_9) +ior_OBJECTS = $(am_ior_OBJECTS) +ior_DEPENDENCIES = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) +ior_LINK = $(CCLD) $(ior_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o \ + $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +DEFAULT_INCLUDES = -I.@am__isrc@ +depcomp = $(SHELL) $(top_srcdir)/config/depcomp +am__depfiles_maybe = depfiles +am__mv = mv -f +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent +am__v_lt_1 = +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = +SOURCES = $(IOR_SOURCES) $(ior_SOURCES) +DIST_SOURCES = $(am__IOR_SOURCES_DIST) $(am__ior_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in \ + $(top_srcdir)/config/depcomp +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +META_ALIAS = @META_ALIAS@ +META_AUTHOR = @META_AUTHOR@ +META_DATE = @META_DATE@ +META_LT_AGE = @META_LT_AGE@ +META_LT_CURRENT = @META_LT_CURRENT@ +META_LT_REVISION = @META_LT_REVISION@ +META_NAME = @META_NAME@ +META_RELEASE = @META_RELEASE@ +META_VERSION = @META_VERSION@ +MKDIR_P = @MKDIR_P@ +MPICC = @MPICC@ +OBJEXT = @OBJEXT@ +OPENMP_CFLAGS = @OPENMP_CFLAGS@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_CC = @ac_ct_CC@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +ior_SOURCES = ior.c utilities.c parse_options.c ior.h utilities.h \ + parse_options.h aiori.h iordef.h $(am__append_2) \ + $(am__append_3) $(am__append_4) $(am__append_6) +ior_LDADD = $(am__append_5) $(am__append_7) +ior_CFLAGS = $(OPENMP_CFLAGS) +IOR_SOURCES = $(ior_SOURCES) +IOR_LDADD = $(ior_LDADD) +IOR_CFLAGS = $(ior_CFLAGS) +all: config.h + $(MAKE) $(AM_MAKEFLAGS) all-am + +.SUFFIXES: +.SUFFIXES: .c .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign src/Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +config.h: stamp-h1 + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + +stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status + @rm -f stamp-h1 + cd $(top_builddir) && $(SHELL) ./config.status src/config.h +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) + rm -f stamp-h1 + touch $@ + +distclean-hdr: + -rm -f config.h stamp-h1 +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ + for p in $$list; do echo "$$p $$p"; done | \ + sed 's/$(EXEEXT)$$//' | \ + while read p p1; do if test -f $$p \ + ; then echo "$$p"; echo "$$p"; else :; fi; \ + done | \ + sed -e 'p;s,.*/,,;n;h' \ + -e 's|.*|.|' \ + -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ + sed 'N;N;N;s,\n, ,g' | \ + $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ + { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ + if ($$2 == $$4) files[d] = files[d] " " $$1; \ + else { print "f", $$3 "/" $$4, $$1; } } \ + END { for (d in files) print "f", d, files[d] }' | \ + while read type dir files; do \ + if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ + test -z "$$files" || { \ + echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + files=`for p in $$list; do echo "$$p"; done | \ + sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ + -e 's/$$/$(EXEEXT)/' \ + `; \ + test -n "$$list" || exit 0; \ + echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(bindir)" && rm -f $$files + +clean-binPROGRAMS: + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + +IOR$(EXEEXT): $(IOR_OBJECTS) $(IOR_DEPENDENCIES) $(EXTRA_IOR_DEPENDENCIES) + @rm -f IOR$(EXEEXT) + $(AM_V_CCLD)$(IOR_LINK) $(IOR_OBJECTS) $(IOR_LDADD) $(LIBS) + +ior$(EXEEXT): $(ior_OBJECTS) $(ior_DEPENDENCIES) $(EXTRA_ior_DEPENDENCIES) + @rm -f ior$(EXEEXT) + $(AM_V_CCLD)$(ior_LINK) $(ior_OBJECTS) $(ior_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOR-aiori-HDF5.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOR-aiori-MPIIO.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOR-aiori-NCMPI.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOR-aiori-POSIX.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOR-ior.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOR-parse_options.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOR-utilities.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ior-aiori-HDF5.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ior-aiori-MPIIO.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ior-aiori-NCMPI.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ior-aiori-POSIX.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ior-ior.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ior-parse_options.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ior-utilities.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< + +.c.obj: +@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` + +IOR-ior.o: ior.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-ior.o -MD -MP -MF $(DEPDIR)/IOR-ior.Tpo -c -o IOR-ior.o `test -f 'ior.c' || echo '$(srcdir)/'`ior.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-ior.Tpo $(DEPDIR)/IOR-ior.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ior.c' object='IOR-ior.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-ior.o `test -f 'ior.c' || echo '$(srcdir)/'`ior.c + +IOR-ior.obj: ior.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-ior.obj -MD -MP -MF $(DEPDIR)/IOR-ior.Tpo -c -o IOR-ior.obj `if test -f 'ior.c'; then $(CYGPATH_W) 'ior.c'; else $(CYGPATH_W) '$(srcdir)/ior.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-ior.Tpo $(DEPDIR)/IOR-ior.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ior.c' object='IOR-ior.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-ior.obj `if test -f 'ior.c'; then $(CYGPATH_W) 'ior.c'; else $(CYGPATH_W) '$(srcdir)/ior.c'; fi` + +IOR-utilities.o: utilities.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-utilities.o -MD -MP -MF $(DEPDIR)/IOR-utilities.Tpo -c -o IOR-utilities.o `test -f 'utilities.c' || echo '$(srcdir)/'`utilities.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-utilities.Tpo $(DEPDIR)/IOR-utilities.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities.c' object='IOR-utilities.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-utilities.o `test -f 'utilities.c' || echo '$(srcdir)/'`utilities.c + +IOR-utilities.obj: utilities.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-utilities.obj -MD -MP -MF $(DEPDIR)/IOR-utilities.Tpo -c -o IOR-utilities.obj `if test -f 'utilities.c'; then $(CYGPATH_W) 'utilities.c'; else $(CYGPATH_W) '$(srcdir)/utilities.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-utilities.Tpo $(DEPDIR)/IOR-utilities.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities.c' object='IOR-utilities.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-utilities.obj `if test -f 'utilities.c'; then $(CYGPATH_W) 'utilities.c'; else $(CYGPATH_W) '$(srcdir)/utilities.c'; fi` + +IOR-parse_options.o: parse_options.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-parse_options.o -MD -MP -MF $(DEPDIR)/IOR-parse_options.Tpo -c -o IOR-parse_options.o `test -f 'parse_options.c' || echo '$(srcdir)/'`parse_options.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-parse_options.Tpo $(DEPDIR)/IOR-parse_options.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse_options.c' object='IOR-parse_options.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-parse_options.o `test -f 'parse_options.c' || echo '$(srcdir)/'`parse_options.c + +IOR-parse_options.obj: parse_options.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-parse_options.obj -MD -MP -MF $(DEPDIR)/IOR-parse_options.Tpo -c -o IOR-parse_options.obj `if test -f 'parse_options.c'; then $(CYGPATH_W) 'parse_options.c'; else $(CYGPATH_W) '$(srcdir)/parse_options.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-parse_options.Tpo $(DEPDIR)/IOR-parse_options.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse_options.c' object='IOR-parse_options.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-parse_options.obj `if test -f 'parse_options.c'; then $(CYGPATH_W) 'parse_options.c'; else $(CYGPATH_W) '$(srcdir)/parse_options.c'; fi` + +IOR-aiori-POSIX.o: aiori-POSIX.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-POSIX.o -MD -MP -MF $(DEPDIR)/IOR-aiori-POSIX.Tpo -c -o IOR-aiori-POSIX.o `test -f 'aiori-POSIX.c' || echo '$(srcdir)/'`aiori-POSIX.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-POSIX.Tpo $(DEPDIR)/IOR-aiori-POSIX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-POSIX.c' object='IOR-aiori-POSIX.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-POSIX.o `test -f 'aiori-POSIX.c' || echo '$(srcdir)/'`aiori-POSIX.c + +IOR-aiori-POSIX.obj: aiori-POSIX.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-POSIX.obj -MD -MP -MF $(DEPDIR)/IOR-aiori-POSIX.Tpo -c -o IOR-aiori-POSIX.obj `if test -f 'aiori-POSIX.c'; then $(CYGPATH_W) 'aiori-POSIX.c'; else $(CYGPATH_W) '$(srcdir)/aiori-POSIX.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-POSIX.Tpo $(DEPDIR)/IOR-aiori-POSIX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-POSIX.c' object='IOR-aiori-POSIX.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-POSIX.obj `if test -f 'aiori-POSIX.c'; then $(CYGPATH_W) 'aiori-POSIX.c'; else $(CYGPATH_W) '$(srcdir)/aiori-POSIX.c'; fi` + +IOR-aiori-MPIIO.o: aiori-MPIIO.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-MPIIO.o -MD -MP -MF $(DEPDIR)/IOR-aiori-MPIIO.Tpo -c -o IOR-aiori-MPIIO.o `test -f 'aiori-MPIIO.c' || echo '$(srcdir)/'`aiori-MPIIO.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-MPIIO.Tpo $(DEPDIR)/IOR-aiori-MPIIO.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-MPIIO.c' object='IOR-aiori-MPIIO.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-MPIIO.o `test -f 'aiori-MPIIO.c' || echo '$(srcdir)/'`aiori-MPIIO.c + +IOR-aiori-MPIIO.obj: aiori-MPIIO.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-MPIIO.obj -MD -MP -MF $(DEPDIR)/IOR-aiori-MPIIO.Tpo -c -o IOR-aiori-MPIIO.obj `if test -f 'aiori-MPIIO.c'; then $(CYGPATH_W) 'aiori-MPIIO.c'; else $(CYGPATH_W) '$(srcdir)/aiori-MPIIO.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-MPIIO.Tpo $(DEPDIR)/IOR-aiori-MPIIO.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-MPIIO.c' object='IOR-aiori-MPIIO.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-MPIIO.obj `if test -f 'aiori-MPIIO.c'; then $(CYGPATH_W) 'aiori-MPIIO.c'; else $(CYGPATH_W) '$(srcdir)/aiori-MPIIO.c'; fi` + +IOR-aiori-HDF5.o: aiori-HDF5.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-HDF5.o -MD -MP -MF $(DEPDIR)/IOR-aiori-HDF5.Tpo -c -o IOR-aiori-HDF5.o `test -f 'aiori-HDF5.c' || echo '$(srcdir)/'`aiori-HDF5.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-HDF5.Tpo $(DEPDIR)/IOR-aiori-HDF5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-HDF5.c' object='IOR-aiori-HDF5.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-HDF5.o `test -f 'aiori-HDF5.c' || echo '$(srcdir)/'`aiori-HDF5.c + +IOR-aiori-HDF5.obj: aiori-HDF5.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-HDF5.obj -MD -MP -MF $(DEPDIR)/IOR-aiori-HDF5.Tpo -c -o IOR-aiori-HDF5.obj `if test -f 'aiori-HDF5.c'; then $(CYGPATH_W) 'aiori-HDF5.c'; else $(CYGPATH_W) '$(srcdir)/aiori-HDF5.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-HDF5.Tpo $(DEPDIR)/IOR-aiori-HDF5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-HDF5.c' object='IOR-aiori-HDF5.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-HDF5.obj `if test -f 'aiori-HDF5.c'; then $(CYGPATH_W) 'aiori-HDF5.c'; else $(CYGPATH_W) '$(srcdir)/aiori-HDF5.c'; fi` + +IOR-aiori-NCMPI.o: aiori-NCMPI.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-NCMPI.o -MD -MP -MF $(DEPDIR)/IOR-aiori-NCMPI.Tpo -c -o IOR-aiori-NCMPI.o `test -f 'aiori-NCMPI.c' || echo '$(srcdir)/'`aiori-NCMPI.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-NCMPI.Tpo $(DEPDIR)/IOR-aiori-NCMPI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-NCMPI.c' object='IOR-aiori-NCMPI.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-NCMPI.o `test -f 'aiori-NCMPI.c' || echo '$(srcdir)/'`aiori-NCMPI.c + +IOR-aiori-NCMPI.obj: aiori-NCMPI.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -MT IOR-aiori-NCMPI.obj -MD -MP -MF $(DEPDIR)/IOR-aiori-NCMPI.Tpo -c -o IOR-aiori-NCMPI.obj `if test -f 'aiori-NCMPI.c'; then $(CYGPATH_W) 'aiori-NCMPI.c'; else $(CYGPATH_W) '$(srcdir)/aiori-NCMPI.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/IOR-aiori-NCMPI.Tpo $(DEPDIR)/IOR-aiori-NCMPI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-NCMPI.c' object='IOR-aiori-NCMPI.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(IOR_CFLAGS) $(CFLAGS) -c -o IOR-aiori-NCMPI.obj `if test -f 'aiori-NCMPI.c'; then $(CYGPATH_W) 'aiori-NCMPI.c'; else $(CYGPATH_W) '$(srcdir)/aiori-NCMPI.c'; fi` + +ior-ior.o: ior.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-ior.o -MD -MP -MF $(DEPDIR)/ior-ior.Tpo -c -o ior-ior.o `test -f 'ior.c' || echo '$(srcdir)/'`ior.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-ior.Tpo $(DEPDIR)/ior-ior.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ior.c' object='ior-ior.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-ior.o `test -f 'ior.c' || echo '$(srcdir)/'`ior.c + +ior-ior.obj: ior.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-ior.obj -MD -MP -MF $(DEPDIR)/ior-ior.Tpo -c -o ior-ior.obj `if test -f 'ior.c'; then $(CYGPATH_W) 'ior.c'; else $(CYGPATH_W) '$(srcdir)/ior.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-ior.Tpo $(DEPDIR)/ior-ior.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ior.c' object='ior-ior.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-ior.obj `if test -f 'ior.c'; then $(CYGPATH_W) 'ior.c'; else $(CYGPATH_W) '$(srcdir)/ior.c'; fi` + +ior-utilities.o: utilities.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-utilities.o -MD -MP -MF $(DEPDIR)/ior-utilities.Tpo -c -o ior-utilities.o `test -f 'utilities.c' || echo '$(srcdir)/'`utilities.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-utilities.Tpo $(DEPDIR)/ior-utilities.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities.c' object='ior-utilities.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-utilities.o `test -f 'utilities.c' || echo '$(srcdir)/'`utilities.c + +ior-utilities.obj: utilities.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-utilities.obj -MD -MP -MF $(DEPDIR)/ior-utilities.Tpo -c -o ior-utilities.obj `if test -f 'utilities.c'; then $(CYGPATH_W) 'utilities.c'; else $(CYGPATH_W) '$(srcdir)/utilities.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-utilities.Tpo $(DEPDIR)/ior-utilities.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='utilities.c' object='ior-utilities.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-utilities.obj `if test -f 'utilities.c'; then $(CYGPATH_W) 'utilities.c'; else $(CYGPATH_W) '$(srcdir)/utilities.c'; fi` + +ior-parse_options.o: parse_options.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-parse_options.o -MD -MP -MF $(DEPDIR)/ior-parse_options.Tpo -c -o ior-parse_options.o `test -f 'parse_options.c' || echo '$(srcdir)/'`parse_options.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-parse_options.Tpo $(DEPDIR)/ior-parse_options.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse_options.c' object='ior-parse_options.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-parse_options.o `test -f 'parse_options.c' || echo '$(srcdir)/'`parse_options.c + +ior-parse_options.obj: parse_options.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-parse_options.obj -MD -MP -MF $(DEPDIR)/ior-parse_options.Tpo -c -o ior-parse_options.obj `if test -f 'parse_options.c'; then $(CYGPATH_W) 'parse_options.c'; else $(CYGPATH_W) '$(srcdir)/parse_options.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-parse_options.Tpo $(DEPDIR)/ior-parse_options.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse_options.c' object='ior-parse_options.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-parse_options.obj `if test -f 'parse_options.c'; then $(CYGPATH_W) 'parse_options.c'; else $(CYGPATH_W) '$(srcdir)/parse_options.c'; fi` + +ior-aiori-POSIX.o: aiori-POSIX.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-POSIX.o -MD -MP -MF $(DEPDIR)/ior-aiori-POSIX.Tpo -c -o ior-aiori-POSIX.o `test -f 'aiori-POSIX.c' || echo '$(srcdir)/'`aiori-POSIX.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-POSIX.Tpo $(DEPDIR)/ior-aiori-POSIX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-POSIX.c' object='ior-aiori-POSIX.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-POSIX.o `test -f 'aiori-POSIX.c' || echo '$(srcdir)/'`aiori-POSIX.c + +ior-aiori-POSIX.obj: aiori-POSIX.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-POSIX.obj -MD -MP -MF $(DEPDIR)/ior-aiori-POSIX.Tpo -c -o ior-aiori-POSIX.obj `if test -f 'aiori-POSIX.c'; then $(CYGPATH_W) 'aiori-POSIX.c'; else $(CYGPATH_W) '$(srcdir)/aiori-POSIX.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-POSIX.Tpo $(DEPDIR)/ior-aiori-POSIX.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-POSIX.c' object='ior-aiori-POSIX.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-POSIX.obj `if test -f 'aiori-POSIX.c'; then $(CYGPATH_W) 'aiori-POSIX.c'; else $(CYGPATH_W) '$(srcdir)/aiori-POSIX.c'; fi` + +ior-aiori-MPIIO.o: aiori-MPIIO.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-MPIIO.o -MD -MP -MF $(DEPDIR)/ior-aiori-MPIIO.Tpo -c -o ior-aiori-MPIIO.o `test -f 'aiori-MPIIO.c' || echo '$(srcdir)/'`aiori-MPIIO.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-MPIIO.Tpo $(DEPDIR)/ior-aiori-MPIIO.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-MPIIO.c' object='ior-aiori-MPIIO.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-MPIIO.o `test -f 'aiori-MPIIO.c' || echo '$(srcdir)/'`aiori-MPIIO.c + +ior-aiori-MPIIO.obj: aiori-MPIIO.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-MPIIO.obj -MD -MP -MF $(DEPDIR)/ior-aiori-MPIIO.Tpo -c -o ior-aiori-MPIIO.obj `if test -f 'aiori-MPIIO.c'; then $(CYGPATH_W) 'aiori-MPIIO.c'; else $(CYGPATH_W) '$(srcdir)/aiori-MPIIO.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-MPIIO.Tpo $(DEPDIR)/ior-aiori-MPIIO.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-MPIIO.c' object='ior-aiori-MPIIO.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-MPIIO.obj `if test -f 'aiori-MPIIO.c'; then $(CYGPATH_W) 'aiori-MPIIO.c'; else $(CYGPATH_W) '$(srcdir)/aiori-MPIIO.c'; fi` + +ior-aiori-HDF5.o: aiori-HDF5.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-HDF5.o -MD -MP -MF $(DEPDIR)/ior-aiori-HDF5.Tpo -c -o ior-aiori-HDF5.o `test -f 'aiori-HDF5.c' || echo '$(srcdir)/'`aiori-HDF5.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-HDF5.Tpo $(DEPDIR)/ior-aiori-HDF5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-HDF5.c' object='ior-aiori-HDF5.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-HDF5.o `test -f 'aiori-HDF5.c' || echo '$(srcdir)/'`aiori-HDF5.c + +ior-aiori-HDF5.obj: aiori-HDF5.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-HDF5.obj -MD -MP -MF $(DEPDIR)/ior-aiori-HDF5.Tpo -c -o ior-aiori-HDF5.obj `if test -f 'aiori-HDF5.c'; then $(CYGPATH_W) 'aiori-HDF5.c'; else $(CYGPATH_W) '$(srcdir)/aiori-HDF5.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-HDF5.Tpo $(DEPDIR)/ior-aiori-HDF5.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-HDF5.c' object='ior-aiori-HDF5.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-HDF5.obj `if test -f 'aiori-HDF5.c'; then $(CYGPATH_W) 'aiori-HDF5.c'; else $(CYGPATH_W) '$(srcdir)/aiori-HDF5.c'; fi` + +ior-aiori-NCMPI.o: aiori-NCMPI.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-NCMPI.o -MD -MP -MF $(DEPDIR)/ior-aiori-NCMPI.Tpo -c -o ior-aiori-NCMPI.o `test -f 'aiori-NCMPI.c' || echo '$(srcdir)/'`aiori-NCMPI.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-NCMPI.Tpo $(DEPDIR)/ior-aiori-NCMPI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-NCMPI.c' object='ior-aiori-NCMPI.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-NCMPI.o `test -f 'aiori-NCMPI.c' || echo '$(srcdir)/'`aiori-NCMPI.c + +ior-aiori-NCMPI.obj: aiori-NCMPI.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -MT ior-aiori-NCMPI.obj -MD -MP -MF $(DEPDIR)/ior-aiori-NCMPI.Tpo -c -o ior-aiori-NCMPI.obj `if test -f 'aiori-NCMPI.c'; then $(CYGPATH_W) 'aiori-NCMPI.c'; else $(CYGPATH_W) '$(srcdir)/aiori-NCMPI.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ior-aiori-NCMPI.Tpo $(DEPDIR)/ior-aiori-NCMPI.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='aiori-NCMPI.c' object='ior-aiori-NCMPI.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ior_CFLAGS) $(CFLAGS) -c -o ior-aiori-NCMPI.obj `if test -f 'aiori-NCMPI.c'; then $(CYGPATH_W) 'aiori-NCMPI.c'; else $(CYGPATH_W) '$(srcdir)/aiori-NCMPI.c'; fi` + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(PROGRAMS) config.h +installdirs: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ + done +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-binPROGRAMS clean-generic mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +distclean-am: clean-am distclean-compile distclean-generic \ + distclean-hdr distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: install-binPROGRAMS + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -rf ./$(DEPDIR) + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-compile mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-binPROGRAMS + +.MAKE: all install-am install-strip + +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ + clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \ + distclean distclean-compile distclean-generic distclean-hdr \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-binPROGRAMS + +.PRECIOUS: Makefile + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/microbenchmarks/ior/src/aiori-HDF5.c b/microbenchmarks/ior/src/aiori-HDF5.c new file mode 100644 index 00000000..2f222f08 --- /dev/null +++ b/microbenchmarks/ior/src/aiori-HDF5.c @@ -0,0 +1,567 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Implement abstract I/O interface for HDF5. +* +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include /* only for fprintf() */ +#include +#include +#include +#include + +#include "aiori.h" /* abstract IOR interface */ +#include "utilities.h" +#include "iordef.h" + +#define NUM_DIMS 1 /* number of dimensions to data set */ + +/******************************************************************************/ +/* + * HDF5_CHECK will display a custom error message and then exit the program + */ + +/* + * should use MPI_Abort(), not exit(), in this macro; some versions of + * MPI, however, hang with HDF5 property lists et al. left unclosed + */ + +/* + * for versions later than hdf5-1.6, the H5Eget_[major|minor]() functions + * have been deprecated and replaced with H5Eget_msg() + */ +#if H5_VERS_MAJOR > 1 && H5_VERS_MINOR > 6 +#define HDF5_CHECK(HDF5_RETURN, MSG) do { \ + char resultString[1024]; \ + \ + if (HDF5_RETURN < 0) { \ + fprintf(stdout, "** error **\n"); \ + fprintf(stdout, "ERROR in %s (line %d): %s.\n", \ + __FILE__, __LINE__, MSG); \ + strcpy(resultString, H5Eget_major((H5E_major_t)HDF5_RETURN)); \ + if (strcmp(resultString, "Invalid major error number") != 0) \ + fprintf(stdout, "HDF5 %s\n", resultString); \ + strcpy(resultString, H5Eget_minor((H5E_minor_t)HDF5_RETURN)); \ + if (strcmp(resultString, "Invalid minor error number") != 0) \ + fprintf(stdout, "%s\n", resultString); \ + fprintf(stdout, "** exiting **\n"); \ + exit(-1); \ + } \ +} while(0) +#else /* ! (H5_VERS_MAJOR > 1 && H5_VERS_MINOR > 6) */ +#define HDF5_CHECK(HDF5_RETURN, MSG) do { \ + char resultString[1024]; \ + \ + if (HDF5_RETURN < 0) { \ + fprintf(stdout, "** error **\n"); \ + fprintf(stdout, "ERROR in %s (line %d): %s.\n", \ + __FILE__, __LINE__, MSG); \ + /* \ + * H5Eget_msg(hid_t mesg_id, H5E_type_t* mesg_type, \ + * char* mesg, size_t size) \ + */ \ + fprintf(stdout, "** exiting **\n"); \ + exit(-1); \ + } \ +} while(0) +#endif /* H5_VERS_MAJOR > 1 && H5_VERS_MINOR > 6 */ +/**************************** P R O T O T Y P E S *****************************/ + +static IOR_offset_t SeekOffset(void *, IOR_offset_t, IOR_param_t *); +static void SetupDataSet(void *, IOR_param_t *); +static void *HDF5_Create(char *, IOR_param_t *); +static void *HDF5_Open(char *, IOR_param_t *); +static IOR_offset_t HDF5_Xfer(int, void *, IOR_size_t *, + IOR_offset_t, IOR_param_t *); +static void HDF5_Close(void *, IOR_param_t *); +static void HDF5_Delete(char *, IOR_param_t *); +static void HDF5_SetVersion(IOR_param_t *); +static void HDF5_Fsync(void *, IOR_param_t *); +static IOR_offset_t HDF5_GetFileSize(IOR_param_t *, MPI_Comm, char *); + +/************************** D E C L A R A T I O N S ***************************/ + +ior_aiori_t hdf5_aiori = { + "HDF5", + HDF5_Create, + HDF5_Open, + HDF5_Xfer, + HDF5_Close, + HDF5_Delete, + HDF5_SetVersion, + HDF5_Fsync, + HDF5_GetFileSize +}; + +static hid_t xferPropList; /* xfer property list */ +hid_t dataSet; /* data set id */ +hid_t dataSpace; /* data space id */ +hid_t fileDataSpace; /* file data space id */ +hid_t memDataSpace; /* memory data space id */ +int newlyOpenedFile; /* newly opened file */ + +/***************************** F U N C T I O N S ******************************/ + +/* + * Create and open a file through the HDF5 interface. + */ +static void *HDF5_Create(char *testFileName, IOR_param_t * param) +{ + return HDF5_Open(testFileName, param); +} + +/* + * Open a file through the HDF5 interface. + */ +static void *HDF5_Open(char *testFileName, IOR_param_t * param) +{ + hid_t accessPropList, createPropList; + hsize_t memStart[NUM_DIMS], + dataSetDims[NUM_DIMS], + memStride[NUM_DIMS], + memCount[NUM_DIMS], memBlock[NUM_DIMS], memDataSpaceDims[NUM_DIMS]; + int tasksPerDataSet; + unsigned fd_mode = (unsigned)0; + hid_t *fd; + MPI_Comm comm; + MPI_Info mpiHints = MPI_INFO_NULL; + + fd = (hid_t *) malloc(sizeof(hid_t)); + if (fd == NULL) + ERR("malloc() failed"); + /* + * HDF5 uses different flags than those for POSIX/MPIIO + */ + if (param->open == WRITE) { /* WRITE flags */ + param->openFlags = IOR_TRUNC; + } else { /* READ or check WRITE/READ flags */ + param->openFlags = IOR_RDONLY; + } + + /* set IOR file flags to HDF5 flags */ + /* -- file open flags -- */ + if (param->openFlags & IOR_RDONLY) { + fd_mode |= H5F_ACC_RDONLY; + } + if (param->openFlags & IOR_WRONLY) { + fprintf(stdout, "File write only not implemented in HDF5\n"); + } + if (param->openFlags & IOR_RDWR) { + fd_mode |= H5F_ACC_RDWR; + } + if (param->openFlags & IOR_APPEND) { + fprintf(stdout, "File append not implemented in HDF5\n"); + } + if (param->openFlags & IOR_CREAT) { + fd_mode |= H5F_ACC_CREAT; + } + if (param->openFlags & IOR_EXCL) { + fd_mode |= H5F_ACC_EXCL; + } + if (param->openFlags & IOR_TRUNC) { + fd_mode |= H5F_ACC_TRUNC; + } + if (param->openFlags & IOR_DIRECT) { + fprintf(stdout, "O_DIRECT not implemented in HDF5\n"); + } + + /* set up file creation property list */ + createPropList = H5Pcreate(H5P_FILE_CREATE); + HDF5_CHECK(createPropList, "cannot create file creation property list"); + /* set size of offset and length used to address HDF5 objects */ + HDF5_CHECK(H5Pset_sizes + (createPropList, sizeof(hsize_t), sizeof(hsize_t)), + "cannot set property list properly"); + + /* set up file access property list */ + accessPropList = H5Pcreate(H5P_FILE_ACCESS); + HDF5_CHECK(accessPropList, "cannot create file access property list"); + + /* + * someday HDF5 implementation will allow subsets of MPI_COMM_WORLD + */ + /* store MPI communicator info for the file access property list */ + if (param->filePerProc) { + comm = MPI_COMM_SELF; + } else { + comm = testComm; + } + + SetHints(&mpiHints, param->hintsFileName); + /* + * note that with MP_HINTS_FILTERED=no, all key/value pairs will + * be in the info object. The info object that is attached to + * the file during MPI_File_open() will only contain those pairs + * deemed valid by the implementation. + */ + /* show hints passed to file */ + if (rank == 0 && param->showHints) { + fprintf(stdout, "\nhints passed to access property list {\n"); + ShowHints(&mpiHints); + fprintf(stdout, "}\n"); + } + HDF5_CHECK(H5Pset_fapl_mpio(accessPropList, comm, mpiHints), + "cannot set file access property list"); + + /* set alignment */ + HDF5_CHECK(H5Pset_alignment(accessPropList, param->setAlignment, + param->setAlignment), + "cannot set alignment"); + + /* open file */ + if (param->open == WRITE) { /* WRITE */ + *fd = H5Fcreate(testFileName, fd_mode, + createPropList, accessPropList); + HDF5_CHECK(*fd, "cannot create file"); + } else { /* READ or CHECK */ + *fd = H5Fopen(testFileName, fd_mode, accessPropList); + HDF5_CHECK(*fd, "cannot open file"); + } + + /* show hints actually attached to file handle */ + if (param->showHints || (1) /* WEL - this needs fixing */ ) { + if (rank == 0 + && (param->showHints) /* WEL - this needs fixing */ ) { + WARN("showHints not working for HDF5"); + } + } else { + MPI_Info mpiHintsCheck = MPI_INFO_NULL; + hid_t apl; + apl = H5Fget_access_plist(*fd); + HDF5_CHECK(H5Pget_fapl_mpio(apl, &comm, &mpiHintsCheck), + "cannot get info object through HDF5"); + if (rank == 0) { + fprintf(stdout, + "\nhints returned from opened file (HDF5) {\n"); + ShowHints(&mpiHintsCheck); + fprintf(stdout, "}\n"); + if (1 == 1) { /* request the MPIIO file handle and its hints */ + MPI_File *fd_mpiio; + HDF5_CHECK(H5Fget_vfd_handle + (*fd, apl, (void **)&fd_mpiio), + "cannot get MPIIO file handle"); + MPI_CHECK(MPI_File_get_info + (*fd_mpiio, &mpiHintsCheck), + "cannot get info object through MPIIO"); + fprintf(stdout, + "\nhints returned from opened file (MPIIO) {\n"); + ShowHints(&mpiHintsCheck); + fprintf(stdout, "}\n"); + } + } + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + } + + /* this is necessary for resetting various parameters + needed for reopening and checking the file */ + newlyOpenedFile = TRUE; + + HDF5_CHECK(H5Pclose(createPropList), + "cannot close creation property list"); + HDF5_CHECK(H5Pclose(accessPropList), + "cannot close access property list"); + + /* create property list for serial/parallel access */ + xferPropList = H5Pcreate(H5P_DATASET_XFER); + HDF5_CHECK(xferPropList, "cannot create transfer property list"); + + /* set data transfer mode */ + if (param->collective) { + HDF5_CHECK(H5Pset_dxpl_mpio(xferPropList, H5FD_MPIO_COLLECTIVE), + "cannot set collective data transfer mode"); + } else { + HDF5_CHECK(H5Pset_dxpl_mpio + (xferPropList, H5FD_MPIO_INDEPENDENT), + "cannot set independent data transfer mode"); + } + + /* set up memory data space for transfer */ + memStart[0] = (hsize_t) 0; + memCount[0] = (hsize_t) 1; + memStride[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t)); + memBlock[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t)); + memDataSpaceDims[0] = (hsize_t) param->transferSize; + memDataSpace = H5Screate_simple(NUM_DIMS, memDataSpaceDims, NULL); + HDF5_CHECK(memDataSpace, "cannot create simple memory data space"); + + /* define hyperslab for memory data space */ + HDF5_CHECK(H5Sselect_hyperslab(memDataSpace, H5S_SELECT_SET, + memStart, memStride, memCount, + memBlock), "cannot create hyperslab"); + + /* set up parameters for fpp or different dataset count */ + if (param->filePerProc) { + tasksPerDataSet = 1; + } else { + if (param->individualDataSets) { + /* each task in segment has single data set */ + tasksPerDataSet = 1; + } else { + /* share single data set across all tasks in segment */ + tasksPerDataSet = param->numTasks; + } + } + dataSetDims[0] = (hsize_t) ((param->blockSize / sizeof(IOR_size_t)) + * tasksPerDataSet); + + /* create a simple data space containing information on size + and shape of data set, and open it for access */ + dataSpace = H5Screate_simple(NUM_DIMS, dataSetDims, NULL); + HDF5_CHECK(dataSpace, "cannot create simple data space"); + + return (fd); +} + +/* + * Write or read access to file using the HDF5 interface. + */ +static IOR_offset_t HDF5_Xfer(int access, void *fd, IOR_size_t * buffer, + IOR_offset_t length, IOR_param_t * param) +{ + static int firstReadCheck = FALSE, startNewDataSet; + IOR_offset_t segmentPosition, segmentSize; + + /* + * this toggle is for the read check operation, which passes through + * this function twice; note that this function will open a data set + * only on the first read check and close only on the second + */ + if (access == READCHECK) { + if (firstReadCheck == TRUE) { + firstReadCheck = FALSE; + } else { + firstReadCheck = TRUE; + } + } + + /* determine by offset if need to start new data set */ + if (param->filePerProc == TRUE) { + segmentPosition = (IOR_offset_t) 0; + segmentSize = param->blockSize; + } else { + segmentPosition = + (IOR_offset_t) ((rank + rankOffset) % param->numTasks) + * param->blockSize; + segmentSize = + (IOR_offset_t) (param->numTasks) * param->blockSize; + } + if ((IOR_offset_t) ((param->offset - segmentPosition) % segmentSize) == + 0) { + /* + * ordinarily start a new data set, unless this is the + * second pass through during a read check + */ + startNewDataSet = TRUE; + if (access == READCHECK && firstReadCheck != TRUE) { + startNewDataSet = FALSE; + } + } + + /* create new data set */ + if (startNewDataSet == TRUE) { + /* if just opened this file, no data set to close yet */ + if (newlyOpenedFile != TRUE) { + HDF5_CHECK(H5Dclose(dataSet), "cannot close data set"); + HDF5_CHECK(H5Sclose(fileDataSpace), + "cannot close file data space"); + } + SetupDataSet(fd, param); + } + + SeekOffset(fd, param->offset, param); + + /* this is necessary to reset variables for reaccessing file */ + startNewDataSet = FALSE; + newlyOpenedFile = FALSE; + + /* access the file */ + if (access == WRITE) { /* WRITE */ + HDF5_CHECK(H5Dwrite(dataSet, H5T_NATIVE_LLONG, + memDataSpace, fileDataSpace, + xferPropList, buffer), + "cannot write to data set"); + } else { /* READ or CHECK */ + HDF5_CHECK(H5Dread(dataSet, H5T_NATIVE_LLONG, + memDataSpace, fileDataSpace, + xferPropList, buffer), + "cannot read from data set"); + } + return (length); +} + +/* + * Perform fsync(). + */ +static void HDF5_Fsync(void *fd, IOR_param_t * param) +{ + ; +} + +/* + * Close a file through the HDF5 interface. + */ +static void HDF5_Close(void *fd, IOR_param_t * param) +{ + if (param->fd_fppReadCheck == NULL) { + HDF5_CHECK(H5Dclose(dataSet), "cannot close data set"); + HDF5_CHECK(H5Sclose(dataSpace), "cannot close data space"); + HDF5_CHECK(H5Sclose(fileDataSpace), + "cannot close file data space"); + HDF5_CHECK(H5Sclose(memDataSpace), + "cannot close memory data space"); + HDF5_CHECK(H5Pclose(xferPropList), + " cannot close transfer property list"); + } + HDF5_CHECK(H5Fclose(*(hid_t *) fd), "cannot close file"); + free(fd); +} + +/* + * Delete a file through the HDF5 interface. + */ +static void HDF5_Delete(char *testFileName, IOR_param_t * param) +{ + if (unlink(testFileName) != 0) + WARN("cannot delete file"); +} + +/* + * Determine api version. + */ +static void HDF5_SetVersion(IOR_param_t * test) +{ + unsigned major, minor, release; + if (H5get_libversion(&major, &minor, &release) < 0) { + WARN("cannot get HDF5 library version"); + } else { + sprintf(test->apiVersion, "%s-%u.%u.%u", + test->api, major, minor, release); + } +#ifndef H5_HAVE_PARALLEL + strcat(test->apiVersion, " (Serial)"); +#else /* H5_HAVE_PARALLEL */ + strcat(test->apiVersion, " (Parallel)"); +#endif /* not H5_HAVE_PARALLEL */ +} + +/* + * Seek to offset in file using the HDF5 interface and set up hyperslab. + */ +static IOR_offset_t SeekOffset(void *fd, IOR_offset_t offset, + IOR_param_t * param) +{ + IOR_offset_t segmentSize; + hsize_t hsStride[NUM_DIMS], hsCount[NUM_DIMS], hsBlock[NUM_DIMS]; + hsize_t hsStart[NUM_DIMS]; + + if (param->filePerProc == TRUE) { + segmentSize = (IOR_offset_t) param->blockSize; + } else { + segmentSize = + (IOR_offset_t) (param->numTasks) * param->blockSize; + } + + /* create a hyperslab representing the file data space */ + if (param->individualDataSets) { + /* start at zero offset if not */ + hsStart[0] = (hsize_t) ((offset % param->blockSize) + / sizeof(IOR_size_t)); + } else { + /* start at a unique offset if shared */ + hsStart[0] = + (hsize_t) ((offset % segmentSize) / sizeof(IOR_size_t)); + } + hsCount[0] = (hsize_t) 1; + hsStride[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t)); + hsBlock[0] = (hsize_t) (param->transferSize / sizeof(IOR_size_t)); + + /* retrieve data space from data set for hyperslab */ + fileDataSpace = H5Dget_space(dataSet); + HDF5_CHECK(fileDataSpace, "cannot get data space from data set"); + HDF5_CHECK(H5Sselect_hyperslab(fileDataSpace, H5S_SELECT_SET, + hsStart, hsStride, hsCount, hsBlock), + "cannot select hyperslab"); + return (offset); +} + +/* + * Create HDF5 data set. + */ +static void SetupDataSet(void *fd, IOR_param_t * param) +{ + char dataSetName[MAX_STR]; + hid_t dataSetPropList; + int dataSetID; + static int dataSetSuffix = 0; + + /* may want to use an extendable dataset (H5S_UNLIMITED) someday */ + /* may want to use a chunked dataset (H5S_CHUNKED) someday */ + + /* need to reset suffix counter if newly-opened file */ + if (newlyOpenedFile) + dataSetSuffix = 0; + + /* may want to use individual access to each data set someday */ + if (param->individualDataSets) { + dataSetID = (rank + rankOffset) % param->numTasks; + } else { + dataSetID = 0; + } + + sprintf(dataSetName, "%s-%04d.%04d", "Dataset", dataSetID, + dataSetSuffix++); + + if (param->open == WRITE) { /* WRITE */ + /* create data set */ + dataSetPropList = H5Pcreate(H5P_DATASET_CREATE); + /* check if hdf5 available */ +#if defined (H5_VERS_MAJOR) && defined (H5_VERS_MINOR) + /* no-fill option not available until hdf5-1.6.x */ +#if (H5_VERS_MAJOR > 0 && H5_VERS_MINOR > 5) + if (param->noFill == TRUE) { + if (rank == 0 && verbose >= VERBOSE_1) { + fprintf(stdout, "\nusing 'no fill' option\n"); + } + HDF5_CHECK(H5Pset_fill_time(dataSetPropList, + H5D_FILL_TIME_NEVER), + "cannot set fill time for property list"); + } +#else + char errorString[MAX_STR]; + sprintf(errorString, "'no fill' option not available in %s", + test->apiVersion); + ERR(errorString); +#endif +#else + WARN("unable to determine HDF5 version for 'no fill' usage"); +#endif + dataSet = + H5Dcreate(*(hid_t *) fd, dataSetName, H5T_NATIVE_LLONG, + dataSpace, dataSetPropList); + HDF5_CHECK(dataSet, "cannot create data set"); + } else { /* READ or CHECK */ + dataSet = H5Dopen(*(hid_t *) fd, dataSetName); + HDF5_CHECK(dataSet, "cannot create data set"); + } +} + +/* + * Use MPIIO call to get file size. + */ +static IOR_offset_t +HDF5_GetFileSize(IOR_param_t * test, MPI_Comm testComm, char *testFileName) +{ + return (MPIIO_GetFileSize(test, testComm, testFileName)); +} diff --git a/microbenchmarks/ior/src/aiori-MPIIO.c b/microbenchmarks/ior/src/aiori-MPIIO.c new file mode 100644 index 00000000..4920f6d6 --- /dev/null +++ b/microbenchmarks/ior/src/aiori-MPIIO.c @@ -0,0 +1,462 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Implement abstract I/O interface for MPIIO. +* +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include + +#include "ior.h" +#include "iordef.h" +#include "aiori.h" +#include "utilities.h" + +#ifndef MPIAPI +#define MPIAPI /* defined as __stdcall on Windows */ +#endif + +/**************************** P R O T O T Y P E S *****************************/ + +static IOR_offset_t SeekOffset(MPI_File, IOR_offset_t, IOR_param_t *); + +static void *MPIIO_Create(char *, IOR_param_t *); +static void *MPIIO_Open(char *, IOR_param_t *); +static IOR_offset_t MPIIO_Xfer(int, void *, IOR_size_t *, + IOR_offset_t, IOR_param_t *); +static void MPIIO_Close(void *, IOR_param_t *); +static void MPIIO_Delete(char *, IOR_param_t *); +static void MPIIO_SetVersion(IOR_param_t *); +static void MPIIO_Fsync(void *, IOR_param_t *); + +/************************** D E C L A R A T I O N S ***************************/ + +ior_aiori_t mpiio_aiori = { + "MPIIO", + MPIIO_Create, + MPIIO_Open, + MPIIO_Xfer, + MPIIO_Close, + MPIIO_Delete, + MPIIO_SetVersion, + MPIIO_Fsync, + MPIIO_GetFileSize +}; + +/***************************** F U N C T I O N S ******************************/ + +/* + * Create and open a file through the MPIIO interface. + */ +static void *MPIIO_Create(char *testFileName, IOR_param_t * param) +{ + return MPIIO_Open(testFileName, param); +} + +/* + * Open a file through the MPIIO interface. Setup file view. + */ +static void *MPIIO_Open(char *testFileName, IOR_param_t * param) +{ + int fd_mode = (int)0, + offsetFactor, + tasksPerFile, + transfersPerBlock = param->blockSize / param->transferSize; + struct fileTypeStruct { + int globalSizes[2], localSizes[2], startIndices[2]; + } fileTypeStruct; + MPI_File *fd; + MPI_Comm comm; + MPI_Info mpiHints = MPI_INFO_NULL; + + fd = (MPI_File *) malloc(sizeof(MPI_File)); + if (fd == NULL) + ERR("malloc failed()"); + + *fd = 0; + + /* set IOR file flags to MPIIO flags */ + /* -- file open flags -- */ + if (param->openFlags & IOR_RDONLY) { + fd_mode |= MPI_MODE_RDONLY; + } + if (param->openFlags & IOR_WRONLY) { + fd_mode |= MPI_MODE_WRONLY; + } + if (param->openFlags & IOR_RDWR) { + fd_mode |= MPI_MODE_RDWR; + } + if (param->openFlags & IOR_APPEND) { + fd_mode |= MPI_MODE_APPEND; + } + if (param->openFlags & IOR_CREAT) { + fd_mode |= MPI_MODE_CREATE; + } + if (param->openFlags & IOR_EXCL) { + fd_mode |= MPI_MODE_EXCL; + } + if (param->openFlags & IOR_TRUNC) { + fprintf(stdout, "File truncation not implemented in MPIIO\n"); + } + if (param->openFlags & IOR_DIRECT) { + fprintf(stdout, "O_DIRECT not implemented in MPIIO\n"); + } + + /* + * MPI_MODE_UNIQUE_OPEN mode optimization eliminates the overhead of file + * locking. Only open a file in this mode when the file will not be con- + * currently opened elsewhere, either inside or outside the MPI environment. + */ + fd_mode |= MPI_MODE_UNIQUE_OPEN; + + if (param->filePerProc) { + comm = MPI_COMM_SELF; + } else { + comm = testComm; + } + + SetHints(&mpiHints, param->hintsFileName); + /* + * note that with MP_HINTS_FILTERED=no, all key/value pairs will + * be in the info object. The info object that is attached to + * the file during MPI_File_open() will only contain those pairs + * deemed valid by the implementation. + */ + /* show hints passed to file */ + if (rank == 0 && param->showHints) { + fprintf(stdout, "\nhints passed to MPI_File_open() {\n"); + ShowHints(&mpiHints); + fprintf(stdout, "}\n"); + } + MPI_CHECK(MPI_File_open(comm, testFileName, fd_mode, mpiHints, fd), + "cannot open file"); + + /* show hints actually attached to file handle */ + if (rank == 0 && param->showHints) { + MPI_CHECK(MPI_File_get_info(*fd, &mpiHints), + "cannot get file info"); + fprintf(stdout, "\nhints returned from opened file {\n"); + ShowHints(&mpiHints); + fprintf(stdout, "}\n"); + } + + /* preallocate space for file */ + if (param->preallocate && param->open == WRITE) { + MPI_CHECK(MPI_File_preallocate(*fd, + (MPI_Offset) (param->segmentCount + * + param->blockSize * + param->numTasks)), + "cannot preallocate file"); + } + /* create file view */ + if (param->useFileView) { + /* create contiguous transfer datatype */ + MPI_CHECK(MPI_Type_contiguous + (param->transferSize / sizeof(IOR_size_t), + MPI_LONG_LONG_INT, ¶m->transferType), + "cannot create contiguous datatype"); + MPI_CHECK(MPI_Type_commit(¶m->transferType), + "cannot commit datatype"); + if (param->filePerProc) { + offsetFactor = 0; + tasksPerFile = 1; + } else { + offsetFactor = (rank + rankOffset) % param->numTasks; + tasksPerFile = param->numTasks; + } + + /* + * create file type using subarray + */ + fileTypeStruct.globalSizes[0] = 1; + fileTypeStruct.globalSizes[1] = + transfersPerBlock * tasksPerFile; + fileTypeStruct.localSizes[0] = 1; + fileTypeStruct.localSizes[1] = transfersPerBlock; + fileTypeStruct.startIndices[0] = 0; + fileTypeStruct.startIndices[1] = + transfersPerBlock * offsetFactor; + + MPI_CHECK(MPI_Type_create_subarray + (2, fileTypeStruct.globalSizes, + fileTypeStruct.localSizes, + fileTypeStruct.startIndices, MPI_ORDER_C, + param->transferType, ¶m->fileType), + "cannot create subarray"); + MPI_CHECK(MPI_Type_commit(¶m->fileType), + "cannot commit datatype"); + + MPI_CHECK(MPI_File_set_view(*fd, (MPI_Offset) 0, + param->transferType, + param->fileType, "native", + (MPI_Info) MPI_INFO_NULL), + "cannot set file view"); + } + return ((void *)fd); +} + +/* + * Write or read access to file using the MPIIO interface. + */ +static IOR_offset_t MPIIO_Xfer(int access, void *fd, IOR_size_t * buffer, + IOR_offset_t length, IOR_param_t * param) +{ + int (MPIAPI * Access) (MPI_File, void *, int, + MPI_Datatype, MPI_Status *); + int (MPIAPI * Access_at) (MPI_File, MPI_Offset, void *, int, + MPI_Datatype, MPI_Status *); + int (MPIAPI * Access_all) (MPI_File, void *, int, + MPI_Datatype, MPI_Status *); + int (MPIAPI * Access_at_all) (MPI_File, MPI_Offset, void *, int, + MPI_Datatype, MPI_Status *); + /* + * this needs to be properly implemented: + * + * int (*Access_ordered)(MPI_File, void *, int, + * MPI_Datatype, MPI_Status *); + */ + MPI_Status status; + + /* point functions to appropriate MPIIO calls */ + if (access == WRITE) { /* WRITE */ + Access = MPI_File_write; + Access_at = MPI_File_write_at; + Access_all = MPI_File_write_all; + Access_at_all = MPI_File_write_at_all; + /* + * this needs to be properly implemented: + * + * Access_ordered = MPI_File_write_ordered; + */ + } else { /* READ or CHECK */ + Access = MPI_File_read; + Access_at = MPI_File_read_at; + Access_all = MPI_File_read_all; + Access_at_all = MPI_File_read_at_all; + /* + * this needs to be properly implemented: + * + * Access_ordered = MPI_File_read_ordered; + */ + } + + /* + * 'useFileView' uses derived datatypes and individual file pointers + */ + if (param->useFileView) { + /* find offset in file */ + if (SeekOffset(*(MPI_File *) fd, param->offset, param) < + 0) { + /* if unsuccessful */ + length = -1; + } else { + /* + * 'useStridedDatatype' fits multi-strided pattern into a datatype; + * must use 'length' to determine repetitions (fix this for + * multi-segments someday, WEL): + * e.g., 'IOR -s 2 -b 32K -t 32K -a MPIIO -S' + */ + if (param->useStridedDatatype) { + length = param->segmentCount; + } else { + length = 1; + } + if (param->collective) { + /* individual, collective call */ + MPI_CHECK(Access_all + (*(MPI_File *) fd, buffer, length, + param->transferType, &status), + "cannot access collective"); + } else { + /* individual, noncollective call */ + MPI_CHECK(Access + (*(MPI_File *) fd, buffer, length, + param->transferType, &status), + "cannot access noncollective"); + } + length *= param->transferSize; /* for return value in bytes */ + } + } else { + /* + * !useFileView does not use derived datatypes, but it uses either + * shared or explicit file pointers + */ + if (param->useSharedFilePointer) { + /* find offset in file */ + if (SeekOffset + (*(MPI_File *) fd, param->offset, param) < 0) { + /* if unsuccessful */ + length = -1; + } else { + /* shared, collective call */ + /* + * this needs to be properly implemented: + * + * MPI_CHECK(Access_ordered(fd.MPIIO, buffer, length, + * MPI_BYTE, &status), + * "cannot access shared, collective"); + */ + fprintf(stdout, + "useSharedFilePointer not implemented\n"); + } + } else { + if (param->collective) { + /* explicit, collective call */ + MPI_CHECK(Access_at_all + (*(MPI_File *) fd, param->offset, + buffer, length, MPI_BYTE, &status), + "cannot access explicit, collective"); + } else { + /* explicit, noncollective call */ + MPI_CHECK(Access_at + (*(MPI_File *) fd, param->offset, + buffer, length, MPI_BYTE, &status), + "cannot access explicit, noncollective"); + } + } + } + return (length); +} + +/* + * Perform fsync(). + */ +static void MPIIO_Fsync(void *fd, IOR_param_t * param) +{ + ; +} + +/* + * Close a file through the MPIIO interface. + */ +static void MPIIO_Close(void *fd, IOR_param_t * param) +{ + MPI_CHECK(MPI_File_close((MPI_File *) fd), "cannot close file"); + if ((param->useFileView == TRUE) && (param->fd_fppReadCheck == NULL)) { + /* + * need to free the datatype, so done in the close process + */ + MPI_CHECK(MPI_Type_free(¶m->fileType), + "cannot free MPI file datatype"); + MPI_CHECK(MPI_Type_free(¶m->transferType), + "cannot free MPI transfer datatype"); + } + free(fd); +} + +/* + * Delete a file through the MPIIO interface. + */ +static void MPIIO_Delete(char *testFileName, IOR_param_t * param) +{ + MPI_CHECK(MPI_File_delete(testFileName, (MPI_Info) MPI_INFO_NULL), + "cannot delete file"); +} + +/* + * Determine api version. + */ +static void MPIIO_SetVersion(IOR_param_t * test) +{ + int version, subversion; + MPI_CHECK(MPI_Get_version(&version, &subversion), + "cannot get MPI version"); + sprintf(test->apiVersion, "%s (version=%d, subversion=%d)", + test->api, version, subversion); +} + +/* + * Seek to offset in file using the MPIIO interface. + */ +static IOR_offset_t SeekOffset(MPI_File fd, IOR_offset_t offset, + IOR_param_t * param) +{ + int offsetFactor, tasksPerFile; + IOR_offset_t tempOffset; + + tempOffset = offset; + + if (param->filePerProc) { + offsetFactor = 0; + tasksPerFile = 1; + } else { + offsetFactor = (rank + rankOffset) % param->numTasks; + tasksPerFile = param->numTasks; + } + if (param->useFileView) { + /* recall that offsets in a file view are + counted in units of transfer size */ + if (param->filePerProc) { + tempOffset = tempOffset / param->transferSize; + } else { + /* + * this formula finds a file view offset for a task + * from an absolute offset + */ + tempOffset = ((param->blockSize / param->transferSize) + * (tempOffset / + (param->blockSize * tasksPerFile))) + + (((tempOffset % (param->blockSize * tasksPerFile)) + - (offsetFactor * param->blockSize)) + / param->transferSize); + } + } + MPI_CHECK(MPI_File_seek(fd, tempOffset, MPI_SEEK_SET), + "cannot seek offset"); + return (offset); +} + +/* + * Use MPI_File_get_size() to return aggregate file size. + * NOTE: This function is used by the HDF5 and NCMPI backends. + */ +IOR_offset_t MPIIO_GetFileSize(IOR_param_t * test, MPI_Comm testComm, + char *testFileName) +{ + IOR_offset_t aggFileSizeFromStat, tmpMin, tmpMax, tmpSum; + MPI_File fd; + + MPI_CHECK(MPI_File_open(testComm, testFileName, MPI_MODE_RDONLY, + MPI_INFO_NULL, &fd), + "cannot open file to get file size"); + MPI_CHECK(MPI_File_get_size(fd, (MPI_Offset *) & aggFileSizeFromStat), + "cannot get file size"); + MPI_CHECK(MPI_File_close(&fd), "cannot close file"); + + if (test->filePerProc == TRUE) { + MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpSum, 1, + MPI_LONG_LONG_INT, MPI_SUM, testComm), + "cannot total data moved"); + aggFileSizeFromStat = tmpSum; + } else { + MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpMin, 1, + MPI_LONG_LONG_INT, MPI_MIN, testComm), + "cannot total data moved"); + MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpMax, 1, + MPI_LONG_LONG_INT, MPI_MAX, testComm), + "cannot total data moved"); + if (tmpMin != tmpMax) { + if (rank == 0) { + WARN("inconsistent file size by different tasks"); + } + /* incorrect, but now consistent across tasks */ + aggFileSizeFromStat = tmpMin; + } + } + + return (aggFileSizeFromStat); +} diff --git a/microbenchmarks/ior/src/aiori-NCMPI.c b/microbenchmarks/ior/src/aiori-NCMPI.c new file mode 100644 index 00000000..e3e678fc --- /dev/null +++ b/microbenchmarks/ior/src/aiori-NCMPI.c @@ -0,0 +1,392 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Implement abstract I/O interface for Parallel NetCDF (NCMPI). +* +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include + +#include "ior.h" +#include "iordef.h" +#include "aiori.h" +#include "utilities.h" + +#define NUM_DIMS 3 /* number of dimensions to data set */ + +/* + * NCMPI_CHECK will display a custom error message and then exit the program + */ +#define NCMPI_CHECK(NCMPI_RETURN, MSG) do { \ + char resultString[1024]; \ + \ + if (NCMPI_RETURN < 0) { \ + fprintf(stdout, "** error **\n"); \ + fprintf(stdout, "ERROR in %s (line %d): %s.\n", \ + __FILE__, __LINE__, MSG); \ + fprintf(stdout, "ERROR: %s.\n", ncmpi_strerror(NCMPI_RETURN)); \ + fprintf(stdout, "** exiting **\n"); \ + exit(-1); \ + } \ +} while(0) + +/**************************** P R O T O T Y P E S *****************************/ + +static int GetFileMode(IOR_param_t *); + +static void *NCMPI_Create(char *, IOR_param_t *); +static void *NCMPI_Open(char *, IOR_param_t *); +static IOR_offset_t NCMPI_Xfer(int, void *, IOR_size_t *, + IOR_offset_t, IOR_param_t *); +static void NCMPI_Close(void *, IOR_param_t *); +static void NCMPI_Delete(char *, IOR_param_t *); +static void NCMPI_SetVersion(IOR_param_t *); +static void NCMPI_Fsync(void *, IOR_param_t *); +static IOR_offset_t NCMPI_GetFileSize(IOR_param_t *, MPI_Comm, char *); + +/************************** D E C L A R A T I O N S ***************************/ + +ior_aiori_t ncmpi_aiori = { + "NCMPI", + NCMPI_Create, + NCMPI_Open, + NCMPI_Xfer, + NCMPI_Close, + NCMPI_Delete, + NCMPI_SetVersion, + NCMPI_Fsync, + NCMPI_GetFileSize +}; + +/***************************** F U N C T I O N S ******************************/ + +/* + * Create and open a file through the NCMPI interface. + */ +static void *NCMPI_Create(char *testFileName, IOR_param_t * param) +{ + int *fd; + int fd_mode; + MPI_Info mpiHints = MPI_INFO_NULL; + + /* Wei-keng Liao: read and set MPI file hints from hintsFile */ + SetHints(&mpiHints, param->hintsFileName); + if (rank == 0 && param->showHints) { + fprintf(stdout, "\nhints passed to MPI_File_open() {\n"); + ShowHints(&mpiHints); + fprintf(stdout, "}\n"); + } + + fd = (int *)malloc(sizeof(int)); + if (fd == NULL) + ERR("malloc() failed"); + + fd_mode = GetFileMode(param); + NCMPI_CHECK(ncmpi_create(testComm, testFileName, fd_mode, + mpiHints, fd), "cannot create file"); + + /* Wei-keng Liao: print the MPI file hints currently used */ +/* WEL - add when ncmpi_get_file_info() is in current parallel-netcdf release + if (rank == 0 && param->showHints) { + MPI_CHECK(ncmpi_get_file_info(*fd, &mpiHints), + "cannot get file info"); + fprintf(stdout, "\nhints returned from opened file {\n"); + ShowHints(&mpiHints); + fprintf(stdout, "}\n"); + } +*/ + + /* Wei-keng Liao: free up the mpiHints object */ +/* WEL - this needs future fix from next release of PnetCDF + if (mpiHints != MPI_INFO_NULL) + MPI_CHECK(MPI_Info_free(&mpiHints), "cannot free file info"); +*/ + + return (fd); +} + +/* + * Open a file through the NCMPI interface. + */ +static void *NCMPI_Open(char *testFileName, IOR_param_t * param) +{ + int *fd; + int fd_mode; + MPI_Info mpiHints = MPI_INFO_NULL; + + /* Wei-keng Liao: read and set MPI file hints from hintsFile */ + SetHints(&mpiHints, param->hintsFileName); + if (rank == 0 && param->showHints) { + fprintf(stdout, "\nhints passed to MPI_File_open() {\n"); + ShowHints(&mpiHints); + fprintf(stdout, "}\n"); + } + + fd = (int *)malloc(sizeof(int)); + if (fd == NULL) + ERR("malloc() failed"); + + fd_mode = GetFileMode(param); + NCMPI_CHECK(ncmpi_open(testComm, testFileName, fd_mode, + mpiHints, fd), "cannot open file"); + + /* Wei-keng Liao: print the MPI file hints currently used */ +/* WEL - add when ncmpi_get_file_info() is in current parallel-netcdf release + if (rank == 0 && param->showHints) { + MPI_CHECK(ncmpi_get_file_info(*fd, &mpiHints), + "cannot get file info"); + fprintf(stdout, "\nhints returned from opened file {\n"); + ShowHints(&mpiHints); + fprintf(stdout, "}\n"); + } +*/ + + /* Wei-keng Liao: free up the mpiHints object */ +/* WEL - this needs future fix from next release of PnetCDF + if (mpiHints != MPI_INFO_NULL) + MPI_CHECK(MPI_Info_free(&mpiHints), "cannot free file info"); +*/ + + return (fd); +} + +/* + * Write or read access to file using the NCMPI interface. + */ +static IOR_offset_t NCMPI_Xfer(int access, void *fd, IOR_size_t * buffer, + IOR_offset_t length, IOR_param_t * param) +{ + char *bufferPtr = (char *)buffer; + static int firstReadCheck = FALSE, startDataSet; + int var_id, dim_id[NUM_DIMS]; + MPI_Offset bufSize[NUM_DIMS], offset[NUM_DIMS]; + IOR_offset_t segmentPosition; + int segmentNum, transferNum; + + /* Wei-keng Liao: In ior.c line 1979 says "block size must be a multiple + of transfer size." Hence, length should always == param->transferSize + below. I leave it here to double check. + */ + if (length != param->transferSize) { + char errMsg[256]; + sprintf(errMsg, "length(%lld) != param->transferSize(%lld)\n", + length, param->transferSize); + NCMPI_CHECK(-1, errMsg); + } + + /* determine by offset if need to start data set */ + if (param->filePerProc == TRUE) { + segmentPosition = (IOR_offset_t) 0; + } else { + segmentPosition = + (IOR_offset_t) ((rank + rankOffset) % param->numTasks) + * param->blockSize; + } + if ((int)(param->offset - segmentPosition) == 0) { + startDataSet = TRUE; + /* + * this toggle is for the read check operation, which passes through + * this function twice; note that this function will open a data set + * only on the first read check and close only on the second + */ + if (access == READCHECK) { + if (firstReadCheck == TRUE) { + firstReadCheck = FALSE; + } else { + firstReadCheck = TRUE; + } + } + } + + if (startDataSet == TRUE && + (access != READCHECK || firstReadCheck == TRUE)) { + if (access == WRITE) { + int numTransfers = + param->blockSize / param->transferSize; + + /* Wei-keng Liao: change 1D array to 3D array of dimensions: + [segmentCount*numTasksWorld][numTransfers][transferSize] + Requirement: none of these dimensions should be > 4G, + */ + NCMPI_CHECK(ncmpi_def_dim + (*(int *)fd, "segments_times_np", + NC_UNLIMITED, &dim_id[0]), + "cannot define data set dimensions"); + NCMPI_CHECK(ncmpi_def_dim + (*(int *)fd, "number_of_transfers", + numTransfers, &dim_id[1]), + "cannot define data set dimensions"); + NCMPI_CHECK(ncmpi_def_dim + (*(int *)fd, "transfer_size", + param->transferSize, &dim_id[2]), + "cannot define data set dimensions"); + NCMPI_CHECK(ncmpi_def_var + (*(int *)fd, "data_var", NC_BYTE, NUM_DIMS, + dim_id, &var_id), + "cannot define data set variables"); + NCMPI_CHECK(ncmpi_enddef(*(int *)fd), + "cannot close data set define mode"); + + } else { + NCMPI_CHECK(ncmpi_inq_varid + (*(int *)fd, "data_var", &var_id), + "cannot retrieve data set variable"); + } + + if (param->collective == FALSE) { + NCMPI_CHECK(ncmpi_begin_indep_data(*(int *)fd), + "cannot enable independent data mode"); + } + + param->var_id = var_id; + startDataSet = FALSE; + } + + var_id = param->var_id; + + /* Wei-keng Liao: calculate the segment number */ + segmentNum = param->offset / (param->numTasks * param->blockSize); + + /* Wei-keng Liao: calculate the transfer number in each block */ + transferNum = param->offset % param->blockSize / param->transferSize; + + /* Wei-keng Liao: read/write the 3rd dim of the dataset, each is of + amount param->transferSize */ + bufSize[0] = 1; + bufSize[1] = 1; + bufSize[2] = param->transferSize; + + offset[0] = segmentNum * numTasksWorld + rank; + offset[1] = transferNum; + offset[2] = 0; + + /* access the file */ + if (access == WRITE) { /* WRITE */ + if (param->collective) { + NCMPI_CHECK(ncmpi_put_vara_all + (*(int *)fd, var_id, offset, bufSize, + bufferPtr, length, MPI_BYTE), + "cannot write to data set"); + } else { + NCMPI_CHECK(ncmpi_put_vara + (*(int *)fd, var_id, offset, bufSize, + bufferPtr, length, MPI_BYTE), + "cannot write to data set"); + } + } else { /* READ or CHECK */ + if (param->collective == TRUE) { + NCMPI_CHECK(ncmpi_get_vara_all + (*(int *)fd, var_id, offset, bufSize, + bufferPtr, length, MPI_BYTE), + "cannot read from data set"); + } else { + NCMPI_CHECK(ncmpi_get_vara + (*(int *)fd, var_id, offset, bufSize, + bufferPtr, length, MPI_BYTE), + "cannot read from data set"); + } + } + + return (length); +} + +/* + * Perform fsync(). + */ +static void NCMPI_Fsync(void *fd, IOR_param_t * param) +{ + ; +} + +/* + * Close a file through the NCMPI interface. + */ +static void NCMPI_Close(void *fd, IOR_param_t * param) +{ + if (param->collective == FALSE) { + NCMPI_CHECK(ncmpi_end_indep_data(*(int *)fd), + "cannot disable independent data mode"); + } + NCMPI_CHECK(ncmpi_close(*(int *)fd), "cannot close file"); + free(fd); +} + +/* + * Delete a file through the NCMPI interface. + */ +static void NCMPI_Delete(char *testFileName, IOR_param_t * param) +{ + if (unlink(testFileName) != 0) + WARN("unlink() failed"); +} + +/* + * Determine api version. + */ +static void NCMPI_SetVersion(IOR_param_t * test) +{ + sprintf(test->apiVersion, "%s (%s)", test->api, ncmpi_inq_libvers()); +} + +/* + * Return the correct file mode for NCMPI. + */ +static int GetFileMode(IOR_param_t * param) +{ + int fd_mode = 0; + + /* set IOR file flags to NCMPI flags */ + /* -- file open flags -- */ + if (param->openFlags & IOR_RDONLY) { + fd_mode |= NC_NOWRITE; + } + if (param->openFlags & IOR_WRONLY) { + fprintf(stdout, "File write only not implemented in NCMPI\n"); + } + if (param->openFlags & IOR_RDWR) { + fd_mode |= NC_WRITE; + } + if (param->openFlags & IOR_APPEND) { + fprintf(stdout, "File append not implemented in NCMPI\n"); + } + if (param->openFlags & IOR_CREAT) { + fd_mode |= NC_CLOBBER; + } + if (param->openFlags & IOR_EXCL) { + fprintf(stdout, "Exclusive access not implemented in NCMPI\n"); + } + if (param->openFlags & IOR_TRUNC) { + fprintf(stdout, "File truncation not implemented in NCMPI\n"); + } + if (param->openFlags & IOR_DIRECT) { + fprintf(stdout, "O_DIRECT not implemented in NCMPI\n"); + } + + /* Wei-keng Liao: to enable > 4GB file size */ + fd_mode |= NC_64BIT_OFFSET; + + return (fd_mode); +} + +/* + * Use MPIIO call to get file size. + */ +static IOR_offset_t NCMPI_GetFileSize(IOR_param_t * test, MPI_Comm testComm, + char *testFileName) +{ + return (MPIIO_GetFileSize(test, testComm, testFileName)); +} diff --git a/microbenchmarks/ior/src/aiori-POSIX.c b/microbenchmarks/ior/src/aiori-POSIX.c new file mode 100644 index 00000000..cada6003 --- /dev/null +++ b/microbenchmarks/ior/src/aiori-POSIX.c @@ -0,0 +1,372 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Implement of abstract I/O interface for POSIX. +* +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#ifdef __linux__ +#include /* necessary for: */ +#define __USE_GNU /* O_DIRECT and */ +#include /* IO operations */ +#undef __USE_GNU +#endif /* __linux__ */ +#include +#include /* IO operations */ +#include +#include +#ifdef HAVE_LUSTRE_LUSTRE_USER_H +#include +#endif + +#include "ior.h" +#include "aiori.h" +#include "iordef.h" + +#ifndef open64 /* necessary for TRU64 -- */ +#define open64 open /* unlikely, but may pose */ +#endif /* not open64 */ /* conflicting prototypes */ + +#ifndef lseek64 /* necessary for TRU64 -- */ +#define lseek64 lseek /* unlikely, but may pose */ +#endif /* not lseek64 */ /* conflicting prototypes */ + +#ifndef O_BINARY /* Required on Windows */ +#define O_BINARY 0 +#endif + +/**************************** P R O T O T Y P E S *****************************/ +static void *POSIX_Create(char *, IOR_param_t *); +static void *POSIX_Open(char *, IOR_param_t *); +static IOR_offset_t POSIX_Xfer(int, void *, IOR_size_t *, + IOR_offset_t, IOR_param_t *); +static void POSIX_Close(void *, IOR_param_t *); +static void POSIX_Delete(char *, IOR_param_t *); +static void POSIX_SetVersion(IOR_param_t *); +static void POSIX_Fsync(void *, IOR_param_t *); +static IOR_offset_t POSIX_GetFileSize(IOR_param_t *, MPI_Comm, char *); + +/************************** D E C L A R A T I O N S ***************************/ + +ior_aiori_t posix_aiori = { + "POSIX", + POSIX_Create, + POSIX_Open, + POSIX_Xfer, + POSIX_Close, + POSIX_Delete, + POSIX_SetVersion, + POSIX_Fsync, + POSIX_GetFileSize +}; + +/***************************** F U N C T I O N S ******************************/ + +void set_o_direct_flag(int *fd) +{ +/* note that TRU64 needs O_DIRECTIO, SunOS uses directio(), + and everyone else needs O_DIRECT */ +#ifndef O_DIRECT +#ifndef O_DIRECTIO + WARN("cannot use O_DIRECT"); +#define O_DIRECT 000000 +#else /* O_DIRECTIO */ +#define O_DIRECT O_DIRECTIO +#endif /* not O_DIRECTIO */ +#endif /* not O_DIRECT */ + + *fd |= O_DIRECT; +} + +/* + * Creat and open a file through the POSIX interface. + */ +static void *POSIX_Create(char *testFileName, IOR_param_t * param) +{ + int fd_oflag = O_BINARY; + int *fd; + + fd = (int *)malloc(sizeof(int)); + if (fd == NULL) + ERR("Unable to malloc file descriptor"); + + if (param->useO_DIRECT == TRUE) + set_o_direct_flag(&fd_oflag); + +#ifdef HAVE_LUSTRE_LUSTRE_USER_H + if (param->lustre_set_striping) { + /* In the single-shared-file case, task 0 has to creat the + file with the Lustre striping options before any other processes + open the file */ + if (!param->filePerProc && rank != 0) { + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + fd_oflag |= O_RDWR; + *fd = open64(testFileName, fd_oflag, 0664); + if (*fd < 0) + ERR("open64() failed"); + } else { + struct lov_user_md opts = { 0 }; + + /* Setup Lustre IOCTL striping pattern structure */ + opts.lmm_magic = LOV_USER_MAGIC; + opts.lmm_stripe_size = param->lustre_stripe_size; + opts.lmm_stripe_offset = param->lustre_start_ost; + opts.lmm_stripe_count = param->lustre_stripe_count; + + /* File needs to be opened O_EXCL because we cannot set + Lustre striping information on a pre-existing file. */ + fd_oflag |= + O_CREAT | O_EXCL | O_RDWR | O_LOV_DELAY_CREATE; + *fd = open64(testFileName, fd_oflag, 0664); + if (*fd < 0) { + fprintf(stdout, "\nUnable to open '%s': %s\n", + testFileName, strerror(errno)); + MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1), + "MPI_Abort() error"); + } else if (ioctl(*fd, LL_IOC_LOV_SETSTRIPE, &opts)) { + char *errmsg = "stripe already set"; + if (errno != EEXIST && errno != EALREADY) + errmsg = strerror(errno); + fprintf(stdout, + "\nError on ioctl for '%s' (%d): %s\n", + testFileName, *fd, errmsg); + MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1), + "MPI_Abort() error"); + } + if (!param->filePerProc) + MPI_CHECK(MPI_Barrier(testComm), + "barrier error"); + } + } else { +#endif /* HAVE_LUSTRE_LUSTRE_USER_H */ + fd_oflag |= O_CREAT | O_RDWR; + *fd = open64(testFileName, fd_oflag, 0664); + if (*fd < 0) + ERR("open64() failed"); +#ifdef HAVE_LUSTRE_LUSTRE_USER_H + } + + if (param->lustre_ignore_locks) { + int lustre_ioctl_flags = LL_FILE_IGNORE_LOCK; + if (ioctl(*fd, LL_IOC_SETFLAGS, &lustre_ioctl_flags) == -1) + ERR("ioctl(LL_IOC_SETFLAGS) failed"); + } +#endif /* HAVE_LUSTRE_LUSTRE_USER_H */ + + return ((void *)fd); +} + +/* + * Open a file through the POSIX interface. + */ +static void *POSIX_Open(char *testFileName, IOR_param_t * param) +{ + int fd_oflag = O_BINARY; + int *fd; + + fd = (int *)malloc(sizeof(int)); + if (fd == NULL) + ERR("Unable to malloc file descriptor"); + + if (param->useO_DIRECT == TRUE) + set_o_direct_flag(&fd_oflag); + + fd_oflag |= O_RDWR; + *fd = open64(testFileName, fd_oflag); + if (*fd < 0) + ERR("open64 failed"); + +#ifdef HAVE_LUSTRE_LUSTRE_USER_H + if (param->lustre_ignore_locks) { + int lustre_ioctl_flags = LL_FILE_IGNORE_LOCK; + if (verbose >= VERBOSE_1) { + fprintf(stdout, + "** Disabling lustre range locking **\n"); + } + if (ioctl(*fd, LL_IOC_SETFLAGS, &lustre_ioctl_flags) == -1) + ERR("ioctl(LL_IOC_SETFLAGS) failed"); + } +#endif /* HAVE_LUSTRE_LUSTRE_USER_H */ + + return ((void *)fd); +} + +/* + * Write or read access to file using the POSIX interface. + */ +static IOR_offset_t POSIX_Xfer(int access, void *file, IOR_size_t * buffer, + IOR_offset_t length, IOR_param_t * param) +{ + int xferRetries = 0; + long long remaining = (long long)length; + char *ptr = (char *)buffer; + long long rc; + int fd; + + fd = *(int *)file; + + /* seek to offset */ + if (lseek64(fd, param->offset, SEEK_SET) == -1) + ERR("lseek64() failed"); + + while (remaining > 0) { + /* write/read file */ + if (access == WRITE) { /* WRITE */ + if (verbose >= VERBOSE_4) { +#ifdef _OPENMP + fprintf(stdout, + "task %d thread %d writing to offset %lld\n", + rank, omp_get_thread_num(), + param->offset + length - remaining); +#else + fprintf(stdout, + "task %d writing to offset %lld\n", + rank, + param->offset + length - remaining); +#endif + } + rc = write(fd, ptr, remaining); + if (rc == -1) + ERR("write() failed"); + if (param->fsyncPerWrite == TRUE) + POSIX_Fsync(&fd, param); + } else { /* READ or CHECK */ + if (verbose >= VERBOSE_4) { +#ifdef _OPENMP + fprintf(stdout, + "task %d thread %d reading from offset %lld\n", + rank, omp_get_thread_num(), + param->offset + length - remaining); +#else + fprintf(stdout, + "task %d reading from offset %lld\n", + rank, + param->offset + length - remaining); +#endif + } + rc = read(fd, ptr, remaining); + if (rc == 0) + ERR("read() returned EOF prematurely"); + if (rc == -1) + ERR("read() failed"); + } + if (rc < remaining) { +#ifdef _OPENMP + fprintf(stdout, + "WARNING: Task %d/%d, partial %s, %lld of %lld bytes at offset %lld\n", + rank, omp_get_thread_num(), + access == WRITE ? "write()" : "read()", + rc, remaining, + param->offset + length - remaining); +#else + fprintf(stdout, + "WARNING: Task %d, partial %s, %lld of %lld bytes at offset %lld\n", + rank, + access == WRITE ? "write()" : "read()", + rc, remaining, + param->offset + length - remaining); +#endif + if (param->singleXferAttempt == TRUE) + MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1), + "barrier error"); + if (xferRetries > MAX_RETRY) + ERR("too many retries -- aborting"); + } + assert(rc >= 0); + assert(rc <= remaining); + remaining -= rc; + ptr += rc; + xferRetries++; + } + return (length); +} + +/* + * Perform fsync(). + */ +static void POSIX_Fsync(void *fd, IOR_param_t * param) +{ + if (fsync(*(int *)fd) != 0) + EWARN("fsync() failed"); +} + +/* + * Close a file through the POSIX interface. + */ +static void POSIX_Close(void *fd, IOR_param_t * param) +{ + if (close(*(int *)fd) != 0) + ERR("close() failed"); + free(fd); +} + +/* + * Delete a file through the POSIX interface. + */ +static void POSIX_Delete(char *testFileName, IOR_param_t * param) +{ + char errmsg[256]; + sprintf(errmsg, "[RANK %03d]: unlink() of file \"%s\" failed\n", + rank, testFileName); + if (unlink(testFileName) != 0) + EWARN(errmsg); +} + +/* + * Determine api version. + */ +static void POSIX_SetVersion(IOR_param_t * test) +{ + strcpy(test->apiVersion, test->api); +} + +/* + * Use POSIX stat() to return aggregate file size. + */ +static IOR_offset_t POSIX_GetFileSize(IOR_param_t * test, MPI_Comm testComm, + char *testFileName) +{ + struct stat stat_buf; + IOR_offset_t aggFileSizeFromStat, tmpMin, tmpMax, tmpSum; + + if (stat(testFileName, &stat_buf) != 0) { + ERR("stat() failed"); + } + aggFileSizeFromStat = stat_buf.st_size; + + if (test->filePerProc == TRUE) { + MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpSum, 1, + MPI_LONG_LONG_INT, MPI_SUM, testComm), + "cannot total data moved"); + aggFileSizeFromStat = tmpSum; + } else { + MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpMin, 1, + MPI_LONG_LONG_INT, MPI_MIN, testComm), + "cannot total data moved"); + MPI_CHECK(MPI_Allreduce(&aggFileSizeFromStat, &tmpMax, 1, + MPI_LONG_LONG_INT, MPI_MAX, testComm), + "cannot total data moved"); + if (tmpMin != tmpMax) { + if (rank == 0) { + WARN("inconsistent file size by different tasks"); + } + /* incorrect, but now consistent across tasks */ + aggFileSizeFromStat = tmpMin; + } + } + + return (aggFileSizeFromStat); +} diff --git a/microbenchmarks/ior/src/aiori.h b/microbenchmarks/ior/src/aiori.h new file mode 100644 index 00000000..d88abbfa --- /dev/null +++ b/microbenchmarks/ior/src/aiori.h @@ -0,0 +1,73 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Definitions and prototypes of abstract I/O interface +* +\******************************************************************************/ + +#ifndef _AIORI_H +#define _AIORI_H + +#include + +#ifndef MPI_FILE_NULL +# include +#endif /* not MPI_FILE_NULL */ + +#include "ior.h" +#include "iordef.h" /* IOR Definitions */ + +/*************************** D E F I N I T I O N S ****************************/ + + /* -- file open flags -- */ +#define IOR_RDONLY 1 /* read only */ +#define IOR_WRONLY 2 /* write only */ +#define IOR_RDWR 4 /* read/write */ +#define IOR_APPEND 8 /* append */ +#define IOR_CREAT 16 /* create */ +#define IOR_TRUNC 32 /* truncate */ +#define IOR_EXCL 64 /* exclusive */ +#define IOR_DIRECT 128 /* bypass I/O buffers */ + /* -- file mode flags -- */ +#define IOR_IRWXU 1 /* read, write, execute perm: owner */ +#define IOR_IRUSR 2 /* read permission: owner */ +#define IOR_IWUSR 4 /* write permission: owner */ +#define IOR_IXUSR 8 /* execute permission: owner */ +#define IOR_IRWXG 16 /* read, write, execute perm: group */ +#define IOR_IRGRP 32 /* read permission: group */ +#define IOR_IWGRP 64 /* write permission: group */ +#define IOR_IXGRP 128 /* execute permission: group */ +#define IOR_IRWXO 256 /* read, write, execute perm: other */ +#define IOR_IROTH 512 /* read permission: other */ +#define IOR_IWOTH 1024 /* write permission: other */ +#define IOR_IXOTH 2048 /* execute permission: other */ + +typedef struct ior_aiori { + char *name; + void *(*create)(char *, IOR_param_t *); + void *(*open)(char *, IOR_param_t *); + IOR_offset_t (*xfer)(int, void *, IOR_size_t *, + IOR_offset_t, IOR_param_t *); + void (*close)(void *, IOR_param_t *); + void (*delete)(char *, IOR_param_t *); + void (*set_version)(IOR_param_t *); + void (*fsync)(void *, IOR_param_t *); + IOR_offset_t (*get_file_size)(IOR_param_t *, MPI_Comm, char *); +} ior_aiori_t; + +ior_aiori_t posix_aiori; +ior_aiori_t mpiio_aiori; +ior_aiori_t hdf5_aiori; +ior_aiori_t ncmpi_aiori; + +IOR_offset_t MPIIO_GetFileSize(IOR_param_t * test, MPI_Comm testComm, + char *testFileName); + +#endif /* not _AIORI_H */ diff --git a/microbenchmarks/ior/src/config.h.in b/microbenchmarks/ior/src/config.h.in new file mode 100644 index 00000000..1697311c --- /dev/null +++ b/microbenchmarks/ior/src/config.h.in @@ -0,0 +1,177 @@ +/* src/config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the header file. */ +#undef HAVE_FCNTL_H + +/* Define to 1 if you have the `getpagesize' function. */ +#undef HAVE_GETPAGESIZE + +/* Define to 1 if you have the `gettimeofday' function. */ +#undef HAVE_GETTIMEOFDAY + +/* Define to 1 if you have the header file. */ +#undef HAVE_INTTYPES_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LIBINTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_LUSTRE_LUSTRE_USER_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_MEMORY_H + +/* Define to 1 if you have the `memset' function. */ +#undef HAVE_MEMSET + +/* Define to 1 if you have the `mkdir' function. */ +#undef HAVE_MKDIR + +/* Define if you have the MPI library. */ +#undef HAVE_MPI + +/* Define to 1 if you have the `pow' function. */ +#undef HAVE_POW + +/* Define to 1 if you have the `putenv' function. */ +#undef HAVE_PUTENV + +/* Define to 1 if you have the `realpath' function. */ +#undef HAVE_REALPATH + +/* Define to 1 if you have the `regcomp' function. */ +#undef HAVE_REGCOMP + +/* Define to 1 if you have the `sqrt' function. */ +#undef HAVE_SQRT + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDINT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STDLIB_H + +/* Define to 1 if you have the `strcasecmp' function. */ +#undef HAVE_STRCASECMP + +/* Define to 1 if you have the `strchr' function. */ +#undef HAVE_STRCHR + +/* Define to 1 if you have the `strerror' function. */ +#undef HAVE_STRERROR + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRINGS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_STRING_H + +/* Define to 1 if you have the `strncasecmp' function. */ +#undef HAVE_STRNCASECMP + +/* Define to 1 if you have the `strstr' function. */ +#undef HAVE_STRSTR + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_IOCTL_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_PARAM_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STATVFS_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_STAT_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TIME_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_TYPES_H + +/* Define to 1 if you have the `uname' function. */ +#undef HAVE_UNAME + +/* Define to 1 if you have the header file. */ +#undef HAVE_UNISTD_H + +/* Define to 1 if you have the header file. */ +#undef HAVE_WCHAR_H + +/* Define the project alias string (name-ver or name-ver-rel). */ +#undef META_ALIAS + +/* Define the project author. */ +#undef META_AUTHOR + +/* Define the project release date. */ +#undef META_DATE + +/* Define the libtool library 'age' version information. */ +#undef META_LT_AGE + +/* Define the libtool library 'current' version information. */ +#undef META_LT_CURRENT + +/* Define the libtool library 'revision' version information. */ +#undef META_LT_REVISION + +/* Define the project name. */ +#undef META_NAME + +/* Define the project release. */ +#undef META_RELEASE + +/* Define the project version. */ +#undef META_VERSION + +/* Define to the address where bug reports for this package should be sent. */ +#undef PACKAGE_BUGREPORT + +/* Define to the full name of this package. */ +#undef PACKAGE_NAME + +/* Define to the full name and version of this package. */ +#undef PACKAGE_STRING + +/* Define to the one symbol short name of this package. */ +#undef PACKAGE_TARNAME + +/* Define to the home page for this package. */ +#undef PACKAGE_URL + +/* Define to the version of this package. */ +#undef PACKAGE_VERSION + +/* Define to 1 if you have the ANSI C header files. */ +#undef STDC_HEADERS + +/* Build HDF5 backend AIORI */ +#undef USE_HDF5_AIORI + +/* Build MPIIO backend AIORI */ +#undef USE_MPIIO_AIORI + +/* Build NCMPI backend AIORI */ +#undef USE_NCMPI_AIORI + +/* Build POSIX backend AIORI */ +#undef USE_POSIX_AIORI + +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + +/* Number of bits in a file offset, on hosts where this is settable. */ +#undef _FILE_OFFSET_BITS + +/* Define for large files, on AIX-style hosts. */ +#undef _LARGE_FILES + +/* Define to `unsigned int' if does not define. */ +#undef size_t diff --git a/microbenchmarks/ior/src/ior.c b/microbenchmarks/ior/src/ior.c new file mode 100644 index 00000000..1caa399e --- /dev/null +++ b/microbenchmarks/ior/src/ior.c @@ -0,0 +1,2869 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include /* tolower() */ +#include +#include +#include +#include +#include /* struct stat */ +#include +#ifndef _WIN32 +#include /* gettimeofday() */ +#include /* uname() */ +#endif +#include + +#include "ior.h" +#include "aiori.h" +#include "utilities.h" +#include "parse_options.h" + +/* globals used by other files, also defined "extern" in ior.h */ +int numTasksWorld = 0; +int rank = 0; +int rankOffset = 0; +int tasksPerNode = 0; /* tasks per node */ +int verbose = VERBOSE_0; /* verbose output */ +MPI_Comm testComm; + +/* file scope globals */ +extern char **environ; +int totalErrorCount = 0; +double wall_clock_delta = 0; +double wall_clock_deviation; + +ior_aiori_t *backend; +ior_aiori_t *available_aiori[] = { +#ifdef USE_POSIX_AIORI + &posix_aiori, +#endif +#ifdef USE_MPIIO_AIORI + &mpiio_aiori, +#endif +#ifdef USE_HDF5_AIORI + &hdf5_aiori, +#endif +#ifdef USE_NCMPI_AIORI + &ncmpi_aiori, +#endif + NULL +}; + +static void DestroyTests(IOR_test_t *tests_head); +static void DisplayUsage(char **); +static void GetTestFileName(char *, IOR_param_t *); +static char *PrependDir(IOR_param_t *, char *); +static char **ParseFileName(char *, int *); +static void PrintEarlyHeader(); +static void PrintHeader(int argc, char **argv); +static IOR_test_t *SetupTests(int, char **); +static void ShowTestInfo(IOR_param_t *); +static void ShowSetup(IOR_param_t *params); +static void ShowTest(IOR_param_t *); +static void PrintLongSummaryAllTests(IOR_test_t *tests_head); +static void TestIoSys(IOR_test_t *); +static void ValidTests(IOR_param_t *); +static IOR_offset_t WriteOrRead(IOR_param_t *, void *, int); +static IOR_offset_t WriteOrReadBlast(IOR_param_t *, void *, int); +static void WriteTimes(IOR_param_t *, double **, int, int); + +/********************************** M A I N ***********************************/ + +int main(int argc, char **argv) +{ + int i; + IOR_test_t *tests_head; + IOR_test_t *tptr; + + /* + * check -h option from commandline without starting MPI; + * if the help option is requested in a script file (showHelp=TRUE), + * the help output will be displayed in the MPI job + */ + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-h") == 0) { + DisplayUsage(argv); + return (0); + } + } + + /* start the MPI code */ + MPI_CHECK(MPI_Init(&argc, &argv), "cannot initialize MPI"); + MPI_CHECK(MPI_Comm_size(MPI_COMM_WORLD, &numTasksWorld), + "cannot get number of tasks"); + MPI_CHECK(MPI_Comm_rank(MPI_COMM_WORLD, &rank), "cannot get rank"); + PrintEarlyHeader(); + + /* set error-handling */ + /*MPI_CHECK(MPI_Errhandler_set(MPI_COMM_WORLD, MPI_ERRORS_RETURN), + "cannot set errhandler"); */ + + /* Sanity check, we were compiled with SOME backend, right? */ + if (available_aiori[0] == NULL) { + ERR("No IO backends compiled into ior. That should not have happened."); + } + + /* setup tests before verifying test validity */ + tests_head = SetupTests(argc, argv); + verbose = tests_head->params.verbose; + tests_head->params.testComm = MPI_COMM_WORLD; + + /* check for commandline usage */ + if (rank == 0 && tests_head->params.showHelp == TRUE) { + DisplayUsage(argv); + } + + PrintHeader(argc, argv); + + /* perform each test */ + for (tptr = tests_head; tptr != NULL; tptr = tptr->next) { + verbose = tptr->params.verbose; + if (rank == 0 && verbose >= VERBOSE_0) { + ShowTestInfo(&tptr->params); + } + if (rank == 0 && verbose >= VERBOSE_3) { + ShowTest(&tptr->params); + } + TestIoSys(tptr); + } + + if (verbose < 0) + /* always print final summary */ + verbose = 0; + PrintLongSummaryAllTests(tests_head); + + /* display finish time */ + if (rank == 0 && verbose >= VERBOSE_0) { + fprintf(stdout, "\n"); + fprintf(stdout, "Finished: %s", CurrentTimeString()); + } + + DestroyTests(tests_head); + + MPI_CHECK(MPI_Finalize(), "cannot finalize MPI"); + + return (totalErrorCount); +} + +/***************************** F U N C T I O N S ******************************/ + +/* + * Initialize an IOR_param_t structure to the defaults + */ +void init_IOR_Param_t(IOR_param_t * p) +{ + memset(p, 0, sizeof(IOR_param_t)); + + p->mode = IOR_IRUSR | IOR_IWUSR | IOR_IRGRP | IOR_IWGRP; + p->openFlags = IOR_RDWR | IOR_CREAT; + assert(available_aiori[0] != NULL); + strncpy(p->api, available_aiori[0]->name, MAX_STR); + strncpy(p->platform, "HOST(OSTYPE)", MAX_STR); + strncpy(p->testFileName, "testFile", MAXPATHLEN); + p->nodes = 1; + p->tasksPerNode = 1; + p->repetitions = 1; + p->repCounter = -1; + p->open = WRITE; + p->taskPerNodeOffset = 1; + p->segmentCount = 1; + p->blockSize = 1048576; + p->transferSize = 262144; + p->randomSeed = -1; + p->testComm = MPI_COMM_WORLD; + p->setAlignment = 1; + p->lustre_start_ost = -1; +} + +/* + * Bind the global "backend" pointer to the requested backend AIORI's + * function table. + */ +static void AioriBind(char *api) +{ + ior_aiori_t **tmp; + + backend = NULL; + for (tmp = available_aiori; *tmp != NULL; tmp++) { + if (strcmp(api, (*tmp)->name) == 0) { + backend = *tmp; + break; + } + } + + if (backend == NULL) { + ERR("unrecognized IO API"); + } + +} + +static void +DisplayOutliers(int numTasks, + double timerVal, + char *timeString, int access, int outlierThreshold) +{ + char accessString[MAX_STR]; + double sum, mean, sqrDiff, var, sd; + + /* for local timerVal, don't compensate for wall clock delta */ + timerVal += wall_clock_delta; + + MPI_CHECK(MPI_Allreduce + (&timerVal, &sum, 1, MPI_DOUBLE, MPI_SUM, testComm), + "MPI_Allreduce()"); + mean = sum / numTasks; + sqrDiff = pow((mean - timerVal), 2); + MPI_CHECK(MPI_Allreduce + (&sqrDiff, &var, 1, MPI_DOUBLE, MPI_SUM, testComm), + "MPI_Allreduce()"); + var = var / numTasks; + sd = sqrt(var); + + if (access == WRITE) { + strcpy(accessString, "write"); + } else { /* READ */ + strcpy(accessString, "read"); + } + if (fabs(timerVal - mean) > (double)outlierThreshold) { + fprintf(stdout, "WARNING: for task %d, %s %s is %f\n", + rank, accessString, timeString, timerVal); + fprintf(stdout, " (mean=%f, stddev=%f)\n", mean, sd); + fflush(stdout); + } +} + +/* + * Check for outliers in start/end times and elapsed create/xfer/close times. + */ +static void CheckForOutliers(IOR_param_t * test, double **timer, int rep, + int access) +{ + int shift; + + if (access == WRITE) { + shift = 0; + } else { /* READ */ + shift = 6; + } + + DisplayOutliers(test->numTasks, timer[shift + 0][rep], + "start time", access, test->outlierThreshold); + DisplayOutliers(test->numTasks, + timer[shift + 1][rep] - timer[shift + 0][rep], + "elapsed create time", access, test->outlierThreshold); + DisplayOutliers(test->numTasks, + timer[shift + 3][rep] - timer[shift + 2][rep], + "elapsed transfer time", access, + test->outlierThreshold); + DisplayOutliers(test->numTasks, + timer[shift + 5][rep] - timer[shift + 4][rep], + "elapsed close time", access, test->outlierThreshold); + DisplayOutliers(test->numTasks, timer[shift + 5][rep], "end time", + access, test->outlierThreshold); + +} + +/* + * Check if actual file size equals expected size; if not use actual for + * calculating performance rate. + */ +static void CheckFileSize(IOR_test_t *test, IOR_offset_t dataMoved, int rep) +{ + IOR_param_t *params = &test->params; + IOR_results_t *results = test->results; + + MPI_CHECK(MPI_Allreduce(&dataMoved, &results->aggFileSizeFromXfer[rep], + 1, MPI_LONG_LONG_INT, MPI_SUM, testComm), + "cannot total data moved"); + + if (strcmp(params->api, "HDF5") != 0 + && strcmp(params->api, "NCMPI") != 0 + && !params->blastMode ) { + if (verbose >= VERBOSE_0 && rank == 0) { + if ((params->expectedAggFileSize + != results->aggFileSizeFromXfer[rep]) + || (results->aggFileSizeFromStat[rep] + != results->aggFileSizeFromXfer[rep])) { + fprintf(stdout, + "WARNING: Expected aggregate file size = %lld.\n", + (long long) params->expectedAggFileSize); + fprintf(stdout, + "WARNING: Stat() of aggregate file size = %lld.\n", + (long long) results->aggFileSizeFromStat[rep]); + fprintf(stdout, + "WARNING: Using actual aggregate bytes moved = %lld.\n", + (long long) results->aggFileSizeFromXfer[rep]); + } + } + } + results->aggFileSizeForBW[rep] = results->aggFileSizeFromXfer[rep]; +} + +/* + * Compare buffers after reading/writing each transfer. Displays only first + * difference in buffers and returns total errors counted. + */ +static size_t +CompareBuffers(void *expectedBuffer, + void *unknownBuffer, + size_t size, + IOR_offset_t transferCount, IOR_param_t *test, int access) +{ + char testFileName[MAXPATHLEN]; + char bufferLabel1[MAX_STR]; + char bufferLabel2[MAX_STR]; + size_t i, j, length, first, last; + size_t errorCount = 0; + int inError = 0; + unsigned long long *goodbuf = (unsigned long long *)expectedBuffer; + unsigned long long *testbuf = (unsigned long long *)unknownBuffer; + + if (access == WRITECHECK) { + strcpy(bufferLabel1, "Expected: "); + strcpy(bufferLabel2, "Actual: "); + } else if (access == READCHECK) { + strcpy(bufferLabel1, "1st Read: "); + strcpy(bufferLabel2, "2nd Read: "); + } else { + ERR("incorrect argument for CompareBuffers()"); + } + + length = size / sizeof(IOR_size_t); + first = -1; + if (verbose >= VERBOSE_3) { + fprintf(stdout, + "[%d] At file byte offset %lld, comparing %llu-byte transfer\n", + rank, test->offset, (long long)size); + } + for (i = 0; i < length; i++) { + if (testbuf[i] != goodbuf[i]) { + errorCount++; + if (verbose >= VERBOSE_2) { + fprintf(stdout, + "[%d] At transfer buffer #%lld, index #%lld (file byte offset %lld):\n", + rank, transferCount - 1, (long long)i, + test->offset + + (IOR_size_t) (i * sizeof(IOR_size_t))); + fprintf(stdout, "[%d] %s0x", rank, bufferLabel1); + fprintf(stdout, "%016llx\n", goodbuf[i]); + fprintf(stdout, "[%d] %s0x", rank, bufferLabel2); + fprintf(stdout, "%016llx\n", testbuf[i]); + } + if (!inError) { + inError = 1; + first = i; + last = i; + } else { + last = i; + } + } else if (verbose >= VERBOSE_5 && i % 4 == 0) { + fprintf(stdout, + "[%d] PASSED offset = %lld bytes, transfer %lld\n", + rank, + ((i * sizeof(unsigned long long)) + + test->offset), transferCount); + fprintf(stdout, "[%d] GOOD %s0x", rank, bufferLabel1); + for (j = 0; j < 4; j++) + fprintf(stdout, "%016llx ", goodbuf[i + j]); + fprintf(stdout, "\n[%d] GOOD %s0x", rank, bufferLabel2); + for (j = 0; j < 4; j++) + fprintf(stdout, "%016llx ", testbuf[i + j]); + fprintf(stdout, "\n"); + } + } + if (inError) { + inError = 0; + GetTestFileName(testFileName, test); + fprintf(stdout, + "[%d] FAILED comparison of buffer containing %d-byte ints:\n", + rank, (int)sizeof(unsigned long long int)); + fprintf(stdout, "[%d] File name = %s\n", rank, testFileName); + fprintf(stdout, "[%d] In transfer %lld, ", rank, + transferCount); + fprintf(stdout, + "%lld errors between buffer indices %lld and %lld.\n", + (long long)errorCount, (long long)first, + (long long)last); + fprintf(stdout, "[%d] File byte offset = %lld:\n", rank, + ((first * sizeof(unsigned long long)) + test->offset)); + + fprintf(stdout, "[%d] %s0x", rank, bufferLabel1); + for (j = first; j < length && j < first + 4; j++) + fprintf(stdout, "%016llx ", goodbuf[j]); + if (j == length) + fprintf(stdout, "[end of buffer]"); + fprintf(stdout, "\n[%d] %s0x", rank, bufferLabel2); + for (j = first; j < length && j < first + 4; j++) + fprintf(stdout, "%016llx ", testbuf[j]); + if (j == length) + fprintf(stdout, "[end of buffer]"); + fprintf(stdout, "\n"); + if (test->quitOnError == TRUE) + ERR("data check error, aborting execution"); + } + return (errorCount); +} + +/* + * Count all errors across all tasks; report errors found. + */ +static int CountErrors(IOR_param_t * test, int access, int errors) +{ + int allErrors = 0; + + if (test->checkWrite || test->checkRead) { + MPI_CHECK(MPI_Reduce(&errors, &allErrors, 1, MPI_INT, MPI_SUM, + 0, testComm), "cannot reduce errors"); + MPI_CHECK(MPI_Bcast(&allErrors, 1, MPI_INT, 0, testComm), + "cannot broadcast allErrors value"); + if (allErrors != 0) { + totalErrorCount += allErrors; + test->errorFound = TRUE; + } + if (rank == 0 && allErrors != 0) { + if (allErrors < 0) { + WARN("overflow in errors counted"); + allErrors = -1; + } + fprintf(stdout, "WARNING: incorrect data on %s (%d errors found).\n", + access == WRITECHECK ? "write" : "read", allErrors); + fprintf(stdout, + "Used Time Stamp %u (0x%x) for Data Signature\n", + test->timeStampSignatureValue, + test->timeStampSignatureValue); + } + } + return (allErrors); +} + +/* + * Count the number of tasks that share a host. + * + * This function employees the gethostname() call, rather than using + * MPI_Get_processor_name(). We are interested in knowing the number + * of tasks that share a file system client (I/O node, compute node, + * whatever that may be). However on machines like BlueGene/Q, + * MPI_Get_processor_name() uniquely identifies a cpu in a compute node, + * not the node where the I/O is function shipped to. gethostname() + * is assumed to identify the shared filesystem client in more situations. + * + * NOTE: This also assumes that the task count on all nodes is equal + * to the task count on the host running MPI task 0. + */ +static int CountTasksPerNode(int numTasks, MPI_Comm comm) +{ + char localhost[MAX_STR]; + char hostname0[MAX_STR]; + static int firstPass = TRUE; + unsigned count; + unsigned flag; + int rc; + + rc = gethostname(localhost, MAX_STR); + if (rc == -1) { + /* This node won't match task 0's hostname...expect in the + case where ALL gethostname() calls fail, in which + case ALL nodes will appear to be on the same node. + We'll handle that later. */ + localhost[0] = '\0'; + if (rank == 0) + perror("gethostname() failed"); + } + + if (verbose >= VERBOSE_2 && firstPass) { + char tmp[MAX_STR]; + sprintf(tmp, "task %d on %s", rank, localhost); + OutputToRoot(numTasks, comm, tmp); + firstPass = FALSE; + } + + /* send task 0's hostname to all tasks */ + if (rank == 0) + strcpy(hostname0, localhost); + MPI_CHECK(MPI_Bcast(hostname0, MAX_STR, MPI_CHAR, 0, comm), + "broadcast of task 0's hostname failed"); + if (strcmp(hostname0, localhost) == 0) + flag = 1; + else + flag = 0; + + /* count the tasks share the same host as task 0 */ + MPI_Allreduce(&flag, &count, 1, MPI_UNSIGNED, MPI_SUM, comm); + + if (hostname0[0] == '\0') + count = 1; + + return (int)count; +} + +/* + * Allocate a page-aligned (required by O_DIRECT) buffer. + */ +static void *aligned_buffer_alloc(size_t size) +{ + size_t pageSize; + size_t pageMask; + char *buf, *tmp; + char *aligned; + + pageSize = getpagesize(); + pageMask = pageSize - 1; + buf = malloc(size + pageSize + sizeof(void *)); + if (buf == NULL) + ERR("out of memory"); + /* find the alinged buffer */ + tmp = buf + sizeof(char *); + aligned = tmp + pageSize - ((size_t) tmp & pageMask); + /* write a pointer to the original malloc()ed buffer into the bytes + preceding "aligned", so that the aligned buffer can later be free()ed */ + tmp = aligned - sizeof(void *); + *(void **)tmp = buf; + + return (void *)aligned; +} + +/* + * Free a buffer allocated by aligned_buffer_alloc(). + */ +static void aligned_buffer_free(void *buf) +{ + free(*(void **)((char *)buf - sizeof(char *))); +} + +void AllocResults(IOR_test_t *test) +{ + int reps; + if (test->results != NULL) + return; + + reps = test->params.repetitions; + test->results = (IOR_results_t *)malloc(sizeof(IOR_results_t)); + if (test->results == NULL) + ERR("malloc of IOR_results_t failed"); + + test->results->writeTime = (double *)malloc(reps * sizeof(double)); + if (test->results->writeTime == NULL) + ERR("malloc of writeTime array failed"); + memset(test->results->writeTime, 0, reps * sizeof(double)); + + test->results->readTime = (double *)malloc(reps * sizeof(double)); + if (test->results->readTime == NULL) + ERR("malloc of readTime array failed"); + memset(test->results->readTime, 0, reps * sizeof(double)); + + test->results->aggFileSizeFromStat = + (IOR_offset_t *)malloc(reps * sizeof(IOR_offset_t)); + if (test->results->aggFileSizeFromStat == NULL) + ERR("malloc of aggFileSizeFromStat failed"); + + test->results->aggFileSizeFromXfer = + (IOR_offset_t *)malloc(reps * sizeof(IOR_offset_t)); + if (test->results->aggFileSizeFromXfer == NULL) + ERR("malloc of aggFileSizeFromXfer failed"); + + test->results->aggFileSizeForBW = + (IOR_offset_t *)malloc(reps * sizeof(IOR_offset_t)); + if (test->results->aggFileSizeForBW == NULL) + ERR("malloc of aggFileSizeForBW failed"); + +} + +void FreeResults(IOR_test_t *test) +{ + if (test->results != NULL) { + free(test->results->aggFileSizeFromStat); + free(test->results->aggFileSizeFromXfer); + free(test->results->aggFileSizeForBW); + free(test->results->readTime); + free(test->results->writeTime); + free(test->results); + } +} + + +/* + * Create new test for list of tests. + */ +IOR_test_t *CreateTest(IOR_param_t *init_params, int test_num) +{ + IOR_test_t *newTest = NULL; + + newTest = (IOR_test_t *) malloc(sizeof(IOR_test_t)); + if (newTest == NULL) + ERR("malloc() of IOR_test_t failed"); + newTest->params = *init_params; + GetPlatformName(newTest->params.platform); + newTest->params.nodes = init_params->numTasks / tasksPerNode; + newTest->params.tasksPerNode = tasksPerNode; + newTest->params.id = test_num; + newTest->next = NULL; + newTest->results = NULL; + return newTest; +} + +static void DestroyTest(IOR_test_t *test) +{ + FreeResults(test); + free(test); +} + +static void DestroyTests(IOR_test_t *tests_head) +{ + IOR_test_t *tptr, *next; + + for (tptr = tests_head; tptr != NULL; tptr = next) { + next = tptr->next; + DestroyTest(tptr); + } +} + +/* + * Sleep for 'delay' seconds. + */ +static void DelaySecs(int delay) +{ + if (rank == 0 && delay > 0) { + if (verbose >= VERBOSE_1) + fprintf(stdout, "delaying %d seconds . . .\n", delay); + sleep(delay); + } +} + +/* + * Display freespace (df). + */ +static void DisplayFreespace(IOR_param_t * test) +{ + char fileName[MAX_STR] = { 0 }; + int i; + int directoryFound = FALSE; + + /* get outfile name */ + GetTestFileName(fileName, test); + + /* get directory for outfile */ + i = strlen(fileName); + while (i-- > 0) { + if (fileName[i] == '/') { + fileName[i] = '\0'; + directoryFound = TRUE; + break; + } + } + + /* if no directory/, use '.' */ + if (directoryFound == FALSE) { + strcpy(fileName, "."); + } + + ShowFileSystemSize(fileName); + + return; +} + +/* + * Display usage of script file. + */ +static void DisplayUsage(char **argv) +{ + char *opts[] = { + "OPTIONS:", + " -a S api -- API for I/O [POSIX|MPIIO|HDF5|NCMPI]", + " -A N refNum -- user supplied reference number to include in the summary", + " -b N blockSize -- contiguous bytes to write per task (e.g.: 8, 4k, 2m, 1g)", + " -B useO_DIRECT -- uses O_DIRECT for POSIX, bypassing I/O buffers", + " -c collective -- collective I/O", + " -C reorderTasks -- changes task ordering to n+1 ordering for readback", + " -d N interTestDelay -- delay between reps in seconds", + " -D N deadlineForStonewalling -- seconds before stopping write or read phase", + " -e fsync -- perform fsync upon POSIX write close", + " -E useExistingTestFile -- do not remove test file before write access", + " -f S scriptFile -- test script name", + " -F filePerProc -- file-per-process", + " -g intraTestBarriers -- use barriers between open, write/read, and close", + " -G N setTimeStampSignature -- set value for time stamp signature", + " -h showHelp -- displays options and help", + " -H showHints -- show hints", + " -i N repetitions -- number of repetitions of test", + " -I individualDataSets -- datasets not shared by all procs [not working]", + " -j N outlierThreshold -- warn on outlier N seconds from mean", + " -J N setAlignment -- HDF5 alignment in bytes (e.g.: 8, 4k, 2m, 1g)", + " -k keepFile -- don't remove the test file(s) on program exit", + " -K keepFileWithError -- keep error-filled file(s) after data-checking", + " -l storeFileOffset -- use file offset as stored signature", + " -m multiFile -- use number of reps (-i) for multiple file count", + " -M N memoryPerNode -- hog memory on the node (e.g.: 2g, 75%)", + " -n noFill -- no fill in HDF5 file creation", + " -N N numTasks -- number of tasks that should participate in the test", + " -o S testFile -- full name for test", + " -O S string of IOR directives (e.g. -O checkRead=1,lustreStripeCount=32)", + " -p preallocate -- preallocate file size", + " -P useSharedFilePointer -- use shared file pointer [not working]", + " -q quitOnError -- during file error-checking, abort on error", + " -Q N taskPerNodeOffset for read tests use with -C & -Z options (-C constant N, -Z at least N)", + " -r readFile -- read existing file", + " -R checkRead -- check read after read", + " -s N segmentCount -- number of segments", + " -S useStridedDatatype -- put strided access into datatype [not working]", + " -t N transferSize -- size of transfer in bytes (e.g.: 8, 4k, 2m, 1g)", + " -T N maxTimeDuration -- max time in minutes for each test", + " -u uniqueDir -- use unique directory name for each file-per-process", + " -U S hintsFileName -- full name for hints file", + " -v verbose -- output information (repeating flag increases level)", + " -V useFileView -- use MPI_File_set_view", + " -w writeFile -- write file", + " -W checkWrite -- check read after write", + " -x singleXferAttempt -- do not retry transfer if incomplete", + " -X N reorderTasksRandomSeed -- random seed for -Z option", + " -Y fsyncPerWrite -- perform fsync after each POSIX write", + " -z randomOffset -- access is to random, not sequential, offsets within a file", + " -Z reorderTasksRandom -- changes task ordering to random ordering for readback", + " ", + " NOTE: S is a string, N is an integer number.", + " ", + "" + }; + int i = 0; + + fprintf(stdout, "Usage: %s [OPTIONS]\n\n", *argv); + for (i = 0; strlen(opts[i]) > 0; i++) + fprintf(stdout, "%s\n", opts[i]); + + return; +} + +/* + * Distribute IOR_HINTs to all tasks' environments. + */ +void DistributeHints(void) +{ + char hint[MAX_HINTS][MAX_STR], fullHint[MAX_STR], hintVariable[MAX_STR]; + int hintCount = 0, i; + + if (rank == 0) { + for (i = 0; environ[i] != NULL; i++) { + if (strncmp(environ[i], "IOR_HINT", strlen("IOR_HINT")) + == 0) { + hintCount++; + if (hintCount == MAX_HINTS) { + WARN("exceeded max hints; reset MAX_HINTS and recompile"); + hintCount = MAX_HINTS; + break; + } + /* assume no IOR_HINT is greater than MAX_STR in length */ + strncpy(hint[hintCount - 1], environ[i], + MAX_STR - 1); + } + } + } + + MPI_CHECK(MPI_Bcast(&hintCount, sizeof(hintCount), MPI_BYTE, + 0, MPI_COMM_WORLD), "cannot broadcast hints"); + for (i = 0; i < hintCount; i++) { + MPI_CHECK(MPI_Bcast(&hint[i], MAX_STR, MPI_BYTE, + 0, MPI_COMM_WORLD), + "cannot broadcast hints"); + strcpy(fullHint, hint[i]); + strcpy(hintVariable, strtok(fullHint, "=")); + if (getenv(hintVariable) == NULL) { + /* doesn't exist in this task's environment; better set it */ + if (putenv(hint[i]) != 0) + WARN("cannot set environment variable"); + } + } +} + +/* + * Fill buffer, which is transfer size bytes long, with known 8-byte long long + * int values. In even-numbered 8-byte long long ints, store MPI task in high + * bits and timestamp signature in low bits. In odd-numbered 8-byte long long + * ints, store transfer offset. If storeFileOffset option is used, the file + * (not transfer) offset is stored instead. + */ +static void +FillBuffer(void *buffer, + IOR_param_t * test, unsigned long long offset, int fillrank) +{ + size_t i; + unsigned long long hi, lo; + unsigned long long *buf = (unsigned long long *)buffer; + + hi = ((unsigned long long)fillrank) << 32; + lo = (unsigned long long)test->timeStampSignatureValue; + for (i = 0; i < test->transferSize / sizeof(unsigned long long); i++) { + if ((i % 2) == 0) { + /* evens contain MPI rank and time in seconds */ + buf[i] = hi | lo; + } else { + /* odds contain offset */ + buf[i] = offset + (i * sizeof(unsigned long long)); + } + } +} + +/* + * Return string describing machine name and type. + */ +void GetPlatformName(char *platformName) +{ + char nodeName[MAX_STR], *p, *start, sysName[MAX_STR]; + struct utsname name; + + if (uname(&name) != 0) { + EWARN("cannot get platform name"); + sprintf(sysName, "%s", "Unknown"); + sprintf(nodeName, "%s", "Unknown"); + } else { + sprintf(sysName, "%s", name.sysname); + sprintf(nodeName, "%s", name.nodename); + } + + start = nodeName; + if (strlen(nodeName) == 0) { + p = start; + } else { + /* point to one character back from '\0' */ + p = start + strlen(nodeName) - 1; + } + /* + * to cut off trailing node number, search backwards + * for the first non-numeric character + */ + while (p != start) { + if (*p < '0' || *p > '9') { + *(p + 1) = '\0'; + break; + } else { + p--; + } + } + + sprintf(platformName, "%s(%s)", nodeName, sysName); +} + +/* + * Return test file name to access. + * for single shared file, fileNames[0] is returned in testFileName + */ +static void GetTestFileName(char *testFileName, IOR_param_t * test) +{ + char **fileNames, + initialTestFileName[MAXPATHLEN], + testFileNameRoot[MAX_STR], tmpString[MAX_STR]; + int count; + + /* parse filename for multiple file systems */ + strcpy(initialTestFileName, test->testFileName); + fileNames = ParseFileName(initialTestFileName, &count); + if (count > 1 && test->uniqueDir == TRUE) + ERR("cannot use multiple file names with unique directories"); + if (test->filePerProc) { + strcpy(testFileNameRoot, + fileNames[((rank + + rankOffset) % test->numTasks) % count]); + } else { + strcpy(testFileNameRoot, fileNames[0]); + } + + /* give unique name if using multiple files */ + if (test->filePerProc) { + /* + * prepend rank subdirectory before filename + * e.g., /dir/file => /dir//file + */ + if (test->uniqueDir == TRUE) { + strcpy(testFileNameRoot, + PrependDir(test, testFileNameRoot)); + } + sprintf(testFileName, "%s.%08d", testFileNameRoot, + (rank + rankOffset) % test->numTasks); + } else { + strcpy(testFileName, testFileNameRoot); + } + + /* add suffix for multiple files */ + if (test->repCounter > -1) { + sprintf(tmpString, ".%d", test->repCounter); + strcat(testFileName, tmpString); + } +} + +/* + * Get time stamp. Use MPI_Timer() unless _NO_MPI_TIMER is defined, + * in which case use gettimeofday(). + */ +static double GetTimeStamp(void) +{ + double timeVal; +#ifdef _NO_MPI_TIMER + struct timeval timer; + + if (gettimeofday(&timer, (struct timezone *)NULL) != 0) + ERR("cannot use gettimeofday()"); + timeVal = (double)timer.tv_sec + ((double)timer.tv_usec / 1000000); +#else /* not _NO_MPI_TIMER */ + timeVal = MPI_Wtime(); /* no MPI_CHECK(), just check return value */ + if (timeVal < 0) + ERR("cannot use MPI_Wtime()"); +#endif /* _NO_MPI_TIMER */ + + /* wall_clock_delta is difference from root node's time */ + timeVal -= wall_clock_delta; + + return (timeVal); +} + +/* + * Convert IOR_offset_t value to human readable string. + */ +static char *HumanReadable(IOR_offset_t value, int base) +{ + char *valueStr; + int m = 0, g = 0; + char m_str[8], g_str[8]; + + valueStr = (char *)malloc(MAX_STR); + if (valueStr == NULL) + ERR("out of memory"); + + if (base == BASE_TWO) { + m = MEBIBYTE; + g = GIBIBYTE; + strcpy(m_str, "MiB"); + strcpy(g_str, "GiB"); + } else if (base == BASE_TEN) { + m = MEGABYTE; + g = GIGABYTE; + strcpy(m_str, "MB"); + strcpy(g_str, "GB"); + } + + if (value >= g) { + if (value % (IOR_offset_t) g) { + sprintf(valueStr, "%.2f %s", + (double)((double)value / g), g_str); + } else { + sprintf(valueStr, "%d %s", (int)(value / g), g_str); + } + } else if (value >= m) { + if (value % (IOR_offset_t) m) { + sprintf(valueStr, "%.2f %s", + (double)((double)value / m), m_str); + } else { + sprintf(valueStr, "%d %s", (int)(value / m), m_str); + } + } else if (value >= 0) { + sprintf(valueStr, "%d bytes", (int)value); + } else { + sprintf(valueStr, "-"); + } + return valueStr; +} + +/* + * Parse file name. + */ +static char **ParseFileName(char *name, int *count) +{ + char **fileNames, *tmp, *token; + char delimiterString[3] = { FILENAME_DELIMITER, '\n', '\0' }; + int i = 0; + + *count = 0; + tmp = name; + + /* pass one */ + /* if something there, count the first item */ + if (*tmp != '\0') { + (*count)++; + } + /* count the rest of the filenames */ + while (*tmp != '\0') { + if (*tmp == FILENAME_DELIMITER) { + (*count)++; + } + tmp++; + } + + fileNames = (char **)malloc((*count) * sizeof(char **)); + if (fileNames == NULL) + ERR("out of memory"); + + /* pass two */ + token = strtok(name, delimiterString); + while (token != NULL) { + fileNames[i] = token; + token = strtok(NULL, delimiterString); + i++; + } + return (fileNames); +} + +/* + * Pretty Print a Double. The First parameter is a flag determining if left + * justification should be used. The third parameter a null-terminated string + * that should be appended to the number field. + */ +static void PPDouble(int leftjustify, double number, char *append) +{ + char format[16]; + int width = 10; + int precision; + + if (number < 0) { + fprintf(stdout, " - %s", append); + return; + } + + if (number < 1) + precision = 6; + else if (number < 3600) + precision = 2; + else + precision = 0; + + sprintf(format, "%%%s%d.%df%%s", + leftjustify ? "-" : "", + width, precision); + + printf(format, number, append); +} + +/* + * From absolute directory, insert rank as subdirectory. Allows each task + * to write to its own directory. E.g., /dir/file => /dir//file. + */ +static char *PrependDir(IOR_param_t * test, char *rootDir) +{ + char *dir; + char fname[MAX_STR + 1]; + char *p; + int i; + + dir = (char *)malloc(MAX_STR + 1); + if (dir == NULL) + ERR("out of memory"); + + /* get dir name */ + strcpy(dir, rootDir); + i = strlen(dir) - 1; + while (i > 0) { + if (dir[i] == '\0' || dir[i] == '/') { + dir[i] = '/'; + dir[i + 1] = '\0'; + break; + } + i--; + } + + /* get file name */ + strcpy(fname, rootDir); + p = fname; + while (i > 0) { + if (fname[i] == '\0' || fname[i] == '/') { + p = fname + (i + 1); + break; + } + i--; + } + + /* create directory with rank as subdirectory */ + sprintf(dir, "%s%d", dir, (rank + rankOffset) % test->numTasks); + + /* dir doesn't exist, so create */ + if (access(dir, F_OK) != 0) { + if (mkdir(dir, S_IRWXU) < 0) { + ERR("cannot create directory"); + } + + /* check if correct permissions */ + } else if (access(dir, R_OK) != 0 || access(dir, W_OK) != 0 || + access(dir, X_OK) != 0) { + ERR("invalid directory permissions"); + } + + /* concatenate dir and file names */ + strcat(dir, "/"); + strcat(dir, p); + + return dir; +} + +/* + * Read and then reread buffer to confirm data read twice matches. + */ +static void +ReadCheck(void *fd, + void *buffer, + void *checkBuffer, + void *readCheckBuffer, + IOR_param_t *params, + IOR_offset_t transfer, + IOR_offset_t blockSize, + IOR_offset_t *amtXferred, + IOR_offset_t *transferCount, int access, int *errors) +{ + int readCheckToRank; + int readCheckFromRank; + MPI_Status status; + IOR_offset_t tmpOffset; + IOR_offset_t segmentSize; + IOR_offset_t segmentNum; + + memset(buffer, 'a', transfer); + *amtXferred = backend->xfer(access, fd, buffer, transfer, params); + tmpOffset = params->offset; + if (params->filePerProc == FALSE) { + /* offset changes for shared file, not for file-per-proc */ + segmentSize = params->numTasks * blockSize; + segmentNum = params->offset / segmentSize; + + /* work in current segment */ + params->offset = (((params->offset % segmentSize) + /* offset to neighbor's data */ + + ((params->reorderTasks ? + params->tasksPerNode : 0) * blockSize)) + /* stay within current segment */ + % segmentSize) + /* return segment to actual file offset */ + + (segmentNum * segmentSize); + } + if (*amtXferred != transfer) + ERR("cannot read from file on read check"); + memset(checkBuffer, 'a', transfer); /* empty buffer */ + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + if (params->filePerProc) { + *amtXferred = backend->xfer(access, params->fd_fppReadCheck, + checkBuffer, transfer, params); + } else { + *amtXferred = + backend->xfer(access, fd, checkBuffer, transfer, params); + } + params->offset = tmpOffset; + if (*amtXferred != transfer) + ERR("cannot reread from file read check"); + (*transferCount)++; + /* exchange buffers */ + memset(readCheckBuffer, 'a', transfer); + readCheckToRank = (rank + (params->reorderTasks ? params->tasksPerNode : 0)) + % params->numTasks; + readCheckFromRank = (rank + (params->numTasks + - + (params-> + reorderTasks ? params->tasksPerNode : 0))) + % params->numTasks; + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + MPI_Sendrecv(checkBuffer, transfer, MPI_CHAR, readCheckToRank, 1, + readCheckBuffer, transfer, MPI_CHAR, readCheckFromRank, 1, + testComm, &status); + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + *errors += CompareBuffers(buffer, readCheckBuffer, transfer, + *transferCount, params, READCHECK); + return; +} + +/******************************************************************************/ +/* + * Reduce test results, and show if verbose set. + */ + +static void ReduceIterResults(IOR_test_t *test, double **timer, int rep, + int access) +{ + double reduced[12] = { 0 }; + double diff[6]; + double *diff_subset; + double totalTime; + double bw; + enum { RIGHT, LEFT }; + int i; + MPI_Op op; + + assert(access == WRITE || access == READ); + + /* Find the minimum start time of the even numbered timers, and the + maximum finish time for the odd numbered timers */ + for (i = 0; i < 12; i++) { + op = i % 2 ? MPI_MAX : MPI_MIN; + MPI_CHECK(MPI_Reduce(&timer[i][rep], &reduced[i], 1, MPI_DOUBLE, + op, 0, testComm), "MPI_Reduce()"); + } + + if (rank != 0) { + /* Only rank 0 tallies and prints the results. */ + return; + } + + /* Calculate elapsed times and throughput numbers */ + for (i = 0; i < 6; i++) { + diff[i] = reduced[2 * i + 1] - reduced[2 * i]; + } + if (access == WRITE) { + totalTime = reduced[5] - reduced[0]; + test->results->writeTime[rep] = totalTime; + diff_subset = &diff[0]; + } else { /* READ */ + totalTime = reduced[11] - reduced[6]; + test->results->readTime[rep] = totalTime; + diff_subset = &diff[3]; + } + + if (verbose < VERBOSE_0) { + return; + } + + fprintf(stdout, "%-10s", access == WRITE ? "write" : "read"); + bw = (double)test->results->aggFileSizeForBW[rep] / totalTime; + PPDouble(LEFT, bw / MEBIBYTE, " "); + PPDouble(LEFT, (double)test->params.blockSize / KIBIBYTE, " "); + PPDouble(LEFT, (double)test->params.transferSize / KIBIBYTE, " "); + PPDouble(LEFT, diff_subset[0], " "); + PPDouble(LEFT, diff_subset[1], " "); + PPDouble(LEFT, diff_subset[2], " "); + PPDouble(LEFT, totalTime, " "); + fprintf(stdout, "%-4d\n", rep); + + fflush(stdout); +} + +static void PrintRemoveTiming(double start, double finish, int rep) +{ + if (rank != 0 || verbose < VERBOSE_0) + return; + + printf("remove - - - - - - "); + PPDouble(1, finish-start, " "); + printf("%-4d\n", rep); +} + +/* + * Check for file(s), then remove all files if file-per-proc, else single file. + */ +static void RemoveFile(char *testFileName, int filePerProc, IOR_param_t * test) +{ + int tmpRankOffset; + if (filePerProc) { + /* in random tasks, delete own file */ + if (test->reorderTasksRandom == TRUE) { + tmpRankOffset = rankOffset; + rankOffset = 0; + GetTestFileName(testFileName, test); + } + if (access(testFileName, F_OK) == 0) { + backend->delete(testFileName, test); + } + if (test->reorderTasksRandom == TRUE) { + rankOffset = tmpRankOffset; + GetTestFileName(testFileName, test); + } + } else { + if ((rank == 0) && (access(testFileName, F_OK) == 0)) { + backend->delete(testFileName, test); + } + } +} + +/* + * Determine any spread (range) between node times. + */ +static double TimeDeviation(void) +{ + double timestamp; + double min = 0; + double max = 0; + double roottimestamp; + + MPI_CHECK(MPI_Barrier(MPI_COMM_WORLD), "barrier error"); + timestamp = GetTimeStamp(); + MPI_CHECK(MPI_Reduce(×tamp, &min, 1, MPI_DOUBLE, + MPI_MIN, 0, MPI_COMM_WORLD), + "cannot reduce tasks' times"); + MPI_CHECK(MPI_Reduce(×tamp, &max, 1, MPI_DOUBLE, + MPI_MAX, 0, MPI_COMM_WORLD), + "cannot reduce tasks' times"); + + /* delta between individual nodes' time and root node's time */ + roottimestamp = timestamp; + MPI_CHECK(MPI_Bcast(&roottimestamp, 1, MPI_DOUBLE, 0, MPI_COMM_WORLD), + "cannot broadcast root's time"); + wall_clock_delta = timestamp - roottimestamp; + + return max - min; +} + +/* + * Setup tests by parsing commandline and creating test script. + */ +static IOR_test_t *SetupTests(int argc, char **argv) +{ + IOR_test_t *tests, *testsHead; + + /* count the tasks per node */ + tasksPerNode = CountTasksPerNode(numTasksWorld, MPI_COMM_WORLD); + + testsHead = tests = ParseCommandLine(argc, argv); + /* + * Since there is no guarantee that anyone other than + * task 0 has the environment settings for the hints, pass + * the hint=value pair to everyone else in MPI_COMM_WORLD + */ + DistributeHints(); + + /* check validity of tests and create test queue */ + while (tests != NULL) { + ValidTests(&tests->params); + tests = tests->next; + } + + /* check for skew between tasks' start times */ + wall_clock_deviation = TimeDeviation(); + + /* seed random number generator */ + SeedRandGen(MPI_COMM_WORLD); + + return (testsHead); +} + +/* + * Setup transfer buffers, creating and filling as needed. + */ +static void XferBuffersSetup(void **buffer, void **checkBuffer, + void **readCheckBuffer, int access, + IOR_param_t * test, int pretendRank) +{ + *buffer = aligned_buffer_alloc(test->transferSize); + FillBuffer(*buffer, test, 0, pretendRank); + if (access == WRITECHECK || access == READCHECK) { + *checkBuffer = aligned_buffer_alloc(test->transferSize); + } + if (access == READCHECK) { + *readCheckBuffer = aligned_buffer_alloc(test->transferSize); + } + + return; +} + +/* + * Free transfer buffers. + */ +static void XferBuffersFree(void *buffer, void *checkBuffer, + void *readCheckBuffer, int access) +{ + aligned_buffer_free(buffer); + if (access == WRITECHECK || access == READCHECK) { + aligned_buffer_free(checkBuffer); + } + if (access == READCHECK) { + aligned_buffer_free(readCheckBuffer); + } + + return; +} + + +/* + * Message to print immediately after MPI_Init so we know that + * ior has started. + */ +static void PrintEarlyHeader() +{ + if (rank != 0) + return; + +#ifdef HAVE_CONFIG_H + printf("IOR-" META_VERSION ": MPI Coordinated Test of Parallel I/O\n"); +#else + printf("IOR-: MPI Coordinated Test of Parallel I/O\n"); +#endif + printf("\n"); + fflush(stdout); +} + +static void PrintHeader(int argc, char **argv) +{ + struct utsname unamebuf; + int i; + + if (rank != 0) + return; + + fprintf(stdout, "Began: %s", CurrentTimeString()); + fprintf(stdout, "Command line used:"); + for (i = 0; i < argc; i++) { + fprintf(stdout, " %s", argv[i]); + } + fprintf(stdout, "\n"); + if (uname(&unamebuf) != 0) { + EWARN("uname failed"); + fprintf(stdout, "Machine: Unknown"); + } else { + fprintf(stdout, "Machine: %s %s", unamebuf.sysname, + unamebuf.nodename); + if (verbose >= VERBOSE_2) { + fprintf(stdout, " %s %s %s", unamebuf.release, + unamebuf.version, unamebuf.machine); + } + } + fprintf(stdout, "\n"); +#ifdef _NO_MPI_TIMER + if (verbose >= VERBOSE_2) + fprintf(stdout, "Using unsynchronized POSIX timer\n"); +#else /* not _NO_MPI_TIMER */ + if (MPI_WTIME_IS_GLOBAL) { + if (verbose >= VERBOSE_2) + fprintf(stdout, "Using synchronized MPI timer\n"); + } else { + if (verbose >= VERBOSE_2) + fprintf(stdout, "Using unsynchronized MPI timer\n"); + } +#endif /* _NO_MPI_TIMER */ + if (verbose >= VERBOSE_1) { + fprintf(stdout, "Start time skew across all tasks: %.02f sec\n", + wall_clock_deviation); + } + if (verbose >= VERBOSE_3) { /* show env */ + fprintf(stdout, "STARTING ENVIRON LOOP\n"); + for (i = 0; environ[i] != NULL; i++) { + fprintf(stdout, "%s\n", environ[i]); + } + fprintf(stdout, "ENDING ENVIRON LOOP\n"); + } + fflush(stdout); +} + +/* + * Print header information for test output. + */ +static void ShowTestInfo(IOR_param_t *params) +{ + fprintf(stdout, "\n"); + fprintf(stdout, "Test %d started: %s", params->id, CurrentTimeString()); + if (verbose >= VERBOSE_1) { + /* if pvfs2:, then skip */ + if (Regex(params->testFileName, "^[a-z][a-z].*:") == 0) { + DisplayFreespace(params); + } + } + fflush(stdout); +} + +/* + * Show simple test output with max results for iterations. + */ +static void ShowSetup(IOR_param_t *params) +{ + + if (strcmp(params->debug, "") != 0) { + printf("\n*** DEBUG MODE ***\n"); + printf("*** %s ***\n\n", params->debug); + } + printf("Summary:\n"); + printf("\tapi = %s\n", params->apiVersion); + printf("\ttest filename = %s\n", params->testFileName); + printf("\taccess = "); + printf(params->filePerProc ? "file-per-process" : "single-shared-file"); + if (verbose >= VERBOSE_1 && strcmp(params->api, "POSIX") != 0) { + printf(params->collective == FALSE ? ", independent" : ", collective"); + } + printf("\n"); + if (verbose >= VERBOSE_1) { + if (params->segmentCount > 1) { + fprintf(stdout, + "\tpattern = strided (%d segments)\n", + (int)params->segmentCount); + } else { + fprintf(stdout, + "\tpattern = segmented (1 segment)\n"); + } + } + printf("\tordering in a file ="); + if (params->blastMode == FALSE) { + if (params->randomOffset == FALSE) { + printf(" sequential offsets\n"); + } else { + printf(" random offsets\n"); + } + } else { + printf(" dynamic offsets (BLAST mode)\n"); + } + printf("\tordering inter file="); + if (params->reorderTasks == FALSE && params->reorderTasksRandom == FALSE) { + printf(" no tasks offsets\n"); + } + if (params->reorderTasks == TRUE) { + printf(" constant task offsets = %d\n", + params->taskPerNodeOffset); + } + if (params->reorderTasksRandom == TRUE) { + printf(" random task offsets >= %d, seed=%d\n", + params->taskPerNodeOffset, params->reorderTasksRandomSeed); + } + printf("\tclients = %d (%d per node)\n", + params->numTasks, params->tasksPerNode); +#ifdef _OPENMP +#pragma omp parallel + { +#pragma omp single + { + if (params->blastMode) { + printf("\tthreads per client = %d\n", omp_get_num_threads() ); + } + } + } +#endif + if (params->memoryPerTask != 0) + printf("\tmemoryPerTask = %s\n", + HumanReadable(params->memoryPerTask, BASE_TWO)); + if (params->memoryPerNode != 0) + printf("\tmemoryPerNode = %s\n", + HumanReadable(params->memoryPerNode, BASE_TWO)); + printf("\trepetitions = %d\n", params->repetitions); + printf("\txfersize = %s\n", + HumanReadable(params->transferSize, BASE_TWO)); + printf("\tblocksize = %s\n", + HumanReadable(params->blockSize, BASE_TWO)); + printf("\taggregate filesize = %s\n", + HumanReadable(params->expectedAggFileSize, BASE_TWO)); +#ifdef HAVE_LUSTRE_LUSTRE_USER_H + if (params->lustre_set_striping) { + printf("\tLustre stripe size = %s\n", + ((params->lustre_stripe_size == 0) ? "Use default" : + HumanReadable(params->lustre_stripe_size, BASE_TWO))); + if (params->lustre_stripe_count == 0) { + printf("\t stripe count = %s\n", "Use default"); + } else { + printf("\t stripe count = %d\n", + params->lustre_stripe_count); + } + } +#endif /* HAVE_LUSTRE_LUSTRE_USER_H */ + if (params->deadlineForStonewalling > 0) { + printf("\tUsing stonewalling = %d second(s)\n", + params->deadlineForStonewalling); + } + fflush(stdout); +} + +/* + * Show test description. + */ +static void ShowTest(IOR_param_t * test) +{ + fprintf(stdout, "TEST:\t%s=%d\n", "id", test->id); + fprintf(stdout, "\t%s=%d\n", "refnum", test->referenceNumber); + fprintf(stdout, "\t%s=%s\n", "api", test->api); + fprintf(stdout, "\t%s=%s\n", "platform", test->platform); + fprintf(stdout, "\t%s=%s\n", "testFileName", test->testFileName); + fprintf(stdout, "\t%s=%s\n", "hintsFileName", test->hintsFileName); + fprintf(stdout, "\t%s=%d\n", "deadlineForStonewall", + test->deadlineForStonewalling); + fprintf(stdout, "\t%s=%d\n", "maxTimeDuration", test->maxTimeDuration); + fprintf(stdout, "\t%s=%d\n", "outlierThreshold", + test->outlierThreshold); + fprintf(stdout, "\t%s=%s\n", "options", test->options); + fprintf(stdout, "\t%s=%d\n", "nodes", test->nodes); + fprintf(stdout, "\t%s=%lu\n", "memoryPerTask", (unsigned long) test->memoryPerTask); + fprintf(stdout, "\t%s=%lu\n", "memoryPerNode", (unsigned long) test->memoryPerNode); + fprintf(stdout, "\t%s=%d\n", "tasksPerNode", tasksPerNode); + fprintf(stdout, "\t%s=%d\n", "threadsPerTask", test->threadsPerTask); + fprintf(stdout, "\t%s=%d\n", "repetitions", test->repetitions); + fprintf(stdout, "\t%s=%d\n", "multiFile", test->multiFile); + fprintf(stdout, "\t%s=%d\n", "interTestDelay", test->interTestDelay); + fprintf(stdout, "\t%s=%d\n", "fsync", test->fsync); + fprintf(stdout, "\t%s=%d\n", "fsYncperwrite", test->fsyncPerWrite); + fprintf(stdout, "\t%s=%d\n", "useExistingTestFile", + test->useExistingTestFile); + fprintf(stdout, "\t%s=%d\n", "showHints", test->showHints); + fprintf(stdout, "\t%s=%d\n", "uniqueDir", test->uniqueDir); + fprintf(stdout, "\t%s=%d\n", "showHelp", test->showHelp); + fprintf(stdout, "\t%s=%d\n", "individualDataSets", + test->individualDataSets); + fprintf(stdout, "\t%s=%d\n", "singleXferAttempt", + test->singleXferAttempt); + fprintf(stdout, "\t%s=%d\n", "readFile", test->readFile); + fprintf(stdout, "\t%s=%d\n", "writeFile", test->writeFile); + fprintf(stdout, "\t%s=%d\n", "filePerProc", test->filePerProc); + fprintf(stdout, "\t%s=%d\n", "reorderTasks", test->reorderTasks); + fprintf(stdout, "\t%s=%d\n", "reorderTasksRandom", + test->reorderTasksRandom); + fprintf(stdout, "\t%s=%d\n", "reorderTasksRandomSeed", + test->reorderTasksRandomSeed); + fprintf(stdout, "\t%s=%d\n", "randomOffset", test->randomOffset); + fprintf(stdout, "\t%s=%d\n", "blastMode", test->blastMode); + fprintf(stdout, "\t%s=%d\n", "checkWrite", test->checkWrite); + fprintf(stdout, "\t%s=%d\n", "checkRead", test->checkRead); + fprintf(stdout, "\t%s=%d\n", "preallocate", test->preallocate); + fprintf(stdout, "\t%s=%d\n", "useFileView", test->useFileView); + fprintf(stdout, "\t%s=%lld\n", "setAlignment", test->setAlignment); + fprintf(stdout, "\t%s=%d\n", "storeFileOffset", test->storeFileOffset); + fprintf(stdout, "\t%s=%d\n", "useSharedFilePointer", + test->useSharedFilePointer); + fprintf(stdout, "\t%s=%d\n", "useO_DIRECT", test->useO_DIRECT); + fprintf(stdout, "\t%s=%d\n", "useStridedDatatype", + test->useStridedDatatype); + fprintf(stdout, "\t%s=%d\n", "keepFile", test->keepFile); + fprintf(stdout, "\t%s=%d\n", "keepFileWithError", + test->keepFileWithError); + fprintf(stdout, "\t%s=%d\n", "quitOnError", test->quitOnError); + fprintf(stdout, "\t%s=%d\n", "verbose", verbose); + fprintf(stdout, "\t%s=%d\n", "setTimeStampSignature", + test->setTimeStampSignature); + fprintf(stdout, "\t%s=%d\n", "collective", test->collective); + fprintf(stdout, "\t%s=%lld", "segmentCount", test->segmentCount); + if (strcmp(test->api, "HDF5") == 0) { + fprintf(stdout, " (datasets)"); + } + fprintf(stdout, "\n"); + fprintf(stdout, "\t%s=%lld\n", "transferSize", test->transferSize); + fprintf(stdout, "\t%s=%lld\n", "blockSize", test->blockSize); +} + +static double mean_of_array_of_doubles(double *values, int len) +{ + double tot = 0.0; + int i; + + for (i = 0; i < len; i++) { + tot += values[i]; + } + return tot / len; + +} + +struct results { + double min; + double max; + double mean; + double var; + double sd; + double sum; + double *val; +}; + +static struct results *bw_values(int reps, IOR_offset_t *agg_file_size, double *vals) +{ + struct results *r; + int i; + + r = (struct results *)malloc(sizeof(struct results) + + (reps * sizeof(double))); + if (r == NULL) + ERR("malloc failed"); + r->val = (double *)&r[1]; + + for (i = 0; i < reps; i++) { + r->val[i] = (double)agg_file_size[i] / vals[i]; + if (i == 0) { + r->min = r->val[i]; + r->max = r->val[i]; + r->sum = 0.0; + } + r->min = MIN(r->min, r->val[i]); + r->max = MAX(r->max, r->val[i]); + r->sum += r->val[i]; + } + r->mean = r->sum / reps; + r->var = 0.0; + for (i = 0; i < reps; i++) { + r->var += pow((r->mean - r->val[i]), 2); + } + r->var = r->var / reps; + r->sd = sqrt(r->var); + + return r; +} + +/* + * Summarize results + * + * operation is typically "write" or "read" + */ +static void PrintLongSummaryOneOperation(IOR_test_t *test, double *times, char *operation) +{ + IOR_param_t *params = &test->params; + IOR_results_t *results = test->results; + struct results *bw; + int reps; + + if (rank != 0 || verbose < VERBOSE_0) + return; + + reps = params->repetitions; + + bw = bw_values(reps, results->aggFileSizeForBW, times); + + fprintf(stdout, "%-9s ", operation); + fprintf(stdout, "%10.2f ", bw->max / MEBIBYTE); + fprintf(stdout, "%10.2f ", bw->min / MEBIBYTE); + fprintf(stdout, "%10.2f ", bw->mean / MEBIBYTE); + fprintf(stdout, "%10.2f ", bw->sd / MEBIBYTE); + fprintf(stdout, "%10.5f ", + mean_of_array_of_doubles(times, reps)); + fprintf(stdout, "%d ", params->id); + fprintf(stdout, "%d ", params->numTasks); + fprintf(stdout, "%d ", params->tasksPerNode); + fprintf(stdout, "%d ", params->repetitions); + fprintf(stdout, "%d ", params->filePerProc); + fprintf(stdout, "%d ", params->reorderTasks); + fprintf(stdout, "%d ", params->taskPerNodeOffset); + fprintf(stdout, "%d ", params->reorderTasksRandom); + fprintf(stdout, "%d ", params->reorderTasksRandomSeed); + fprintf(stdout, "%lld ", params->segmentCount); + fprintf(stdout, "%lld ", params->blockSize); + fprintf(stdout, "%lld ", params->transferSize); + fprintf(stdout, "%lld ", results->aggFileSizeForBW[0]); + fprintf(stdout, "%s ", params->api); + fprintf(stdout, "%d", params->referenceNumber); + fprintf(stdout, "\n"); + fflush(stdout); + + free(bw); +} + +static void PrintLongSummaryOneTest(IOR_test_t *test) +{ + IOR_param_t *params = &test->params; + IOR_results_t *results = test->results; + + if (params->writeFile) + PrintLongSummaryOneOperation(test, results->writeTime, "write"); + if (params->readFile) + PrintLongSummaryOneOperation(test, results->readTime, "read"); +} + +static void PrintLongSummaryHeader() +{ + if (rank != 0 || verbose < VERBOSE_0) + return; + + fprintf(stdout, "\n"); + fprintf(stdout, "%-9s %10s %10s %10s %10s %10s", + "Operation", "Max(MiB)", "Min(MiB)", "Mean(MiB)", "StdDev", + "Mean(s)"); + fprintf(stdout, " Test# #Tasks tPN reps fPP reord reordoff reordrand seed" + " segcnt blksiz xsize aggsize API RefNum\n"); +} + +static void PrintLongSummaryAllTests(IOR_test_t *tests_head) +{ + IOR_test_t *tptr; + + if (rank != 0 || verbose < VERBOSE_0) + return; + + fprintf(stdout, "\n"); + fprintf(stdout, "Summary of all tests:"); + PrintLongSummaryHeader(); + + for (tptr = tests_head; tptr != NULL; tptr = tptr->next) { + PrintLongSummaryOneTest(tptr); + } +} + +static void PrintShortSummary(IOR_test_t * test) +{ + IOR_param_t *params = &test->params; + IOR_results_t *results = test->results; + double max_write = 0.0; + double max_read = 0.0; + double bw; + int reps; + int i; + + if (rank != 0 || verbose < VERBOSE_0) + return; + + reps = params->repetitions; + + max_write = results->writeTime[0]; + max_read = results->readTime[0]; + for (i = 0; i < reps; i++) { + bw = (double)results->aggFileSizeForBW[i]/results->writeTime[i]; + max_write = MAX(bw, max_write); + bw = (double)results->aggFileSizeForBW[i]/results->readTime[i]; + max_read = MAX(bw, max_read); + } + + fprintf(stdout, "\n"); + if (params->writeFile) { + fprintf(stdout, "Max Write: %.2f MiB/sec (%.2f MB/sec)\n", + max_write/MEBIBYTE, max_write/MEGABYTE); + } + if (params->readFile) { + fprintf(stdout, "Max Read: %.2f MiB/sec (%.2f MB/sec)\n", + max_read/MEBIBYTE, max_read/MEGABYTE); + } +} + +/* + * malloc a buffer, touching every page in an attempt to defeat lazy allocation. + */ +static void *malloc_and_touch(size_t size) +{ + size_t page_size; + char *buf; + char *ptr; + + if (size == 0) + return NULL; + + page_size = sysconf(_SC_PAGESIZE); + + buf = (char *)malloc(size); + if (buf == NULL) + return NULL; + + for (ptr = buf; ptr < buf+size; ptr += page_size) { + *ptr = (char)1; + } + + return (void *)buf; +} + +static void file_hits_histogram(IOR_param_t *params) +{ + int *rankoffs; + int *filecont; + int *filehits; + int ifile; + int jfile; + + if (rank == 0) { + rankoffs = (int *)malloc(params->numTasks * sizeof(int)); + filecont = (int *)malloc(params->numTasks * sizeof(int)); + filehits = (int *)malloc(params->numTasks * sizeof(int)); + } + + MPI_CHECK(MPI_Gather(&rankOffset, 1, MPI_INT, rankoffs, + 1, MPI_INT, 0, MPI_COMM_WORLD), + "MPI_Gather error"); + + if (rank != 0) + return; + + memset((void *)filecont, 0, params->numTasks * sizeof(int)); + for (ifile = 0; ifile < params->numTasks; ifile++) { + filecont[(ifile + rankoffs[ifile]) % params->numTasks]++; + } + memset((void *)filehits, 0, params->numTasks * sizeof(int)); + for (ifile = 0; ifile < params->numTasks; ifile++) + for (jfile = 0; jfile < params->numTasks; jfile++) { + if (ifile == filecont[jfile]) + filehits[ifile]++; + } + fprintf(stdout, "#File Hits Dist:"); + jfile = 0; + ifile = 0; + while (jfile < params->numTasks && ifile < params->numTasks) { + fprintf(stdout, " %d", filehits[ifile]); + jfile += filehits[ifile], ifile++; + } + fprintf(stdout, "\n"); + free(rankoffs); + free(filecont); + free(filehits); +} + + +int test_time_elapsed(IOR_param_t *params, double startTime) +{ + double endTime; + + if (params->maxTimeDuration == 0) + return 0; + + endTime = startTime + (params->maxTimeDuration * 60); + + return GetTimeStamp() >= endTime; +} + +/* + * hog some memory as a rough simulation of a real application's memory use + */ +static void *HogMemory(IOR_param_t *params) +{ + size_t size; + void *buf; + + if (params->memoryPerTask != 0) { + size = params->memoryPerTask; + } else if (params->memoryPerNode != 0) { + if (verbose >= VERBOSE_3) + fprintf(stderr, "This node hogging %ld bytes of memory\n", + params->memoryPerNode); + size = params->memoryPerNode / params->tasksPerNode; + } else { + return NULL; + } + + if (verbose >= VERBOSE_3) + fprintf(stderr, "This task hogging %ld bytes of memory\n", size); + + buf = malloc_and_touch(size); + if (buf == NULL) + ERR("malloc of simulated applciation buffer failed"); + + return buf; +} + +/* + * Using the test parameters, run iteration(s) of single test. + */ +static void TestIoSys(IOR_test_t *test) +{ + IOR_param_t *params = &test->params; + IOR_results_t *results = test->results; + char testFileName[MAX_STR]; + double *timer[12]; + double startTime; + int i, rep; + void *fd; + MPI_Group orig_group, new_group; + int range[3]; + IOR_offset_t dataMoved; /* for data rate calculation */ + void *hog_buf; + + /* set up communicator for test */ + if (params->numTasks > numTasksWorld) { + if (rank == 0) { + fprintf(stdout, + "WARNING: More tasks requested (%d) than available (%d),", + params->numTasks, numTasksWorld); + fprintf(stdout, " running on %d tasks.\n", + numTasksWorld); + } + params->numTasks = numTasksWorld; + } + MPI_CHECK(MPI_Comm_group(MPI_COMM_WORLD, &orig_group), + "MPI_Comm_group() error"); + range[0] = 0; /* first rank */ + range[1] = params->numTasks - 1; /* last rank */ + range[2] = 1; /* stride */ + MPI_CHECK(MPI_Group_range_incl(orig_group, 1, &range, &new_group), + "MPI_Group_range_incl() error"); + MPI_CHECK(MPI_Comm_create(MPI_COMM_WORLD, new_group, &testComm), + "MPI_Comm_create() error"); + params->testComm = testComm; + if (testComm == MPI_COMM_NULL) { + /* tasks not in the group do not participate in this test */ + MPI_CHECK(MPI_Barrier(MPI_COMM_WORLD), "barrier error"); + return; + } + if (rank == 0 && verbose >= VERBOSE_1) { + fprintf(stdout, "Participating tasks: %d\n", params->numTasks); +#ifdef _OPENMP + /* set and report threading */ + if ( params->threadsPerTask > 0 ) + omp_set_num_threads( params->threadsPerTask ); + if ( params->blastMode ) { +#pragma omp parallel + { +#pragma omp single + { + fprintf(stdout, "Threads per task: %d\n", omp_get_num_threads()); + } + } +#endif + } + fflush(stdout); + } + if (rank == 0 && params->reorderTasks == TRUE && verbose >= VERBOSE_1) { + fprintf(stdout, + "Using reorderTasks '-C' (expecting block, not cyclic, task assignment)\n"); + fflush(stdout); + } + params->tasksPerNode = CountTasksPerNode(params->numTasks, testComm); + + /* setup timers */ + for (i = 0; i < 12; i++) { + timer[i] = (double *)malloc(params->repetitions * sizeof(double)); + if (timer[i] == NULL) + ERR("malloc failed"); + } + + /* bind I/O calls to specific API */ + AioriBind(params->api); + + /* show test setup */ + if (rank == 0 && verbose >= VERBOSE_0) + ShowSetup(params); + + hog_buf = HogMemory(params); + + startTime = GetTimeStamp(); + + /* loop over test iterations */ + for (rep = 0; rep < params->repetitions; rep++) { + + /* Get iteration start time in seconds in task 0 and broadcast to + all tasks */ + if (rank == 0) { + if (params->setTimeStampSignature) { + params->timeStampSignatureValue = + (unsigned int)params->setTimeStampSignature; + } else { + time_t currentTime; + if ((currentTime = time(NULL)) == -1) { + ERR("cannot get current time"); + } + params->timeStampSignatureValue = + (unsigned int)currentTime; + } + if (verbose >= VERBOSE_2) { + fprintf(stdout, + "Using Time Stamp %u (0x%x) for Data Signature\n", + params->timeStampSignatureValue, + params->timeStampSignatureValue); + } + if (rep == 0 && verbose >= VERBOSE_0) { + fprintf(stdout, "\n"); + fprintf(stdout, "access bw(MiB/s) block(KiB) xfer(KiB) open(s) wr/rd(s) close(s) total(s) iter\n"); + fprintf(stdout, "------ --------- ---------- --------- -------- -------- -------- -------- ----\n"); + } + } + MPI_CHECK(MPI_Bcast + (¶ms->timeStampSignatureValue, 1, MPI_UNSIGNED, 0, + testComm), "cannot broadcast start time value"); + /* use repetition count for number of multiple files */ + if (params->multiFile) + params->repCounter = rep; + + /* + * write the file(s), getting timing between I/O calls + */ + + if (params->writeFile && !test_time_elapsed(params, startTime)) { + GetTestFileName(testFileName, params); + if (verbose >= VERBOSE_3) { + fprintf(stdout, "task %d writing %s\n", rank, + testFileName); + } + DelaySecs(params->interTestDelay); + if (params->useExistingTestFile == FALSE) { + RemoveFile(testFileName, params->filePerProc, + params); + } + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + params->open = WRITE; + timer[0][rep] = GetTimeStamp(); + fd = backend->create(testFileName, params); + timer[1][rep] = GetTimeStamp(); + if (params->intraTestBarriers) + MPI_CHECK(MPI_Barrier(testComm), + "barrier error"); + if (rank == 0 && verbose >= VERBOSE_1) { + fprintf(stderr, + "Commencing write performance test: %s", + CurrentTimeString()); + } + timer[2][rep] = GetTimeStamp(); + dataMoved = WriteOrRead(params, fd, WRITE); + timer[3][rep] = GetTimeStamp(); + if (params->intraTestBarriers) + MPI_CHECK(MPI_Barrier(testComm), + "barrier error"); + timer[4][rep] = GetTimeStamp(); + backend->close(fd, params); + + timer[5][rep] = GetTimeStamp(); + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + + /* get the size of the file just written */ + results->aggFileSizeFromStat[rep] = + backend->get_file_size(params, testComm, testFileName); + + /* check if stat() of file doesn't equal expected file size, + use actual amount of byte moved */ + CheckFileSize(test, dataMoved, rep); + + if (verbose >= VERBOSE_3) + WriteTimes(params, timer, rep, WRITE); + ReduceIterResults(test, timer, rep, WRITE); + if (params->outlierThreshold) { + CheckForOutliers(params, timer, rep, WRITE); + } + } + + /* + * perform a check of data, reading back data and comparing + * against what was expected to be written + */ + if (params->checkWrite && !test_time_elapsed(params, startTime)) { + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + if (rank == 0 && verbose >= VERBOSE_1) { + fprintf(stdout, + "Verifying contents of the file(s) just written.\n"); + fprintf(stdout, "%s\n", CurrentTimeString()); + } + if (params->reorderTasks) { + /* move two nodes away from writing node */ + rankOffset = + (2 * params->tasksPerNode) % params->numTasks; + } + GetTestFileName(testFileName, params); + params->open = WRITECHECK; + fd = backend->open(testFileName, params); + dataMoved = WriteOrRead(params, fd, WRITECHECK); + backend->close(fd, params); + rankOffset = 0; + } + /* + * read the file(s), getting timing between I/O calls + */ + if (params->readFile && !test_time_elapsed(params, startTime)) { + /* Get rankOffset [file offset] for this process to read, based on -C,-Z,-Q,-X options */ + /* Constant process offset reading */ + if (params->reorderTasks) { + /* move taskPerNodeOffset nodes[1==default] away from writing node */ + rankOffset = + (params->taskPerNodeOffset * + params->tasksPerNode) % params->numTasks; + } + /* random process offset reading */ + if (params->reorderTasksRandom) { + /* this should not intefere with randomOffset within a file because GetOffsetArrayRandom */ + /* seeds every random() call */ + int nodeoffset; + unsigned int iseed0; + nodeoffset = params->taskPerNodeOffset; + nodeoffset = (nodeoffset < params->nodes) ? nodeoffset : params->nodes - 1; + if (params->reorderTasksRandomSeed < 0) + iseed0 = -1 * params->reorderTasksRandomSeed + rep; + else + iseed0 = params->reorderTasksRandomSeed; + srand(rank + iseed0); + { + rankOffset = rand() % params->numTasks; + } + while (rankOffset < + (nodeoffset * params->tasksPerNode)) { + rankOffset = rand() % params->numTasks; + } + /* Get more detailed stats if requested by verbose level */ + if (verbose >= VERBOSE_2) { + file_hits_histogram(params); + } + } + /* Using globally passed rankOffset, following function generates testFileName to read */ + GetTestFileName(testFileName, params); + + if (verbose >= VERBOSE_3) { + fprintf(stdout, "task %d reading %s\n", rank, + testFileName); + } + DelaySecs(params->interTestDelay); + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + params->open = READ; + timer[6][rep] = GetTimeStamp(); + fd = backend->open(testFileName, params); + timer[7][rep] = GetTimeStamp(); + if (params->intraTestBarriers) + MPI_CHECK(MPI_Barrier(testComm), + "barrier error"); + if (rank == 0 && verbose >= VERBOSE_1) { + fprintf(stderr, + "Commencing read performance test: %s", + CurrentTimeString()); + } + timer[8][rep] = GetTimeStamp(); + dataMoved = WriteOrRead(params, fd, READ); + timer[9][rep] = GetTimeStamp(); + if (params->intraTestBarriers) + MPI_CHECK(MPI_Barrier(testComm), + "barrier error"); + timer[10][rep] = GetTimeStamp(); + backend->close(fd, params); + timer[11][rep] = GetTimeStamp(); + + /* get the size of the file just read */ + results->aggFileSizeFromStat[rep] = + backend->get_file_size(params, testComm, + testFileName); + + /* check if stat() of file doesn't equal expected file size, + use actual amount of byte moved */ + CheckFileSize(test, dataMoved, rep); + + if (verbose >= VERBOSE_3) + WriteTimes(params, timer, rep, READ); + ReduceIterResults(test, timer, rep, READ); + if (params->outlierThreshold) { + CheckForOutliers(params, timer, rep, READ); + } + } + + /* end readFile test */ + /* + * perform a check of data, reading back data twice and + * comparing against what was expected to be read + */ + if (params->checkRead && !test_time_elapsed(params, startTime)) { + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + if (rank == 0 && verbose >= VERBOSE_1) { + fprintf(stdout, "Re-reading the file(s) twice to "); + fprintf(stdout, "verify that reads are consistent.\n"); + fprintf(stdout, "%s\n", CurrentTimeString()); + } + if (params->reorderTasks) { + /* move three nodes away from reading node */ + rankOffset = (3 * params->tasksPerNode) % params->numTasks; + } + GetTestFileName(testFileName, params); + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + params->open = READCHECK; + fd = backend->open(testFileName, params); + if (params->filePerProc) { + int tmpRankOffset; + tmpRankOffset = rankOffset; + /* increment rankOffset to open comparison file on other node */ + if (params->reorderTasks) { + /* move four nodes away from reading node */ + rankOffset = (4 * params->tasksPerNode) % params->numTasks; + } + GetTestFileName(params->testFileName_fppReadCheck, params); + rankOffset = tmpRankOffset; + params->fd_fppReadCheck = backend->open(params->testFileName_fppReadCheck, params); + } + dataMoved = WriteOrRead(params, fd, READCHECK); + if (params->filePerProc) { + backend->close(params->fd_fppReadCheck, params); + params->fd_fppReadCheck = NULL; + } + backend->close(fd, params); + } + if (!params->keepFile + && !(params->errorFound && params->keepFileWithError)) { + double start, finish; + start = GetTimeStamp(); + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + RemoveFile(testFileName, params->filePerProc, params); + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + finish = GetTimeStamp(); + PrintRemoveTiming(start, finish, rep); + } else { + MPI_CHECK(MPI_Barrier(testComm), "barrier error"); + } + params->errorFound = FALSE; + rankOffset = 0; + } + + MPI_CHECK(MPI_Comm_free(&testComm), "MPI_Comm_free() error"); + + if (params->summary_every_test) { + PrintLongSummaryHeader(); + PrintLongSummaryOneTest(test); + } else { + PrintShortSummary(test); + } + + if (hog_buf != NULL) + free(hog_buf); + for (i = 0; i < 12; i++) { + free(timer[i]); + } + + /* Sync with the tasks that did not participate in this test */ + MPI_CHECK(MPI_Barrier(MPI_COMM_WORLD), "barrier error"); + +} + +/* + * Determine if valid tests from parameters. + */ +static void ValidTests(IOR_param_t * test) +{ + IOR_param_t defaults; + + init_IOR_Param_t(&defaults); + /* get the version of the tests */ + AioriBind(test->api); + backend->set_version(test); + + if (test->repetitions <= 0) + WARN_RESET("too few test repetitions", + test, &defaults, repetitions); + if (test->numTasks <= 0) + ERR("too few tasks for testing"); + if (test->interTestDelay < 0) + WARN_RESET("inter-test delay must be nonnegative value", + test, &defaults, interTestDelay); + if (test->readFile != TRUE && test->writeFile != TRUE + && test->checkRead != TRUE && test->checkWrite != TRUE) + ERR("test must write, read, or check file"); + if ((test->deadlineForStonewalling > 0) + && (test->checkWrite == TRUE || test->checkRead == TRUE)) + ERR("can not perform write or read check with stonewalling"); + if (test->segmentCount < 0) + ERR("segment count must be positive value"); + if ((test->blockSize % sizeof(IOR_size_t)) != 0) + ERR("block size must be a multiple of access size"); + if (test->blockSize < 0) + ERR("block size must be non-negative integer"); + if ((test->transferSize % sizeof(IOR_size_t)) != 0) + ERR("transfer size must be a multiple of access size"); + if (test->setAlignment < 0) + ERR("alignment must be non-negative integer"); + if (test->transferSize < 0) + ERR("transfer size must be non-negative integer"); + if (test->transferSize == 0) { + ERR("test will not complete with zero transfer size"); + } else { + if ((test->blockSize % test->transferSize) != 0) + ERR("block size must be a multiple of transfer size"); + } + if (test->blockSize < test->transferSize) + ERR("block size must not be smaller than transfer size"); + if ((strcmp(test->api, "MPIIO") == 0) + && (test->blockSize < sizeof(IOR_size_t) + || test->transferSize < sizeof(IOR_size_t))) + ERR("block/transfer size may not be smaller than IOR_size_t for MPIIO"); + if ((strcmp(test->api, "HDF5") == 0) + && (test->blockSize < sizeof(IOR_size_t) + || test->transferSize < sizeof(IOR_size_t))) + ERR("block/transfer size may not be smaller than IOR_size_t for HDF5"); + if ((strcmp(test->api, "NCMPI") == 0) + && (test->blockSize < sizeof(IOR_size_t) + || test->transferSize < sizeof(IOR_size_t))) + ERR("block/transfer size may not be smaller than IOR_size_t for NCMPI"); + if ((test->useFileView == TRUE) + && (sizeof(MPI_Aint) < 8) /* used for 64-bit datatypes */ + &&((test->numTasks * test->blockSize) > + (2 * (IOR_offset_t) GIBIBYTE))) + ERR("segment size must be < 2GiB"); + if ((strcmp(test->api, "POSIX") != 0) && test->singleXferAttempt) + WARN_RESET("retry only available in POSIX", + test, &defaults, singleXferAttempt); + if ((strcmp(test->api, "POSIX") != 0) && test->fsync) + WARN_RESET("fsync() only available in POSIX", + test, &defaults, fsync); + if ((strcmp(test->api, "MPIIO") != 0) && test->preallocate) + WARN_RESET("preallocation only available in MPIIO", + test, &defaults, preallocate); + if ((strcmp(test->api, "MPIIO") != 0) && test->useFileView) + WARN_RESET("file view only available in MPIIO", + test, &defaults, useFileView); + if ((strcmp(test->api, "MPIIO") != 0) && test->useSharedFilePointer) + WARN_RESET("shared file pointer only available in MPIIO", + test, &defaults, useSharedFilePointer); + if ((strcmp(test->api, "MPIIO") == 0) && test->useSharedFilePointer) + WARN_RESET("shared file pointer not implemented", + test, &defaults, useSharedFilePointer); + if ((strcmp(test->api, "MPIIO") != 0) && test->useStridedDatatype) + WARN_RESET("strided datatype only available in MPIIO", + test, &defaults, useStridedDatatype); + if ((strcmp(test->api, "MPIIO") == 0) && test->useStridedDatatype) + WARN_RESET("strided datatype not implemented", + test, &defaults, useStridedDatatype); + if ((strcmp(test->api, "MPIIO") == 0) + && test->useStridedDatatype && (test->blockSize < sizeof(IOR_size_t) + || test->transferSize < + sizeof(IOR_size_t))) + ERR("need larger file size for strided datatype in MPIIO"); + if ((strcmp(test->api, "POSIX") == 0) && test->showHints) + WARN_RESET("hints not available in POSIX", + test, &defaults, showHints); + if ((strcmp(test->api, "POSIX") == 0) && test->collective) + WARN_RESET("collective not available in POSIX", + test, &defaults, collective); + if (test->threadsPerTask > 1 && !test->blastMode) + WARN_RESET("threadsPerTask only valid for blastMode", + test, &defaults, threadsPerTask); + if (test->reorderTasks == TRUE && test->reorderTasksRandom == TRUE) + ERR("Both Constant and Random task re-ordering specified. Choose one and resubmit"); + if (test->randomOffset && test->reorderTasksRandom + && test->filePerProc == FALSE) + ERR("random offset and random reorder tasks specified with single-shared-file. Choose one and resubmit"); + if (test->randomOffset && test->reorderTasks + && test->filePerProc == FALSE) + ERR("random offset and constant reorder tasks specified with single-shared-file. Choose one and resubmit"); + if (test->randomOffset && test->checkRead) + ERR("random offset not available with read check option (use write check)"); + if (test->randomOffset && test->storeFileOffset) + ERR("random offset not available with store file offset option)"); + if ((strcmp(test->api, "MPIIO") == 0) && test->randomOffset + && test->collective) + ERR("random offset not available with collective MPIIO"); + if ((strcmp(test->api, "MPIIO") == 0) && test->randomOffset + && test->useFileView) + ERR("random offset not available with MPIIO fileviews"); + if ((strcmp(test->api, "HDF5") == 0) && test->randomOffset) + ERR("random offset not available with HDF5"); + if ((strcmp(test->api, "NCMPI") == 0) && test->randomOffset) + ERR("random offset not available with NCMPI"); + if ((strcmp(test->api, "HDF5") != 0) && test->individualDataSets) + WARN_RESET("individual datasets only available in HDF5", + test, &defaults, individualDataSets); + if ((strcmp(test->api, "HDF5") == 0) && test->individualDataSets) + WARN_RESET("individual data sets not implemented", + test, &defaults, individualDataSets); + if ((strcmp(test->api, "NCMPI") == 0) && test->filePerProc) + ERR("file-per-proc not available in current NCMPI"); + if (test->noFill) { + if (strcmp(test->api, "HDF5") != 0) { + ERR("'no fill' option only available in HDF5"); + } else { + /* check if hdf5 available */ +#if defined (H5_VERS_MAJOR) && defined (H5_VERS_MINOR) + /* no-fill option not available until hdf5-1.6.x */ +#if (H5_VERS_MAJOR > 0 && H5_VERS_MINOR > 5) + ; +#else + char errorString[MAX_STR]; + sprintf(errorString, + "'no fill' option not available in %s", + test->apiVersion); + ERR(errorString); +#endif +#else + WARN("unable to determine HDF5 version for 'no fill' usage"); +#endif + } + } + if (test->useExistingTestFile && test->lustre_set_striping) + ERR("Lustre stripe options are incompatible with useExistingTestFile"); +} + +static IOR_offset_t *GetOffsetArraySequential(IOR_param_t * test, + int pretendRank) +{ + IOR_offset_t i, j, k = 0; + IOR_offset_t offsets; + IOR_offset_t *offsetArray; + + /* count needed offsets */ + offsets = (test->blockSize / test->transferSize) * test->segmentCount; + + /* setup empty array */ + offsetArray = + (IOR_offset_t *) malloc((offsets + 1) * sizeof(IOR_offset_t)); + if (offsetArray == NULL) + ERR("malloc() failed"); + offsetArray[offsets] = -1; /* set last offset with -1 */ + + /* fill with offsets */ + for (i = 0; i < test->segmentCount; i++) { + for (j = 0; j < (test->blockSize / test->transferSize); j++) { + offsetArray[k] = j * test->transferSize; + if (test->filePerProc) { + offsetArray[k] += i * test->blockSize; + } else { + offsetArray[k] += + (i * test->numTasks * test->blockSize) + + (pretendRank * test->blockSize); + } + k++; + } + } + + return (offsetArray); +} + +static IOR_offset_t *GetOffsetArrayRandom(IOR_param_t * test, int pretendRank, + int access) +{ + int seed; + IOR_offset_t i, value, tmp; + IOR_offset_t offsets = 0; + IOR_offset_t offsetCnt = 0; + IOR_offset_t fileSize; + IOR_offset_t *offsetArray; + + /* set up seed for random() */ + if (access == WRITE || access == READ) { + test->randomSeed = seed = random(); + } else { + seed = test->randomSeed; + } + srandom(seed); + + fileSize = test->blockSize * test->segmentCount; + if (test->filePerProc == FALSE) { + fileSize *= test->numTasks; + } + + /* count needed offsets (pass 1) */ + for (i = 0; i < fileSize; i += test->transferSize) { + if (test->filePerProc == FALSE) { + if ((random() % test->numTasks) == pretendRank) { + offsets++; + } + } else { + offsets++; + } + } + + /* setup empty array */ + offsetArray = + (IOR_offset_t *) malloc((offsets + 1) * sizeof(IOR_offset_t)); + if (offsetArray == NULL) + ERR("malloc() failed"); + offsetArray[offsets] = -1; /* set last offset with -1 */ + + if (test->filePerProc) { + /* fill array */ + for (i = 0; i < offsets; i++) { + offsetArray[i] = i * test->transferSize; + } + } else { + /* fill with offsets (pass 2) */ + srandom(seed); /* need same seed */ + for (i = 0; i < fileSize; i += test->transferSize) { + if ((random() % test->numTasks) == pretendRank) { + offsetArray[offsetCnt] = i; + offsetCnt++; + } + } + } + /* reorder array */ + for (i = 0; i < offsets; i++) { + value = random() % offsets; + tmp = offsetArray[value]; + offsetArray[value] = offsetArray[i]; + offsetArray[i] = tmp; + } + SeedRandGen(test->testComm); /* synchronize seeds across tasks */ + + return (offsetArray); +} + +/* + * Write or Read data to file(s). This loops through the strides, writing + * out the data to each block in transfer sizes, until the remainder left is 0. + */ +static IOR_offset_t WriteOrRead(IOR_param_t * test, void *fd, int access) +{ + int errors = 0; + IOR_offset_t amtXferred; + IOR_offset_t transfer; + IOR_offset_t transferCount = 0; + IOR_offset_t pairCnt = 0; + IOR_offset_t *offsetArray; + int pretendRank; + void *buffer = NULL; + void *checkBuffer = NULL; + void *readCheckBuffer = NULL; + IOR_offset_t dataMoved = 0; /* for data rate calculation */ + double startForStonewall; + int hitStonewall; + + if (test->blastMode) { + return WriteOrReadBlast( test, fd, access ); + } + + /* initialize values */ + pretendRank = (rank + rankOffset) % test->numTasks; + + if (test->randomOffset) { + offsetArray = GetOffsetArrayRandom(test, pretendRank, access); + } else { + offsetArray = GetOffsetArraySequential(test, pretendRank); + } + + XferBuffersSetup(&buffer, &checkBuffer, &readCheckBuffer, + access, test, pretendRank); + + /* check for stonewall */ + startForStonewall = GetTimeStamp(); + hitStonewall = ((test->deadlineForStonewalling != 0) + && ((GetTimeStamp() - startForStonewall) + > test->deadlineForStonewalling)); + + /* loop over offsets to access */ + while ((offsetArray[pairCnt] != -1) && !hitStonewall) { + test->offset = offsetArray[pairCnt]; + /* + * fills each transfer with a unique pattern + * containing the offset into the file + */ + if (test->storeFileOffset == TRUE) { + FillBuffer(buffer, test, test->offset, pretendRank); + } + transfer = test->transferSize; + if (access == WRITE) { + amtXferred = + backend->xfer(access, fd, buffer, transfer, test); + if (amtXferred != transfer) + ERR("cannot write to file"); + } else if (access == READ) { + amtXferred = + backend->xfer(access, fd, buffer, transfer, test); + if (amtXferred != transfer) + ERR("cannot read from file"); + } else if (access == WRITECHECK) { + memset(checkBuffer, 'a', transfer); + amtXferred = + backend->xfer(access, fd, checkBuffer, transfer, + test); + if (amtXferred != transfer) + ERR("cannot read from file write check"); + transferCount++; + errors += CompareBuffers(buffer, checkBuffer, transfer, + transferCount, test, + WRITECHECK); + } else if (access == READCHECK) { + ReadCheck(fd, buffer, checkBuffer, readCheckBuffer, + test, transfer, test->blockSize, &amtXferred, + &transferCount, access, &errors); + } + dataMoved += amtXferred; + pairCnt++; + + hitStonewall = ((test->deadlineForStonewalling != 0) + && ((GetTimeStamp() - startForStonewall) + > test->deadlineForStonewalling)); + } + + totalErrorCount += CountErrors(test, access, errors); + + XferBuffersFree(buffer, checkBuffer, readCheckBuffer, access); + + free(offsetArray); + + if (access == WRITE && test->fsync == TRUE) { + backend->fsync(fd, test); /*fsync after all accesses */ + } + return (dataMoved); +} + +/* + * Write or read data BLAST style. This spawns threads which + * 1. obtain lock on the file + * 2. read (or write) blockSize bytes sequentially + * 3. release lock + * 4. re-read the blocks from #2 + * 5. repeat + * BLAST only performs reads, but this function supports writing in this + * pattern for consistency with the base WriteOrRead() function + */ +static IOR_offset_t WriteOrReadBlast(IOR_param_t * test, void *fd, int access) +{ + IOR_offset_t transferCount = 0; + IOR_offset_t dataMoved = 0; /* for data rate calculation */ + int errors = 0; + + /* rewind the global state of the file */ + test->offset = 0; +#pragma omp parallel + { + IOR_offset_t fileSize; + int pretendRank; + void *buffer = NULL; + void *checkBuffer = NULL; + void *readCheckBuffer = NULL; + double startForStonewall; + int hitStonewall; + + IOR_param_t testLocal; + IOR_offset_t amtXferred; + IOR_offset_t transfer; + IOR_offset_t transferCountLocal = 0; + IOR_offset_t dataMovedLocal = 0; /* for data rate calculation */ + IOR_offset_t blockBegin, blockEnd; + int errorsLocal = 0; + + /* initialize values */ + pretendRank = (rank + rankOffset) % test->numTasks; + + /* this changes buffer, checkBuffer, readCheckBuffer */ + XferBuffersSetup(&buffer, &checkBuffer, &readCheckBuffer, access, test, pretendRank); + + /* check for stonewall */ + startForStonewall = GetTimeStamp(); + hitStonewall = ((test->deadlineForStonewalling != 0) && ((GetTimeStamp() - startForStonewall) > test->deadlineForStonewalling)); + + fileSize = test->blockSize * test->segmentCount; + + while ( test->offset < fileSize && !hitStonewall ) { + /* IOR's backend xfer functions are not thread safe, so we have + to work around this. we create a shallow local copy of the + test parameters because the xfer functions rely on + test->offset; fortunately, xfer is pure and doesn't access + anything pointed to by elements in IOR_param_t */ + testLocal = *test; + + /* first pass - build index. BLAST triggers page faults as it + reads the final byte of every record; assuming records are + fewer than 4K bytes (2 bits per sequence, so 16K bp), this is + a sequential 4K read/write */ +#pragma omp critical + { + blockBegin = test->offset; + blockEnd = blockBegin + test->blockSize; + /* advance the global state (test) */ + for ( test->offset; + test->offset < blockEnd && test->offset < fileSize; + test->offset += test->transferSize ) + { + if (test->storeFileOffset == TRUE) + FillBuffer(buffer, test, test->offset, pretendRank); + transfer = test->transferSize; + + if (access == WRITE) { + amtXferred = backend->xfer(access, fd, buffer, transfer, test); + if (amtXferred != transfer) ERR("cannot write to file"); + } else if (access == READ) { + amtXferred = backend->xfer(access, fd, buffer, transfer, test); + if (amtXferred != transfer) ERR("cannot read from file"); + } else if (access == WRITECHECK) { + memset(checkBuffer, 'a', transfer); + amtXferred = backend->xfer(access, fd, checkBuffer, transfer, test); + if (amtXferred != transfer) ERR("cannot read from file write check"); + transferCountLocal++; + errorsLocal += CompareBuffers(buffer, checkBuffer, transfer, transferCountLocal, test, WRITECHECK); + } else if (access == READCHECK) { + ReadCheck(fd, buffer, checkBuffer, readCheckBuffer, + test, transfer, test->blockSize, &amtXferred, + &transferCountLocal, access, &errorsLocal); + } + dataMovedLocal += amtXferred; + } + } + /* end critical section */ + + /* second pass - use private testLocal instead of public test */ + for ( testLocal.offset = blockBegin; + testLocal.offset < blockEnd && testLocal.offset < fileSize; + testLocal.offset += test->transferSize ) + { + if (testLocal.storeFileOffset == TRUE) + FillBuffer(buffer, &testLocal, testLocal.offset, pretendRank); + /* this critical will cause workers to block on any + * other thread doing its first pass, which is how BLAST + * behaves + */ + #pragma omp critical + { + transfer = testLocal.transferSize; + } + + if (access == WRITE) { + amtXferred = backend->xfer(access, fd, buffer, transfer, &testLocal); + if (amtXferred != transfer) ERR("cannot write to file"); + } else if (access == READ) { + amtXferred = backend->xfer(access, fd, buffer, transfer, &testLocal); + if (amtXferred != transfer) ERR("cannot read from file"); + } else if (access == WRITECHECK) { + memset(checkBuffer, 'a', transfer); + amtXferred = backend->xfer(access, fd, checkBuffer, transfer, &testLocal); + if (amtXferred != transfer) ERR("cannot read from file write check"); + transferCountLocal++; + errorsLocal += CompareBuffers(buffer, checkBuffer, transfer, transferCountLocal, &testLocal, WRITECHECK); + } else if (access == READCHECK) { + ReadCheck(fd, buffer, checkBuffer, readCheckBuffer, + &testLocal, transfer, testLocal.blockSize, &amtXferred, + &transferCountLocal, access, &errorsLocal); + } + dataMovedLocal += amtXferred; + } + + hitStonewall = ((test->deadlineForStonewalling != 0) + && ((GetTimeStamp() - startForStonewall) + > test->deadlineForStonewalling)); +#pragma omp atomic + dataMoved += dataMovedLocal; +#pragma omp atomic + transferCount += transferCountLocal; +#pragma omp atomic + errors += errorsLocal; + + dataMovedLocal = 0; + transferCountLocal = 0; + errorsLocal = 0; + } + XferBuffersFree(buffer, checkBuffer, readCheckBuffer, access); + } + /* end of parallel section */ + + totalErrorCount += CountErrors(test, access, errors); + + if (access == WRITE && test->fsync == TRUE) { + backend->fsync(fd, test); /*fsync after all accesses */ + } + return (dataMoved); +} + + +/* + * Write times taken during each iteration of the test. + */ +static void +WriteTimes(IOR_param_t * test, double **timer, int iteration, int writeOrRead) +{ + char accessType[MAX_STR]; + char timerName[MAX_STR]; + int i, start, stop; + + if (writeOrRead == WRITE) { + start = 0; + stop = 6; + strcpy(accessType, "WRITE"); + } else if (writeOrRead == READ) { + start = 6; + stop = 12; + strcpy(accessType, "READ"); + } else { + ERR("incorrect WRITE/READ option"); + } + + for (i = start; i < stop; i++) { + switch (i) { + case 0: + strcpy(timerName, "write open start"); + break; + case 1: + strcpy(timerName, "write open stop"); + break; + case 2: + strcpy(timerName, "write start"); + break; + case 3: + strcpy(timerName, "write stop"); + break; + case 4: + strcpy(timerName, "write close start"); + break; + case 5: + strcpy(timerName, "write close stop"); + break; + case 6: + strcpy(timerName, "read open start"); + break; + case 7: + strcpy(timerName, "read open stop"); + break; + case 8: + strcpy(timerName, "read start"); + break; + case 9: + strcpy(timerName, "read stop"); + break; + case 10: + strcpy(timerName, "read close start"); + break; + case 11: + strcpy(timerName, "read close stop"); + break; + default: + strcpy(timerName, "invalid timer"); + break; + } + fprintf(stdout, "Test %d: Iter=%d, Task=%d, Time=%f, %s\n", + test->id, iteration, (int)rank, timer[i][iteration], + timerName); + } +} diff --git a/microbenchmarks/ior/src/ior.h b/microbenchmarks/ior/src/ior.h new file mode 100644 index 00000000..32686a06 --- /dev/null +++ b/microbenchmarks/ior/src/ior.h @@ -0,0 +1,157 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +\******************************************************************************/ + +#ifndef _IOR_H +#define _IOR_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include "iordef.h" + +extern int numTasksWorld; +extern int rank; +extern int rankOffset; +extern int tasksPerNode; +extern int verbose; +extern MPI_Comm testComm; + +/******************************************************************************/ +/* + * The parameter struct holds all of the "global" data to be passed, + * as well as results to be parsed. + * + * NOTE: If IOR_Param_t is changed, also change: + * init_IOR_Param_t() [ior.c] + * DisplayUsage() [ior.c] + * ShowTest() [ior.c] + * DecodeDirective() [parse_options.c] + * ParseCommandLine() [parse_options.c] + * USER_GUIDE + */ + +typedef struct +{ + char debug[MAX_STR]; /* debug info string */ + unsigned int mode; /* file permissions */ + unsigned int openFlags; /* open flags */ + int referenceNumber; /* user supplied reference number */ + char api[MAX_STR]; /* API for I/O */ + char apiVersion[MAX_STR]; /* API version */ + char platform[MAX_STR]; /* platform type */ + char testFileName[MAXPATHLEN]; /* full name for test */ + char testFileName_fppReadCheck[MAXPATHLEN];/* filename for fpp read check */ + char hintsFileName[MAXPATHLEN]; /* full name for hints file */ + char options[MAXPATHLEN]; /* options string */ + int numTasks; /* number of tasks for test */ + int nodes; /* number of nodes for test */ + int tasksPerNode; /* number of tasks per node */ + int repetitions; /* number of repetitions of test */ + int repCounter; /* rep counter */ + int multiFile; /* multiple files */ + int interTestDelay; /* delay between reps in seconds */ + int open; /* flag for writing or reading */ + int readFile; /* read of existing file */ + int writeFile; /* write of file */ + int filePerProc; /* single file or file-per-process */ + int reorderTasks; /* reorder tasks for read back and check */ + int taskPerNodeOffset; /* task node offset for reading files */ + int reorderTasksRandom; /* reorder tasks for random file read back */ + int reorderTasksRandomSeed; /* reorder tasks for random file read seed */ + int checkWrite; /* check read after write */ + int checkRead; /* check read after read */ + int keepFile; /* don't delete the testfile on exit */ + int keepFileWithError; /* don't delete the testfile with errors */ + int errorFound; /* error found in data check */ + int quitOnError; /* quit code when error in check */ + int collective; /* collective I/O */ + IOR_offset_t segmentCount; /* number of segments (or HDF5 datasets) */ + IOR_offset_t blockSize; /* contiguous bytes to write per task */ + IOR_offset_t transferSize; /* size of transfer in bytes */ + IOR_offset_t offset; /* offset for read/write */ + IOR_offset_t expectedAggFileSize; /* calculated aggregate file size */ + int preallocate; /* preallocate file size */ + int useFileView; /* use MPI_File_set_view */ + int useSharedFilePointer; /* use shared file pointer */ + int useStridedDatatype; /* put strided access into datatype */ + int useO_DIRECT; /* use O_DIRECT, bypassing I/O buffers */ + int showHints; /* show hints */ + int showHelp; /* show options and help */ + int summary_every_test; /* flag to print summary every test, not just at end */ + int uniqueDir; /* use unique directory for each fpp */ + int useExistingTestFile; /* do not delete test file before access */ + int storeFileOffset; /* use file offset as stored signature */ + int deadlineForStonewalling; /* max time in seconds to run any test phase */ + int maxTimeDuration; /* max time in minutes to run each test */ + int outlierThreshold; /* warn on outlier N seconds from mean */ + int verbose; /* verbosity */ + int setTimeStampSignature; /* set time stamp signature */ + unsigned int timeStampSignatureValue; /* value for time stamp signature */ + void * fd_fppReadCheck; /* additional fd for fpp read check */ + int randomSeed; /* random seed for write/read check */ + int randomOffset; /* access is to random offsets */ + MPI_Comm testComm; /* MPI communicator */ + size_t memoryPerTask; /* additional memory used per task */ + size_t memoryPerNode; /* additional memory used per node */ + int blastMode; /* access emulates BLAST read pattern */ + int threadsPerTask; /* OpenMP threads to use */ + + /* POSIX variables */ + int singleXferAttempt; /* do not retry transfer if incomplete */ + int fsyncPerWrite; /* fsync() after each write */ + int fsync; /* fsync() after write */ + + /* MPI variables */ + MPI_Datatype transferType; /* datatype for transfer */ + MPI_Datatype fileType; /* filetype for file view */ + + /* HDF5 variables */ + int individualDataSets; /* datasets not shared by all procs */ + int noFill; /* no fill in file creation */ + IOR_offset_t setAlignment; /* alignment in bytes */ + + /* NCMPI variables */ + int var_id; /* variable id handle for data set */ + + /* Lustre variables */ + int lustre_stripe_count; + int lustre_stripe_size; + int lustre_start_ost; + int lustre_set_striping; /* flag that we need to set lustre striping */ + int lustre_ignore_locks; + + int id; /* test's unique ID */ + int intraTestBarriers; /* barriers between open/op and op/close */ +} IOR_param_t; + +/* each pointer is to an array, each of length equal to the number of + repetitions in the test */ +typedef struct { + double *writeTime; + double *readTime; + IOR_offset_t *aggFileSizeFromStat; + IOR_offset_t *aggFileSizeFromXfer; + IOR_offset_t *aggFileSizeForBW; +} IOR_results_t; + +/* define the queuing structure for the test parameters */ +typedef struct IOR_test_t { + IOR_param_t params; + IOR_results_t *results; + struct IOR_test_t *next; +} IOR_test_t; + +IOR_test_t *CreateTest(IOR_param_t *init_params, int test_num); +void AllocResults(IOR_test_t *test); +void GetPlatformName(char *); +void init_IOR_Param_t(IOR_param_t *p); + +#endif /* !_IOR_H */ diff --git a/microbenchmarks/ior/src/iordef.h b/microbenchmarks/ior/src/iordef.h new file mode 100644 index 00000000..632d6179 --- /dev/null +++ b/microbenchmarks/ior/src/iordef.h @@ -0,0 +1,210 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +\******************************************************************************/ + +#ifndef _IORDEF_H +#define _IORDEF_H + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include +#include +#include +#include + +#ifdef _WIN32 +# define _CRT_SECURE_NO_WARNINGS +# define _CRT_RAND_S +# pragma warning(4 : 4996) /* Don't complain about POSIX names */ +# pragma warning(4 : 4267) /* '=' : conversion from 'size_t' to 'int' */ +# pragma warning(4 : 4244) /* 'function' : conversion from 'IOR_offset_t' to 'int' */ + +# include +# include +# include +# include "win/getopt.h" + +# define MAXPATHLEN 1024 +# define F_OK 00 +# define W_OK 02 +# define R_OK 04 +# define X_OK 04 + +# define lseek _lseeki64 +# define fsync _commit +# define mkdir(dir, mode) _mkdir(dir) +# define strcasecmp _stricmp +# define strncasecmp _strnicmp +# define srandom srand +# define random() (rand() * (RAND_MAX+1) + rand()) /* Note: only 30 bits */ +# define sleep(X) Sleep((X)*1000) +# define getpagesize() 4096 +#else +# include /* MAXPATHLEN */ +# include +# include +#endif + +/************************** D E C L A R A T I O N S ***************************/ + +extern int numTasks; /* MPI variables */ +extern int rank; +extern int rankOffset; +extern int verbose; /* verbose output */ + +/*************************** D E F I N I T I O N S ****************************/ + +#ifndef FALSE +# define FALSE 0 +#endif /* not FALSE */ + +#ifndef TRUE +# define TRUE 1 +#endif /* not TRUE */ + +#ifndef NULL +# define NULL ((void *)0) +#endif /* not NULL */ + +#define KILOBYTE 1000 +#define MEGABYTE 1000000 +#define GIGABYTE 1000000000 + +#define KIBIBYTE (1 << 10) +#define MEBIBYTE (1 << 20) +#define GIBIBYTE (1 << 30) + +/* for displaying MiB or MB */ +#define BASE_TWO 0 +#define BASE_TEN 1 + +/* any write/read access in code */ +#define WRITE 0 +#define WRITECHECK 1 +#define READ 2 +#define READCHECK 3 +#define CHECK 4 + +/* verbosity settings */ +#define VERBOSE_0 0 +#define VERBOSE_1 1 +#define VERBOSE_2 2 +#define VERBOSE_3 3 +#define VERBOSE_4 4 +#define VERBOSE_5 5 + +#define MAX_STR 1024 /* max string length */ +#define MAX_HINTS 16 /* max number of hints */ +#define MAX_RETRY 10000 /* max retries for POSIX xfer */ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif + +#define DELIMITERS " \t\r\n=" /* ReadScript() */ +#define FILENAME_DELIMITER '@' /* ParseFileName() */ + +/* MACROs for debugging */ +#define HERE fprintf(stdout, "** LINE %d (TASK=%d) **\n", \ + __LINE__, rank); + +typedef long long int IOR_offset_t; +typedef long long int IOR_size_t; + + +/******************************** M A C R O S *********************************/ + +/******************************************************************************/ +/* + * WARN_RESET will display a custom error message and set value to default + */ +#define WARN_RESET(MSG, TO_STRUCT_PTR, FROM_STRUCT_PTR, MEMBER) do { \ + (TO_STRUCT_PTR)->MEMBER = (FROM_STRUCT_PTR)->MEMBER; \ + if (rank == 0) { \ + fprintf(stdout, "ior WARNING: %s. Using value of %d.\n", \ + MSG, (TO_STRUCT_PTR)->MEMBER); \ + } \ + fflush(stdout); \ +} while (0) + + +#define WARN(MSG) do { \ + if (verbose > VERBOSE_2) { \ + fprintf(stdout, "ior WARNING: %s, (%s:%d).\n", \ + MSG, __FILE__, __LINE__); \ + } else { \ + fprintf(stdout, "ior WARNING: %s.\n", MSG); \ + } \ + fflush(stdout); \ +} while (0) + +/* warning with errno printed */ +#define EWARN(MSG) do { \ + if (verbose > VERBOSE_2) { \ + fprintf(stdout, "ior WARNING: %s, errno %d, %s (%s:%d).\n", \ + MSG, errno, strerror(errno), __FILE__, __LINE__); \ + } else { \ + fprintf(stdout, "ior WARNING: %s, errno %d, %s \n", \ + MSG, errno, strerror(errno)); \ + } \ + fflush(stdout); \ +} while (0) + + +/* display error message and terminate execution */ +#define ERR(MSG) do { \ + fprintf(stdout, "ior ERROR: %s, errno %d, %s (%s:%d)\n", \ + MSG, errno, strerror(errno), __FILE__, __LINE__); \ + fflush(stdout); \ + MPI_Abort(MPI_COMM_WORLD, -1); \ +} while (0) + + +/******************************************************************************/ +/* + * MPI_CHECK will display a custom error message as well as an error string + * from the MPI_STATUS and then exit the program + */ + +#define MPI_CHECK(MPI_STATUS, MSG) do { \ + char resultString[MPI_MAX_ERROR_STRING]; \ + int resultLength; \ + \ + if (MPI_STATUS != MPI_SUCCESS) { \ + MPI_Error_string(MPI_STATUS, resultString, &resultLength); \ + fprintf(stdout, "ior ERROR: %s, MPI %s, (%s:%d)\n", \ + MSG, resultString, __FILE__, __LINE__); \ + fflush(stdout); \ + MPI_Abort(MPI_COMM_WORLD, -1); \ + } \ +} while(0) + + +/******************************************************************************/ +/* + * System info for Windows. + */ + +#ifdef _WIN32 + +struct utsname { + char sysname [16]; + char nodename[257]; + char release [16]; + char version [16]; + char machine [16]; +}; + +extern int uname(struct utsname *name); + +#endif /* _WIN32 */ + +#endif /* not _IORDEF_H */ diff --git a/microbenchmarks/ior/src/parse_options.c b/microbenchmarks/ior/src/parse_options.c new file mode 100644 index 00000000..c8f7a18c --- /dev/null +++ b/microbenchmarks/ior/src/parse_options.c @@ -0,0 +1,590 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Parse commandline functions. +* +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include + +#include "ior.h" +#include "aiori.h" +#include "parse_options.h" + +IOR_param_t initialTestParams; + +/* + * Takes a string of the form 64, 8m, 128k, 4g, etc. and converts to bytes. + */ +static IOR_offset_t StringToBytes(char *size_str) +{ + IOR_offset_t size = 0; + char range; + int rc; + + rc = sscanf(size_str, " %lld %c ", &size, &range); + if (rc == 2) { + switch ((int)range) { + case 'k': + case 'K': + size <<= 10; + break; + case 'm': + case 'M': + size <<= 20; + break; + case 'g': + case 'G': + size <<= 30; + break; + } + } else if (rc == 0) { + size = -1; + } + return (size); +} + +static size_t NodeMemoryStringToBytes(char *size_str) +{ + int percent; + int rc; + long page_size; + long num_pages; + long long mem; + + rc = sscanf(size_str, " %d %% ", &percent); + if (rc == 0) + return (size_t)StringToBytes(size_str); + if (percent > 100 || percent < 0) + ERR("percentage must be between 0 and 100"); + + page_size = sysconf(_SC_PAGESIZE); + num_pages = sysconf(_SC_PHYS_PAGES); + if (num_pages == -1) + ERR("sysconf(_SC_PHYS_PAGES) is not supported"); + mem = page_size * num_pages; + + return mem / 100 * percent; +} + +static void RecalculateExpectedFileSize(IOR_param_t *params) +{ + params->expectedAggFileSize = + params->blockSize * params->segmentCount * params->numTasks; +} + +/* + * Check and correct all settings of each test in queue for correctness. + */ +static void CheckRunSettings(IOR_test_t *tests) +{ + IOR_test_t *ptr; + IOR_param_t *params; + + for (ptr = tests; ptr != NULL; ptr = ptr->next) { + params = &ptr->params; + /* If no write/read/check action requested, set both write and read */ + if (params->writeFile == FALSE + && params->readFile == FALSE + && params->checkWrite == FALSE + && params->checkRead == FALSE) { + params->readFile = TRUE; + params->writeFile = TRUE; + } + /* If numTasks set to 0, use all tasks */ + if (params->numTasks == 0) { + MPI_CHECK(MPI_Comm_size(MPI_COMM_WORLD, + ¶ms->numTasks), + "MPI_Comm_size() error"); + RecalculateExpectedFileSize(params); + } + } +} + +/* + * Set flags from commandline string/value pairs. + */ +void DecodeDirective(char *line, IOR_param_t *params) +{ + char option[MAX_STR]; + char value[MAX_STR]; + int rc; + + rc = sscanf(line, " %[^=# \t\r\n] = %[^# \t\r\n] ", option, value); + if (rc != 2 && rank == 0) { + fprintf(stdout, "Syntax error in configuration options: %s\n", + line); + MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1), "MPI_Abort() error"); + } + if (strcasecmp(option, "api") == 0) { + strcpy(params->api, value); + } else if (strcasecmp(option, "refnum") == 0) { + params->referenceNumber = atoi(value); + } else if (strcasecmp(option, "debug") == 0) { + strcpy(params->debug, value); + } else if (strcasecmp(option, "platform") == 0) { + strcpy(params->platform, value); + } else if (strcasecmp(option, "testfile") == 0) { + strcpy(params->testFileName, value); + } else if (strcasecmp(option, "hintsfilename") == 0) { + strcpy(params->hintsFileName, value); + } else if (strcasecmp(option, "deadlineforstonewalling") == 0) { + params->deadlineForStonewalling = atoi(value); + } else if (strcasecmp(option, "maxtimeduration") == 0) { + params->maxTimeDuration = atoi(value); + } else if (strcasecmp(option, "outlierthreshold") == 0) { + params->outlierThreshold = atoi(value); + } else if (strcasecmp(option, "nodes") == 0) { + params->nodes = atoi(value); + } else if (strcasecmp(option, "repetitions") == 0) { + params->repetitions = atoi(value); + } else if (strcasecmp(option, "intertestdelay") == 0) { + params->interTestDelay = atoi(value); + } else if (strcasecmp(option, "readfile") == 0) { + params->readFile = atoi(value); + } else if (strcasecmp(option, "writefile") == 0) { + params->writeFile = atoi(value); + } else if (strcasecmp(option, "fileperproc") == 0) { + params->filePerProc = atoi(value); + } else if (strcasecmp(option, "taskpernodeoffset") == 0) { + params->taskPerNodeOffset = atoi(value); + } else if (strcasecmp(option, "reordertasksconstant") == 0) { + params->reorderTasks = atoi(value); + } else if (strcasecmp(option, "reordertasksrandom") == 0) { + params->reorderTasksRandom = atoi(value); + } else if (strcasecmp(option, "reordertasksrandomSeed") == 0) { + params->reorderTasksRandomSeed = atoi(value); + } else if (strcasecmp(option, "reordertasks") == 0) { + /* Backwards compatibility for the "reorderTasks" option. + MUST follow the other longer reordertasks checks. */ + params->reorderTasks = atoi(value); + } else if (strcasecmp(option, "checkwrite") == 0) { + params->checkWrite = atoi(value); + } else if (strcasecmp(option, "checkread") == 0) { + params->checkRead = atoi(value); + } else if (strcasecmp(option, "keepfile") == 0) { + params->keepFile = atoi(value); + } else if (strcasecmp(option, "keepfilewitherror") == 0) { + params->keepFileWithError = atoi(value); + } else if (strcasecmp(option, "multiFile") == 0) { + params->multiFile = atoi(value); + } else if (strcasecmp(option, "quitonerror") == 0) { + params->quitOnError = atoi(value); + } else if (strcasecmp(option, "segmentcount") == 0) { + params->segmentCount = StringToBytes(value); + RecalculateExpectedFileSize(params); + } else if (strcasecmp(option, "blocksize") == 0) { + params->blockSize = StringToBytes(value); + RecalculateExpectedFileSize(params); + } else if (strcasecmp(option, "transfersize") == 0) { + params->transferSize = StringToBytes(value); + } else if (strcasecmp(option, "setalignment") == 0) { + params->setAlignment = StringToBytes(value); + } else if (strcasecmp(option, "singlexferattempt") == 0) { + params->singleXferAttempt = atoi(value); + } else if (strcasecmp(option, "individualdatasets") == 0) { + params->individualDataSets = atoi(value); + } else if (strcasecmp(option, "intraTestBarriers") == 0) { + params->intraTestBarriers = atoi(value); + } else if (strcasecmp(option, "nofill") == 0) { + params->noFill = atoi(value); + } else if (strcasecmp(option, "verbose") == 0) { + params->verbose = atoi(value); + } else if (strcasecmp(option, "settimestampsignature") == 0) { + params->setTimeStampSignature = atoi(value); + } else if (strcasecmp(option, "collective") == 0) { + params->collective = atoi(value); + } else if (strcasecmp(option, "preallocate") == 0) { + params->preallocate = atoi(value); + } else if (strcasecmp(option, "storefileoffset") == 0) { + params->storeFileOffset = atoi(value); + } else if (strcasecmp(option, "usefileview") == 0) { + params->useFileView = atoi(value); + } else if (strcasecmp(option, "usesharedfilepointer") == 0) { + params->useSharedFilePointer = atoi(value); + } else if (strcasecmp(option, "useo_direct") == 0) { + params->useO_DIRECT = atoi(value); + } else if (strcasecmp(option, "usestrideddatatype") == 0) { + params->useStridedDatatype = atoi(value); + } else if (strcasecmp(option, "showhints") == 0) { + params->showHints = atoi(value); + } else if (strcasecmp(option, "showhelp") == 0) { + params->showHelp = atoi(value); + } else if (strcasecmp(option, "uniqueDir") == 0) { + params->uniqueDir = atoi(value); + } else if (strcasecmp(option, "useexistingtestfile") == 0) { + params->useExistingTestFile = atoi(value); + } else if (strcasecmp(option, "fsyncperwrite") == 0) { + params->fsyncPerWrite = atoi(value); + } else if (strcasecmp(option, "fsync") == 0) { + params->fsync = atoi(value); + } else if (strcasecmp(option, "randomoffset") == 0) { + params->randomOffset = atoi(value); + } else if (strcasecmp(option, "memoryPerTask") == 0) { + params->memoryPerTask = StringToBytes(value); + params->memoryPerNode = 0; + } else if (strcasecmp(option, "memoryPerNode") == 0) { + params->memoryPerNode = NodeMemoryStringToBytes(value); + params->memoryPerTask = 0; + } else if (strcasecmp(option, "blastMode") == 0) { + params->blastMode = atoi(value); + } else if (strcasecmp(option, "threadsPerTask") == 0) { + params->threadsPerTask = atoi(value); + } else if (strcasecmp(option, "lustrestripecount") == 0) { +#ifndef HAVE_LUSTRE_LUSTRE_USER_H + ERR("ior was not compiled with Lustre support"); +#endif + params->lustre_stripe_count = atoi(value); + params->lustre_set_striping = 1; + } else if (strcasecmp(option, "lustrestripesize") == 0) { +#ifndef HAVE_LUSTRE_LUSTRE_USER_H + ERR("ior was not compiled with Lustre support"); +#endif + params->lustre_stripe_size = StringToBytes(value); + params->lustre_set_striping = 1; + } else if (strcasecmp(option, "lustrestartost") == 0) { +#ifndef HAVE_LUSTRE_LUSTRE_USER_H + ERR("ior was not compiled with Lustre support"); +#endif + params->lustre_start_ost = atoi(value); + params->lustre_set_striping = 1; + } else if (strcasecmp(option, "lustreignorelocks") == 0) { +#ifndef HAVE_LUSTRE_LUSTRE_USER_H + ERR("ior was not compiled with Lustre support"); +#endif + params->lustre_ignore_locks = atoi(value); + } else if (strcasecmp(option, "numtasks") == 0) { + params->numTasks = atoi(value); + RecalculateExpectedFileSize(params); + } else if (strcasecmp(option, "summaryalways") == 0) { + params->summary_every_test = atoi(value); + } else { + if (rank == 0) + fprintf(stdout, "Unrecognized parameter \"%s\"\n", + option); + MPI_CHECK(MPI_Abort(MPI_COMM_WORLD, -1), "MPI_Abort() error"); + } +} + +/* + * Parse a single line, which may contain multiple comma-seperated directives + */ +void ParseLine(char *line, IOR_param_t * test) +{ + char *start, *end; + + start = line; + do { + end = strchr(start, ','); + if (end != NULL) + *end = '\0'; + DecodeDirective(start, test); + start = end + 1; + } while (end != NULL); + +} + +/* + * Determines if the string "haystack" contains only the string "needle", and + * possibly whitespace before and after needle. Function is case insensitive. + */ +int contains_only(char *haystack, char *needle) +{ + char *ptr, *end; + + end = haystack + strlen(haystack); + /* skip over leading shitspace */ + for (ptr = haystack; ptr < end; ptr++) { + if (!isspace(*ptr)) + break; + } + /* check for "needle" */ + if (strncasecmp(ptr, needle, strlen(needle)) != 0) + return 0; + /* make sure the rest of the line is only whitspace as well */ + for (ptr += strlen(needle); ptr < end; ptr++) { + if (!isspace(*ptr)) + return 0; + } + + return 1; +} + +/* + * Read the configuration script, allocating and filling in the structure of + * global parameters. + */ +IOR_test_t *ReadConfigScript(char *scriptName) +{ + int test_num = 0; + int runflag = 0; + char linebuf[MAX_STR]; + char empty[MAX_STR]; + FILE *file; + IOR_test_t *head = NULL; + IOR_test_t *tail = NULL; + + /* Initialize the first test */ + head = CreateTest(&initialTestParams, test_num++); + tail = head; + + /* open the script */ + file = fopen(scriptName, "r"); + if (file == NULL) + ERR("fopen() failed"); + + /* search for the "IOR START" line */ + while (fgets(linebuf, MAX_STR, file) != NULL) { + if (contains_only(linebuf, "ior start")) { + break; + } + } + + /* Iterate over a block of IOR commands */ + while (fgets(linebuf, MAX_STR, file) != NULL) { + /* skip empty lines */ + if (sscanf(linebuf, "%s", empty) == -1) + continue; + /* skip lines containing only comments */ + if (sscanf(linebuf, " #%s", empty) == 1) + continue; + if (contains_only(linebuf, "ior stop")) { + AllocResults(tail); + break; + } else if (contains_only(linebuf, "run")) { + if (runflag) { + /* previous line was a "run" as well + create duplicate test */ + tail->next = CreateTest(&tail->params, test_num++); + tail = tail->next; + } + AllocResults(tail); + runflag = 1; + } else if (runflag) { + /* If this directive was preceded by a "run" line, then + create and initialize a new test structure */ + runflag = 0; + tail->next = CreateTest(&tail->params, test_num++); + tail = tail->next; + ParseLine(linebuf, &tail->params); + } else { + ParseLine(linebuf, &tail->params); + } + } + + /* close the script */ + if (fclose(file) != 0) + ERR("fclose() of script file failed"); + + return head; +} + +/* + * Parse Commandline. + */ +IOR_test_t *ParseCommandLine(int argc, char **argv) +{ + static const char *opts = + "a:A:b:BcCd:D:eEf:FgG:hHi:Ij:J:kKlmM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZ"; + int c, i; + static IOR_test_t *tests = NULL; + + /* suppress getopt() error message when a character is unrecognized */ + opterr = 0; + + init_IOR_Param_t(&initialTestParams); + GetPlatformName(initialTestParams.platform); + initialTestParams.writeFile = initialTestParams.readFile = FALSE; + initialTestParams.checkWrite = initialTestParams.checkRead = FALSE; + + while ((c = getopt(argc, argv, opts)) != -1) { + switch (c) { + case 'A': + initialTestParams.referenceNumber = atoi(optarg); + break; + case 'a': + strcpy(initialTestParams.api, optarg); + break; + case 'b': + initialTestParams.blockSize = StringToBytes(optarg); + RecalculateExpectedFileSize(&initialTestParams); + break; + case 'B': + initialTestParams.useO_DIRECT = TRUE; + break; + case 'c': + initialTestParams.collective = TRUE; + break; + case 'C': + initialTestParams.reorderTasks = TRUE; + break; + case 'Q': + initialTestParams.taskPerNodeOffset = atoi(optarg); + break; + case 'Z': + initialTestParams.reorderTasksRandom = TRUE; + break; + case 'X': + initialTestParams.reorderTasksRandomSeed = atoi(optarg); + break; + case 'd': + initialTestParams.interTestDelay = atoi(optarg); + break; + case 'D': + initialTestParams.deadlineForStonewalling = + atoi(optarg); + break; + case 'Y': + initialTestParams.fsyncPerWrite = TRUE; + break; + case 'e': + initialTestParams.fsync = TRUE; + break; + case 'E': + initialTestParams.useExistingTestFile = TRUE; + break; + case 'f': + tests = ReadConfigScript(optarg); + break; + case 'F': + initialTestParams.filePerProc = TRUE; + break; + case 'g': + initialTestParams.intraTestBarriers = TRUE; + break; + case 'G': + initialTestParams.setTimeStampSignature = atoi(optarg); + break; + case 'h': + initialTestParams.showHelp = TRUE; + break; + case 'H': + initialTestParams.showHints = TRUE; + break; + case 'i': + initialTestParams.repetitions = atoi(optarg); + break; + case 'I': + initialTestParams.individualDataSets = TRUE; + break; + case 'j': + initialTestParams.outlierThreshold = atoi(optarg); + break; + case 'J': + initialTestParams.setAlignment = StringToBytes(optarg); + break; + case 'k': + initialTestParams.keepFile = TRUE; + break; + case 'K': + initialTestParams.keepFileWithError = TRUE; + break; + case 'l': + initialTestParams.storeFileOffset = TRUE; + break; + case 'M': + initialTestParams.memoryPerNode = + NodeMemoryStringToBytes(optarg); + break; + case 'm': + initialTestParams.multiFile = TRUE; + break; + case 'n': + initialTestParams.noFill = TRUE; + break; + case 'N': + initialTestParams.numTasks = atoi(optarg); + RecalculateExpectedFileSize(&initialTestParams); + break; + case 'o': + strcpy(initialTestParams.testFileName, optarg); + break; + case 'O': + ParseLine(optarg, &initialTestParams); + break; + case 'p': + initialTestParams.preallocate = TRUE; + break; + case 'P': + initialTestParams.useSharedFilePointer = TRUE; + break; + case 'q': + initialTestParams.quitOnError = TRUE; + break; + case 'r': + initialTestParams.readFile = TRUE; + break; + case 'R': + initialTestParams.checkRead = TRUE; + break; + case 's': + initialTestParams.segmentCount = atoi(optarg); + RecalculateExpectedFileSize(&initialTestParams); + break; + case 'S': + initialTestParams.useStridedDatatype = TRUE; + break; + case 't': + initialTestParams.transferSize = StringToBytes(optarg); + break; + case 'T': + initialTestParams.maxTimeDuration = atoi(optarg); + break; + case 'u': + initialTestParams.uniqueDir = TRUE; + break; + case 'U': + strcpy(initialTestParams.hintsFileName, optarg); + break; + case 'v': + initialTestParams.verbose++; + break; + case 'V': + initialTestParams.useFileView = TRUE; + break; + case 'w': + initialTestParams.writeFile = TRUE; + break; + case 'W': + initialTestParams.checkWrite = TRUE; + break; + case 'x': + initialTestParams.singleXferAttempt = TRUE; + break; + case 'z': + initialTestParams.randomOffset = TRUE; + break; + default: + fprintf(stdout, + "ParseCommandLine: unknown option `-%c'.\n", + optopt); + } + } + + for (i = optind; i < argc; i++) + fprintf(stdout, "non-option argument: %s\n", argv[i]); + + /* If an IOR script was not used, initialize test queue to the defaults */ + if (tests == NULL) { + tests = CreateTest(&initialTestParams, 0); + AllocResults(tests); + } + + CheckRunSettings(tests); + + return (tests); +} diff --git a/microbenchmarks/ior/src/parse_options.h b/microbenchmarks/ior/src/parse_options.h new file mode 100644 index 00000000..45b93ca8 --- /dev/null +++ b/microbenchmarks/ior/src/parse_options.h @@ -0,0 +1,20 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +\******************************************************************************/ + +#ifndef _PARSE_OPTIONS_H +#define _PARSE_OPTIONS_H + +#include "ior.h" + +extern IOR_param_t initialTestParams; + +IOR_test_t *ParseCommandLine(int argc, char **argv); + +#endif /* !_PARSE_OPTIONS_H */ diff --git a/microbenchmarks/ior/src/utilities.c b/microbenchmarks/ior/src/utilities.c new file mode 100644 index 00000000..510a5b21 --- /dev/null +++ b/microbenchmarks/ior/src/utilities.c @@ -0,0 +1,432 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +******************************************************************************** +* +* Additional utilities +* +\******************************************************************************/ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include +#include +#include +#include +#include /* pow() */ +#include +#include +#include +#include +#ifndef _WIN32 +#include +#if defined(__sun) || defined(__APPLE__) /* SunOS/OSX do not support statfs(), instead uses statvfs() */ +#include +#else /* !__sun */ +#include +#endif /* __sun */ +#include /* gettimeofday() */ +#endif + +#include "utilities.h" +#include "aiori.h" +#include "ior.h" + +/************************** D E C L A R A T I O N S ***************************/ + +extern int errno; +extern int numTasks; +extern int rank; +extern int rankOffset; +extern int verbose; + +/***************************** F U N C T I O N S ******************************/ + +/* + * Returns string containing the current time. + */ +char *CurrentTimeString(void) +{ + static time_t currentTime; + char *currentTimePtr; + + if ((currentTime = time(NULL)) == -1) + ERR("cannot get current time"); + if ((currentTimePtr = ctime(¤tTime)) == NULL) { + ERR("cannot read current time"); + } + /* ctime string ends in \n */ + return (currentTimePtr); +} + +/* + * Dump transfer buffer. + */ +void DumpBuffer(void *buffer, size_t size) +{ + size_t i, j; + unsigned long long *dumpBuf = (unsigned long long *)buffer; + + for (i = 0; i < ((size / sizeof(IOR_size_t)) / 4); i++) { + for (j = 0; j < 4; j++) { + fprintf(stdout, "%016llx ", dumpBuf[4 * i + j]); + } + fprintf(stdout, "\n"); + } + return; +} /* DumpBuffer() */ + +/* + * Sends all strings to root nodes and displays. + */ +void OutputToRoot(int numTasks, MPI_Comm comm, char *stringToDisplay) +{ + int i; + int swapNeeded = TRUE; + int pairsToSwap; + char **stringArray; + char tmpString[MAX_STR]; + MPI_Status status; + + /* malloc string array */ + stringArray = (char **)malloc(sizeof(char *) * numTasks); + if (stringArray == NULL) + ERR("out of memory"); + for (i = 0; i < numTasks; i++) { + stringArray[i] = (char *)malloc(sizeof(char) * MAX_STR); + if (stringArray[i] == NULL) + ERR("out of memory"); + } + + strcpy(stringArray[rank], stringToDisplay); + + if (rank == 0) { + /* MPI_receive all strings */ + for (i = 1; i < numTasks; i++) { + MPI_CHECK(MPI_Recv(stringArray[i], MAX_STR, MPI_CHAR, + MPI_ANY_SOURCE, MPI_ANY_TAG, comm, + &status), "MPI_Recv() error"); + } + } else { + /* MPI_send string to root node */ + MPI_CHECK(MPI_Send + (stringArray[rank], MAX_STR, MPI_CHAR, 0, 0, comm), + "MPI_Send() error"); + } + MPI_CHECK(MPI_Barrier(comm), "barrier error"); + + /* sort strings using bubblesort */ + if (rank == 0) { + pairsToSwap = numTasks - 1; + while (swapNeeded) { + swapNeeded = FALSE; + for (i = 0; i < pairsToSwap; i++) { + if (strcmp(stringArray[i], stringArray[i + 1]) > + 0) { + strcpy(tmpString, stringArray[i]); + strcpy(stringArray[i], + stringArray[i + 1]); + strcpy(stringArray[i + 1], tmpString); + swapNeeded = TRUE; + } + } + pairsToSwap--; + } + } + + /* display strings */ + if (rank == 0) { + for (i = 0; i < numTasks; i++) { + fprintf(stdout, "%s\n", stringArray[i]); + } + } + + /* free strings */ + for (i = 0; i < numTasks; i++) { + free(stringArray[i]); + } + free(stringArray); +} + +/* + * Extract key/value pair from hint string. + */ +void ExtractHint(char *settingVal, char *valueVal, char *hintString) +{ + char *settingPtr, *valuePtr, *tmpPtr1, *tmpPtr2; + + settingPtr = (char *)strtok(hintString, "="); + valuePtr = (char *)strtok(NULL, " \t\r\n"); + tmpPtr1 = settingPtr; + tmpPtr2 = (char *)strstr(settingPtr, "IOR_HINT__MPI__"); + if (tmpPtr1 == tmpPtr2) { + settingPtr += strlen("IOR_HINT__MPI__"); + + } else { + tmpPtr2 = (char *)strstr(settingPtr, "IOR_HINT__GPFS__"); + if (tmpPtr1 == tmpPtr2) { + settingPtr += strlen("IOR_HINT__GPFS__"); + fprintf(stdout, + "WARNING: Unable to set GPFS hints (not implemented.)\n"); + } + } + strcpy(settingVal, settingPtr); + strcpy(valueVal, valuePtr); +} + +/* + * Set hints for MPIIO, HDF5, or NCMPI. + */ +void SetHints(MPI_Info * mpiHints, char *hintsFileName) +{ + char hintString[MAX_STR]; + char settingVal[MAX_STR]; + char valueVal[MAX_STR]; + extern char **environ; + int i; + FILE *fd; + + /* + * This routine checks for hints from the environment and/or from the + * hints files. The hints are of the form: + * 'IOR_HINT____=', where is either 'MPI' + * or 'GPFS', is the full name of the hint to be set, and + * is the hint value. E.g., 'setenv IOR_HINT__MPI__IBM_largeblock_io true' + * or 'IOR_HINT__GPFS__hint=value' in the hints file. + */ + MPI_CHECK(MPI_Info_create(mpiHints), "cannot create info object"); + + /* get hints from environment */ + for (i = 0; environ[i] != NULL; i++) { + /* if this is an IOR_HINT, pass the hint to the info object */ + if (strncmp(environ[i], "IOR_HINT", strlen("IOR_HINT")) == 0) { + strcpy(hintString, environ[i]); + ExtractHint(settingVal, valueVal, hintString); + MPI_CHECK(MPI_Info_set(*mpiHints, settingVal, valueVal), + "cannot set info object"); + } + } + + /* get hints from hints file */ + if (strcmp(hintsFileName, "") != 0) { + + /* open the hint file */ + fd = fopen(hintsFileName, "r"); + if (fd == NULL) { + WARN("cannot open hints file"); + } else { + /* iterate over hints file */ + while (fgets(hintString, MAX_STR, fd) != NULL) { + if (strncmp + (hintString, "IOR_HINT", + strlen("IOR_HINT")) == 0) { + ExtractHint(settingVal, valueVal, + hintString); + MPI_CHECK(MPI_Info_set + (*mpiHints, settingVal, + valueVal), + "cannot set info object"); + } + } + /* close the hints files */ + if (fclose(fd) != 0) + ERR("cannot close hints file"); + } + } +} + +/* + * Show all hints (key/value pairs) in an MPI_Info object. + */ +void ShowHints(MPI_Info * mpiHints) +{ + char key[MPI_MAX_INFO_VAL]; + char value[MPI_MAX_INFO_VAL]; + int flag, i, nkeys; + + MPI_CHECK(MPI_Info_get_nkeys(*mpiHints, &nkeys), + "cannot get info object keys"); + + for (i = 0; i < nkeys; i++) { + MPI_CHECK(MPI_Info_get_nthkey(*mpiHints, i, key), + "cannot get info object key"); + MPI_CHECK(MPI_Info_get(*mpiHints, key, MPI_MAX_INFO_VAL - 1, + value, &flag), + "cannot get info object value"); + fprintf(stdout, "\t%s = %s\n", key, value); + } +} + +/* + * Takes a string of the form 64, 8m, 128k, 4g, etc. and converts to bytes. + */ +IOR_offset_t StringToBytes(char *size_str) +{ + IOR_offset_t size = 0; + char range; + int rc; + + rc = sscanf(size_str, "%lld%c", &size, &range); + if (rc == 2) { + switch ((int)range) { + case 'k': + case 'K': + size <<= 10; + break; + case 'm': + case 'M': + size <<= 20; + break; + case 'g': + case 'G': + size <<= 30; + break; + } + } else if (rc == 0) { + size = -1; + } + return (size); +} + +/* + * Displays size of file system and percent of data blocks and inodes used. + */ +void ShowFileSystemSize(char *fileSystem) +{ +#ifndef _WIN32 /* FIXME */ + char realPath[PATH_MAX]; + char *fileSystemUnitStr; + long long int totalFileSystemSize; + long long int freeFileSystemSize; + long long int totalInodes; + long long int freeInodes; + double totalFileSystemSizeHR; + double usedFileSystemPercentage; + double usedInodePercentage; +#if defined(__sun) || defined(__APPLE__) /* SunOS does not support statfs(), instead uses statvfs() */ + struct statvfs statusBuffer; +#else /* !__sun */ + struct statfs statusBuffer; +#endif /* __sun */ + +#if defined(__sun) || defined(__APPLE__) + if (statvfs(fileSystem, &statusBuffer) != 0) { + ERR("unable to statvfs() file system"); + } +#else /* !__sun */ + if (statfs(fileSystem, &statusBuffer) != 0) { + ERR("unable to statfs() file system"); + } +#endif /* __sun */ + + /* data blocks */ +#if defined(__sun) || defined(__APPLE__) + totalFileSystemSize = statusBuffer.f_blocks * statusBuffer.f_frsize; + freeFileSystemSize = statusBuffer.f_bfree * statusBuffer.f_frsize; +#else /* !__sun */ + totalFileSystemSize = statusBuffer.f_blocks * statusBuffer.f_bsize; + freeFileSystemSize = statusBuffer.f_bfree * statusBuffer.f_bsize; +#endif /* __sun */ + + usedFileSystemPercentage = (1 - ((double)freeFileSystemSize + / (double)totalFileSystemSize)) * 100; + totalFileSystemSizeHR = + (double)totalFileSystemSize / (double)(1<<30); + fileSystemUnitStr = "GiB"; + if (totalFileSystemSizeHR > 1024) { + totalFileSystemSizeHR = (double)totalFileSystemSize / (double)((long long)1<<40); + fileSystemUnitStr = "TiB"; + } + + /* inodes */ + totalInodes = statusBuffer.f_files; + freeInodes = statusBuffer.f_ffree; + usedInodePercentage = + (1 - ((double)freeInodes / (double)totalInodes)) * 100; + + /* show results */ + if (realpath(fileSystem, realPath) == NULL) { + ERR("unable to use realpath()"); + } + fprintf(stdout, "Path: %s\n", realPath); + fprintf(stdout, "FS: %.1f %s Used FS: %2.1f%% ", + totalFileSystemSizeHR, fileSystemUnitStr, + usedFileSystemPercentage); + fprintf(stdout, "Inodes: %.1f Mi Used Inodes: %2.1f%%\n", + (double)totalInodes / (double)(1<<20), + usedInodePercentage); + fflush(stdout); +#endif /* !_WIN32 */ + + return; +} + +/* + * Return match of regular expression -- 0 is failure, 1 is success. + */ +int Regex(char *string, char *pattern) +{ + int retValue = 0; +#ifndef _WIN32 /* Okay to always not match */ + regex_t regEx; + regmatch_t regMatch; + + regcomp(®Ex, pattern, REG_EXTENDED); + if (regexec(®Ex, string, 1, ®Match, 0) == 0) { + retValue = 1; + } + regfree(®Ex); +#endif + + return (retValue); +} + +/* + * Seed random generator. + */ +void SeedRandGen(MPI_Comm testComm) +{ + unsigned int randomSeed; + + if (rank == 0) { +#ifdef _WIN32 + rand_s(&randomSeed); +#else + struct timeval randGenTimer; + gettimeofday(&randGenTimer, (struct timezone *)NULL); + randomSeed = randGenTimer.tv_usec; +#endif + } + MPI_CHECK(MPI_Bcast(&randomSeed, 1, MPI_INT, 0, + testComm), "cannot broadcast random seed value"); + srandom(randomSeed); +} + +/* + * System info for Windows. + */ +#ifdef _WIN32 +int uname(struct utsname *name) +{ + DWORD nodeNameSize = sizeof(name->nodename) - 1; + + memset(name, 0, sizeof(struct utsname)); + if (!GetComputerNameEx + (ComputerNameDnsFullyQualified, name->nodename, &nodeNameSize)) + ERR("GetComputerNameEx failed"); + + strncpy(name->sysname, "Windows", sizeof(name->sysname) - 1); + /* FIXME - these should be easy to fetch */ + strncpy(name->release, "-", sizeof(name->release) - 1); + strncpy(name->version, "-", sizeof(name->version) - 1); + strncpy(name->machine, "-", sizeof(name->machine) - 1); + return 0; +} +#endif /* _WIN32 */ diff --git a/microbenchmarks/ior/src/utilities.h b/microbenchmarks/ior/src/utilities.h new file mode 100644 index 00000000..e3dcabc8 --- /dev/null +++ b/microbenchmarks/ior/src/utilities.h @@ -0,0 +1,31 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +\******************************************************************************/ + +#ifndef _UTILITIES_H +#define _UTILITIES_H + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#include + +#include "ior.h" + +char *CurrentTimeString(void); +void OutputToRoot(int, MPI_Comm, char *); +int Regex(char *, char *); +void ShowFileSystemSize(char *); +void DumpBuffer(void *, size_t); +void SeedRandGen(MPI_Comm); +void SetHints (MPI_Info *, char *); +void ShowHints (MPI_Info *); + +#endif /* !_UTILITIES_H */ diff --git a/microbenchmarks/ior/src/win/getopt.c b/microbenchmarks/ior/src/win/getopt.c new file mode 100644 index 00000000..77ff545c --- /dev/null +++ b/microbenchmarks/ior/src/win/getopt.c @@ -0,0 +1,1188 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to drepper@gnu.org + before changing it! + Copyright (C) 1987,88,89,90,91,92,93,94,95,96,98,99,2000,2001 + Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + The GNU C Library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA + 02111-1307 USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in . + Ditto for AIX 3.2 and . */ + +#define _CRT_SECURE_NO_WARNINGS + +#ifndef _NO_PROTO +# define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +# include +#endif + +#if !defined __STDC__ || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +# ifndef const +# define const +# endif +#endif + +#include +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#define GETOPT_INTERFACE_VERSION 2 +#if !defined _LIBC && defined __GLIBC__ && __GLIBC__ >= 2 +# include +# if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION +# define ELIDE_CODE +# endif +#endif + +#ifndef ELIDE_CODE + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +# include +# include +#endif /* GNU C library. */ + +#ifdef VMS +# include +# if HAVE_STRING_H - 0 +# include +# endif +#endif + +#ifndef _ +/* This is for other GNU distributions with internationalized messages. */ +# if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC +# include +# ifndef _ +# define _(msgid) gettext (msgid) +# endif +# else +# define _(msgid) (msgid) +# endif +# if defined _LIBC && defined USE_IN_LIBIO +# include +# endif +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* 1003.2 says this must be 1 before any call. */ +int optind = 1; + +/* Formerly, initialization of getopt depended on optind==0, which + causes problems with re-calling getopt as programs generally don't + know that. */ + +int __getopt_initialized; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +# include +# define my_index strchr +#else + +# if HAVE_STRING_H || WIN32 /* Pete Wilson mod 7/28/02 */ +# include +# else +# include +# endif + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +#ifndef getenv +//extern char *getenv (); +#endif + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. */ +#ifdef __GNUC__ +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +# if (!defined __STDC__ || !__STDC__) && !defined strlen +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +# endif /* not __STDC__ */ +#endif /* __GNUC__ */ + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +#ifdef _LIBC +/* Stored original parameters. + XXX This is no good solution. We should rather copy the args so + that we can compare them later. But we must not use malloc(3). */ +extern int __libc_argc; +extern char **__libc_argv; + +/* Bash 2.0 gives us an environment variable containing flags + indicating ARGV elements that should not be considered arguments. */ + +# ifdef USE_NONOPTION_FLAGS +/* Defined in getopt_init.c */ +extern char *__getopt_nonoption_flags; + +static int nonoption_flags_max_len; +static int nonoption_flags_len; +# endif + +# ifdef USE_NONOPTION_FLAGS +# define SWAP_FLAGS(ch1, ch2) \ + if (nonoption_flags_len > 0) \ + { \ + char __tmp = __getopt_nonoption_flags[ch1]; \ + __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \ + __getopt_nonoption_flags[ch2] = __tmp; \ + } +# else +# define SWAP_FLAGS(ch1, ch2) +# endif +#else /* !_LIBC */ +# define SWAP_FLAGS(ch1, ch2) +#endif /* _LIBC */ + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +#if defined __STDC__ && __STDC__ +static void exchange (char **); +#endif + +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + /* First make sure the handling of the `__getopt_nonoption_flags' + string can work normally. Our top argument must be in the range + of the string. */ + if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len) + { + /* We must extend the array. The user plays games with us and + presents new arguments. */ + char *new_str = malloc (top + 1); + if (new_str == NULL) + nonoption_flags_len = nonoption_flags_max_len = 0; + else + { + memset (__mempcpy (new_str, __getopt_nonoption_flags, + nonoption_flags_max_len), + '\0', top + 1 - nonoption_flags_max_len); + nonoption_flags_max_len = top + 1; + __getopt_nonoption_flags = new_str; + } + } +#endif + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + SWAP_FLAGS (bottom + i, top - (middle - bottom) + i); + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + SWAP_FLAGS (bottom + i, middle + i); + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +#if defined __STDC__ && __STDC__ +static const char *_getopt_initialize (int, char *const *, const char *); +#endif +static const char * +_getopt_initialize (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + +#if defined _LIBC && defined USE_NONOPTION_FLAGS + if (posixly_correct == NULL + && argc == __libc_argc && argv == __libc_argv) + { + if (nonoption_flags_max_len == 0) + { + if (__getopt_nonoption_flags == NULL + || __getopt_nonoption_flags[0] == '\0') + nonoption_flags_max_len = -1; + else + { + const char *orig_str = __getopt_nonoption_flags; + int len = nonoption_flags_max_len = strlen (orig_str); + if (nonoption_flags_max_len < argc) + nonoption_flags_max_len = argc; + __getopt_nonoption_flags = + (char *) malloc (nonoption_flags_max_len); + if (__getopt_nonoption_flags == NULL) + nonoption_flags_max_len = -1; + else + memset (__mempcpy (__getopt_nonoption_flags, orig_str, len), + '\0', nonoption_flags_max_len - len); + } + } + nonoption_flags_len = nonoption_flags_max_len; + } + else + nonoption_flags_len = 0; +#endif + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + int print_errors = opterr; + if (optstring[0] == ':') + print_errors = 0; + + if (argc < 1) + return -1; + + optarg = NULL; + + if (optind == 0 || !__getopt_initialized) + { + if (optind == 0) + optind = 1; /* Don't scan ARGV[0], the program name. */ + optstring = _getopt_initialize (argc, argv, optstring); + __getopt_initialized = 1; + } + + /* Test whether ARGV[optind] points to a non-option argument. + Either it does not have option syntax, or there is an environment flag + from the shell indicating it is not an option. The later information + is only used when the used in the GNU libc. */ +#if defined _LIBC && defined USE_NONOPTION_FLAGS +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0' \ + || (optind < nonoption_flags_len \ + && __getopt_nonoption_flags[optind] == '1')) +#else +# define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0') +#endif + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + /* Give FIRST_NONOPT and LAST_NONOPT rational values if OPTIND has been + moved back by the user (who may also have changed the arguments). */ + if (last_nonopt > optind) + last_nonopt = optind; + if (first_nonopt > optind) + first_nonopt = optind; + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc && NONOPTION_P) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if (NONOPTION_P) + { + if (ordering == REQUIRE_ORDER) + return -1; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = -1; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) + == (unsigned int) strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else if (long_only + || pfound->has_arg != p->has_arg + || pfound->flag != p->flag + || pfound->val != p->val) + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `%s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + optopt = 0; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (argv[optind - 1][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#else + fprintf (stderr, _("\ +%s: option `--%s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], + pfound->name); +#else + fprintf (stderr, _("\ +%s: option `%c%s' doesn't allow an argument\n"), + argv[0], argv[optind - 1][0], pfound->name); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + + nextchar += strlen (nextchar); + + optopt = pfound->val; + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + optopt = pfound->val; + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (argv[optind][1] == '-') + { + /* --option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `--%s'\n"), + argv[0], nextchar); +#endif + } + else + { + /* +option or -option */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#else + fprintf (stderr, _("%s: unrecognized option `%c%s'\n"), + argv[0], argv[optind][0], nextchar); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + nextchar = (char *) ""; + optind++; + optopt = 0; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; +#endif + + if (posixly_correct) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: illegal option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], c); +#endif + } + else + { +#if defined _LIBC && defined USE_IN_LIBIO + __asprintf (&buf, _("%s: invalid option -- %c\n"), + argv[0], c); +#else + fprintf (stderr, _("%s: invalid option -- %c\n"), argv[0], c); +#endif + } + +#if defined _LIBC && defined USE_IN_LIBIO + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#endif + } + optopt = c; + return '?'; + } + /* Convenience. Treat POSIX -W foo same as long option --foo */ + if (temp[0] == 'W' && temp[1] == ';') + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + return c; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + + /* optarg is now the argument, see if it's in the + table of longopts. */ + + for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if ((unsigned int) (nameend - nextchar) == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + if (ambig && !exact) + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"), + argv[0], argv[optind]); +#endif + } + nextchar += strlen (nextchar); + optind++; + return '?'; + } + if (pfound != NULL) + { + option_index = indfound; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, _("\ +%s: option `-W %s' doesn't allow an argument\n"), + argv[0], pfound->name); +#endif + } + + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (print_errors) + { +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, _("\ +%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option `%s' requires an argument\n"), + argv[0], argv[optind - 1]); +#endif + } + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + nextchar = NULL; + return 'W'; /* Let the application handle it. */ + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (print_errors) + { + /* 1003.2 specifies the format of this message. */ +#if defined _LIBC && defined USE_IN_LIBIO + char *buf; + + __asprintf (&buf, + _("%s: option requires an argument -- %c\n"), + argv[0], c); + + if (_IO_fwide (stderr, 0) > 0) + __fwprintf (stderr, L"%s", buf); + else + fputs (buf, stderr); + + free (buf); +#else + fprintf (stderr, + _("%s: option requires an argument -- %c\n"), + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* Not ELIDE_CODE. */ + diff --git a/microbenchmarks/ior/src/win/getopt.h b/microbenchmarks/ior/src/win/getopt.h new file mode 100644 index 00000000..d3990e18 --- /dev/null +++ b/microbenchmarks/ior/src/win/getopt.h @@ -0,0 +1,192 @@ +/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- + * vim:expandtab:shiftwidth=8:tabstop=8: + */ +/* getopt.h */ +/* Declarations for getopt. + Copyright (C) 1989-1994, 1996-1999, 2001 Free Software + Foundation, Inc. This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute + it and/or modify it under the terms of the GNU Lesser + General Public License as published by the Free Software + Foundation; either version 2.1 of the License, or + (at your option) any later version. + + The GNU C Library 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 Lesser General Public + License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with the GNU C Library; if not, write + to the Free Software Foundation, Inc., 59 Temple Place, + Suite 330, Boston, MA 02111-1307 USA. */ + + + + + +#ifndef _GETOPT_H + +#ifndef __need_getopt +# define _GETOPT_H 1 +#endif + +/* If __GNU_LIBRARY__ is not already defined, either we are being used + standalone, or this is the first header included in the source file. + If we are being used with glibc, we need to include , but + that does not exist if we are standalone. So: if __GNU_LIBRARY__ is + not defined, include , which will pull in for us + if it's from glibc. (Why ctype.h? It's guaranteed to exist and it + doesn't flood the namespace with stuff the way some other headers do.) */ +#if !defined __GNU_LIBRARY__ +# include +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +#ifndef __need_getopt +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ +# if (defined __STDC__ && __STDC__) || defined __cplusplus + const char *name; +# else + char *name; +# endif + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +# define no_argument 0 +# define required_argument 1 +# define optional_argument 2 +#endif /* need getopt */ + + +/* Get definitions and prototypes for functions to process the + arguments in ARGV (ARGC of them, minus the program name) for + options given in OPTS. + + Return the option character from OPTS just read. Return -1 when + there are no more options. For unrecognized options, or options + missing arguments, `optopt' is set to the option letter, and '?' is + returned. + + The OPTS string is a list of characters which are recognized option + letters, optionally followed by colons, specifying that that letter + takes an argument, to be placed in `optarg'. + + If a letter in OPTS is followed by two colons, its argument is + optional. This behavior is specific to the GNU `getopt'. + + The argument `--' causes premature termination of argument + scanning, explicitly telling `getopt' that there are no more + options. + + If OPTS begins with `--', then non-option arguments are treated as + arguments to the option '\0'. This behavior is specific to the GNU + `getopt'. */ + +#if (defined __STDC__ && __STDC__) || defined __cplusplus +# ifdef __cplusplus // __GNU_LIBRARY__ +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int ___argc, char *const *___argv, const char *__shortopts); +# else /* not __GNU_LIBRARY__ */ +extern int getopt (); +# endif /* __GNU_LIBRARY__ */ + +# ifndef __need_getopt +extern int getopt_long (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); +extern int getopt_long_only (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt_internal (int ___argc, char *const *___argv, + const char *__shortopts, + const struct option *__longopts, int *__longind, + int __long_only); +# endif +#else /* not __STDC__ */ +extern int getopt (); +# ifndef __need_getopt +extern int getopt_long (); +extern int getopt_long_only (); + +extern int _getopt_internal (); +# endif +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +/* Make sure we later can get all the definitions and declarations. */ +#undef __need_getopt + +#endif /* getopt.h */ + diff --git a/microbenchmarks/ior/testing/IOR-tester.README b/microbenchmarks/ior/testing/IOR-tester.README new file mode 100644 index 00000000..da57cf40 --- /dev/null +++ b/microbenchmarks/ior/testing/IOR-tester.README @@ -0,0 +1,46 @@ +/******************************************************************************\ +* * +* Copyright (c) 2003, The Regents of the University of California * +* See the file COPYRIGHT for a complete copyright notice and license. * +* * +\******************************************************************************/ + +The IOR-tester runs a series of tests to check and maintain the existing +functionality of the source code as code is modified. The IOR-tester creates +a default test, then modifies it to run test scripts. It runs a large number +of tests, most which are expected to pass, but some with an expectation of +failure. + +To run the code, modify the 'DefaultTest' dictionary in the source code to +reflect the test file location, the executable location, etc. Then, run +the code using './IOR-tester.py'. + +The expected-pass, pattern-independent tests include: + POSIX only: + o retry transfer + + MPIIO only: + o hints + o preallocation + + Both POSIX and MPIIO: + o repetition count + o intertest delay + o test file removal + o verbosity + +The expected-pass, pattern-dependent tests include: + POSIX: + o write-only, read-only, write/read, and write/read check + o fpp and single file + o segmented, strided + o zero-length, 4-byte, and larger file, block, and transfer sizes + MPIIO (same as POSIX, but using MPIIO access): + o noncollective + o noncollective, file view + o collective + o collective, file view + +The expected-fail tests include: + Both POSIX and MPIIO: + o repetition count diff --git a/microbenchmarks/ior/testing/IOR-tester.py b/microbenchmarks/ior/testing/IOR-tester.py new file mode 100755 index 00000000..499b79c2 --- /dev/null +++ b/microbenchmarks/ior/testing/IOR-tester.py @@ -0,0 +1,1605 @@ +#!/usr/bin/env python +# +# Tester for IOR +# +#/*****************************************************************************\ +#* * +#* Copyright (c) 2003, The Regents of the University of California * +#* See the file COPYRIGHT for a complete copyright notice and license. * +#* * +#\*****************************************************************************/ + +import sys +import os.path +import string + +# definitions +RETURN_TOTAL_TESTS = -1 +TEST_SETTINGS = 0 +TEST_SUBSET_SIZE = 5 # number of tests in each job submission +IOR_SIZE_T = 8 +KIBIBYTE = 1024 +MEBIBYTE = KIBIBYTE * KIBIBYTE +GIBIBYTE = KIBIBYTE * MEBIBYTE +PASS = 1 +FAIL = 0 +TRUE = 1 +FALSE = 0 +scriptFileBase = './scriptFile' +executable = '../src/C/IOR' +#testDir = './tmp_test_dir' +testDir = '/p/glocal1/loewe/tmp_test_dir' + +debug = FALSE # debug mode = {FALSE, TRUE} + +################################################################################ +# class for default test parameters # +################################################################################ +class Test: + ###################### + # default parameters # + ###################### + def DefaultTest(self): + return { + # general + 'debug': 'debug info', + 'api': 'POSIX', + 'testFile': testDir + '/testFile.1', + 'hintsFileName': '', + 'repetitions': 1, + 'multiFile': 0, + 'interTestDelay': 0, + 'numTasks': 0, + 'readFile': 1, + 'writeFile': 1, + 'filePerProc': 0, + 'fsync': 0, + 'checkWrite': 1, + 'checkRead': 1, + 'keepFile': 1, + 'keepFileWithError': 1, + 'segmentCount': 1, + 'blockSize': MEBIBYTE, + 'transferSize': (MEBIBYTE / 4), + 'verbose': 0, + 'showHelp': 0, + 'reorderTasks': 1, # not default in code + 'quitOnError': 0, + 'useExistingTestFile': 0, + 'deadlineForStonewalling': 0, + 'maxTimeDuration': 0, + 'setTimeStampSignature': 0, + 'intraTestBarriers': 0, + 'storeFileOffset': 0, + 'randomOffset': 0, + # POSIX + 'singleXferAttempt': 0, + 'useO_DIRECT': 0, + # MPIIO + 'useFileView': 0, + 'preallocate': 0, + 'useSharedFilePointer': 0, # not working yet + 'useStridedDatatype': 0, # not working yet + # non-POSIX + 'showHints': 0, + 'collective': 0, + # HDF5 + 'setAlignment': 1, + 'noFill': 0, # in hdf5-1.6 or later version + 'individualDataSets': 0 # not working yet + } + + ################### + # tests to be run # + ################### + def Tests(self, expectation, testNumber): + +################################################################################ +################################################################################ +# # +# S T A R T O F T E S T S # +# # +################################################################################ +################################################################################ + POSIX_TESTS = [ + # + # pattern independent tests + # + + # POSIX, interTestDelay + [{'debug': 'POSIX interTestDelay', + 'interTestDelay': 0}], + [{'debug': 'POSIX interTestDelay', + 'interTestDelay': 1}], + + # POSIX, intraTestBarriers + [{'debug': 'POSIX intraTestBarriers', + 'intraTestBarriers': 1}], + + # POSIX, uniqueDir + [{'debug': 'POSIX uniqueDir', + 'filePerProc': 1, + 'uniqueDir': 1}], + + # POSIX, uniqueDir random + [{'debug': 'POSIX uniqueDir random', + 'filePerProc': 1, + 'randomOffset': 1, + 'checkRead': 0, + 'uniqueDir': 1}], + + # POSIX, fsync + [{'debug': 'POSIX fsync', + 'fsync': 1}], + + # POSIX, repetitions + [{'debug': 'POSIX repetitions', + 'repetitions': 1}], + [{'debug': 'POSIX repetitions', + 'repetitions': 3}], + + # POSIX, repetitions random + [{'debug': 'POSIX repetitions random', + 'randomOffset': 1, + 'checkRead': 0, + 'repetitions': 3}], + + # POSIX, multiFile + [{'debug': 'POSIX multiFile', + 'repetitions': 3, + 'multiFile': 1}], + + # POSIX, multiFile random + [{'debug': 'POSIX multiFile', + 'repetitions': 3, + 'randomOffset': 1, + 'checkRead': 0, + 'multiFile': 1}], + + # POSIX, writeFile-only + [{'debug': 'POSIX writeFile-only', + 'writeFile': 1, + 'readFile': 0, + 'checkRead': 0}], + + # POSIX, writeFile-only random + [{'debug': 'POSIX writeFile-only random', + 'writeFile': 1, + 'randomOffset': 1, + 'readFile': 0, + 'checkRead': 0}], + + # POSIX, readFile-only + [{'debug': 'POSIX readFile-only', + 'writeFile': 0, + 'checkWrite': 0, + 'readFile': 1}], + + # POSIX, readFile-only + [{'debug': 'POSIX readFile-only random', + 'writeFile': 0, + 'checkWrite': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'readFile': 1}], + + # POSIX, write/read check off + [{'debug': 'POSIX write-read check off', + 'checkWrite': 0, + 'checkRead': 0}], + + # POSIX, write/read check off random + [{'debug': 'POSIX write-read check off random', + 'checkWrite': 0, + 'randomOffset': 1, + 'checkRead': 0}], + + # POSIX, store file offset + [{'debug': 'POSIX store file offset', + 'storeFileOffset':1}], + + # POSIX, remove file + [{'debug': 'POSIX remove file', + 'keepFile': 0}], + + # POSIX, remove file random + [{'debug': 'POSIX remove file', + 'randomOffset': 1, + 'checkRead': 0, + 'keepFile': 0}], + + # POSIX, remove file with error + [{'debug': 'POSIX remove file with error', + 'keepFileWithError': 0}], + + # POSIX, remove file with error random + [{'debug': 'POSIX remove file with error random', + 'randomOffset': 1, + 'checkRead': 0, + 'keepFileWithError': 0}], + + + # POSIX, deadline for stonewalling + [{'debug': 'POSIX deadlineForStonewalling', + 'testFile': test.DefaultTest()['testFile'] + '.stonewall', + 'blockSize': GIBIBYTE, + 'readFile': 0, + 'checkWrite': 0, + 'checkRead': 0, + 'deadlineForStonewalling':1}], + + # POSIX, deadline for stonewalling random + [{'debug': 'POSIX deadlineForStonewalling random', + 'testFile': test.DefaultTest()['testFile'] + '.stonewall', + 'blockSize': GIBIBYTE, + 'readFile': 0, + 'checkWrite': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'deadlineForStonewalling':1}], + + # POSIX, max time duration + [{'debug': 'POSIX maxTimeDuration', + 'maxTimeDuration':1}], + + # POSIX, max time duration random + [{'debug': 'POSIX maxTimeDuration random', + 'randomOffset': 1, + 'checkRead': 0, + 'maxTimeDuration':1}], + + # POSIX, verbose + [{'debug': 'POSIX verbose 0', + 'verbose': 0}], + [{'debug': 'POSIX verbose 1', + 'verbose': 1}], + [{'debug': 'POSIX verbose 2', + 'verbose': 2}], + [{'debug': 'POSIX verbose 3', + 'verbose': 3}], + [{'debug': 'POSIX verbose 4', + 'verbose': 4, + 'blockSize': KIBIBYTE, + 'transferSize': (KIBIBYTE / 4)}], + + + # POSIX, multiple file names, ssf + [{'debug': 'POSIX multiple file names ssf', + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # POSIX, multiple file names, ssf random + [{'debug': 'POSIX multiple file names ssf random', + 'randomOffset': 1, + 'checkRead': 0, + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # POSIX, multiple file names, fpp + [{'debug': 'POSIX multiple file names fpp', + 'filePerProc': 1, + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # POSIX, multiple file names, fpp random + [{'debug': 'POSIX multiple file names fpp random', + 'filePerProc': 1, + 'randomOffset': 1, + 'checkRead': 0, + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # POSIX, corruptFile + [{'debug': 'POSIX corruptFile', + 'testFile': test.DefaultTest()['testFile'], + 'filePerProc': 0, + 'corruptFile': 1}], + + # POSIX, corruptFile random + [{'debug': 'POSIX corruptFile random', + 'testFile': test.DefaultTest()['testFile'], + 'filePerProc': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'corruptFile': 1}], + + # POSIX, corruptFile + [{'debug': 'POSIX corruptFile filePerProc', + 'filePerProc': 1, + 'corruptFile': 1}], + + # POSIX, corruptFile random + [{'debug': 'POSIX corruptFile filePerProc random', + 'filePerProc': 1, + 'randomOffset': 1, + 'checkRead': 0, + 'corruptFile': 1}], + + # POSIX, showHelp + [{'debug': 'POSIX showHelp', + 'showHelp': 1, + 'filePerProc': 0, + 'corruptFile': 0}], + + # POSIX, quitOnError + [{'debug': 'POSIX quitOnError', + 'quitOnError': 1}], + + # POSIX, quitOnError random + [{'debug': 'POSIX quitOnError random', + 'randomOffset': 1, + 'checkRead': 0, + 'quitOnError': 1}], + + # POSIX, singleXferAttempt + [{'debug': 'POSIX singleXferAttempt', + 'singleXferAttempt': 1}], + + # POSIX, singleXferAttempt random + [{'debug': 'POSIX singleXferAttempt random', + 'randomOffset': 1, + 'checkRead': 0, + 'singleXferAttempt': 1}], + + # POSIX, setTimeStampSignature + [{'debug': 'POSIX setTimeStampSignature', + 'setTimeStampSignature': 123}], + + # POSIX, setTimeStampSignature random + [{'debug': 'POSIX setTimeStampSignature random', + 'randomOffset': 1, + 'checkRead': 0, + 'setTimeStampSignature': 123}], + + # POSIX, useExistingTestFile [Note: don't follow HDF5 test] + [{'debug': 'POSIX useExistingTestFile', + 'useExistingTestFile': 1}], + + # POSIX, useExistingTestFile random [Note: don't follow HDF5 test] + [{'debug': 'POSIX useExistingTestFile', + 'randomOffset': 1, + 'checkRead': 0, + 'useExistingTestFile': 1}], + + # + # pattern dependent tests + # + + # POSIX, filePerProc + [{'debug': 'POSIX filePerProc', + 'filePerProc': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'POSIX filePerProc', + 'filePerProc': 1, + 'segmentCount': 1}], + + [{'debug': 'POSIX filePerProc', + 'filePerProc': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'POSIX filePerProc', + 'filePerProc': 1, + 'segmentCount': 3}], + + # POSIX, sharedFile + [{'debug': 'POSIX sharedFile', + 'filePerProc': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'POSIX sharedFile', + 'filePerProc': 0, + 'segmentCount': 1}], + + [{'debug': 'POSIX sharedFile', + 'filePerProc': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'POSIX sharedFile', + 'filePerProc': 0, + 'segmentCount': 3}], + + [{'debug': 'POSIX sharedFile numTasks', + 'filePerProc': 0, + 'numTasks': 2, + 'segmentCount': 3}], + + # + # pattern dependent tests, random + # + + # POSIX, filePerProc random + [{'debug': 'POSIX filePerProc random', + 'filePerProc': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'POSIX filePerProc random', + 'filePerProc': 1, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'POSIX filePerProc random', + 'filePerProc': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + [{'debug': 'POSIX filePerProc random', + 'filePerProc': 1, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + # POSIX, sharedFile random + [{'debug': 'POSIX sharedFile random', + 'filePerProc': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'POSIX sharedFile random', + 'filePerProc': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'POSIX sharedFile random', + 'filePerProc': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + [{'debug': 'POSIX sharedFile random', + 'filePerProc': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + [{'debug': 'POSIX sharedFile numTasks random', + 'filePerProc': 0, + 'numTasks': 2, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}] + ] + + MPIIO_TESTS = [ + # + # pattern independent tests + # + + # MPIIO, repetitions + [{'debug': 'MPIIO repetitions', + 'api': 'MPIIO', + 'repetitions': 1}], + [{'debug': 'MPIIO repetitions', + 'api': 'MPIIO', + 'repetitions': 3}], + [{'debug': 'MPIIO repetitions random', + 'api': 'MPIIO', + 'randomOffset': 1, + 'checkRead': 0, + 'repetitions': 3}], + + # MPIIO, multiFile + [{'debug': 'MPIIO multiFile', + 'api': 'MPIIO', + 'repetitions': 3, + 'multiFile': 1}], + + # MPIIO, multiFile random + [{'debug': 'MPIIO multiFile random', + 'api': 'MPIIO', + 'repetitions': 3, + 'randomOffset': 1, + 'checkRead': 0, + 'multiFile': 1}], + + # MPIIO, remove file + [{'debug': 'MPIIO remove file', + 'api': 'MPIIO', + 'keepFile': 0}], + + # MPIIO, remove file random + [{'debug': 'MPIIO remove file', + 'api': 'MPIIO', + 'randomOffset': 1, + 'checkRead': 0, + 'keepFile': 0}], + + # MPIIO, remove file with error + [{'debug': 'MPIIO remove file with error', + 'api': 'MPIIO', + 'keepFileWithError': 0}], + + # MPIIO, remove file with error random + [{'debug': 'MPIIO remove file with error random', + 'api': 'MPIIO', + 'randomOffset': 1, + 'checkRead': 0, + 'keepFileWithError': 0}], + + # MPIIO, deadline for stonewalling + [{'debug': 'MPIIO deadlineForStonewalling', + 'api': 'MPIIO', + 'testFile': test.DefaultTest()['testFile'] + '.stonewall', + 'blockSize': GIBIBYTE, + 'readFile': 0, + 'checkWrite': 0, + 'checkRead': 0, + 'deadlineForStonewalling':1}], + + # MPIIO, deadline for stonewalling random + [{'debug': 'MPIIO deadlineForStonewalling random', + 'api': 'MPIIO', + 'testFile': test.DefaultTest()['testFile'] + '.stonewall', + 'blockSize': GIBIBYTE, + 'readFile': 0, + 'checkWrite': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'deadlineForStonewalling':1}], + + # MPIIO, max time duration + [{'debug': 'MPIIO maxTimeDuration', + 'api': 'MPIIO', + 'maxTimeDuration':1}], + + # MPIIO, max time duration random + [{'debug': 'MPIIO maxTimeDuration random', + 'api': 'MPIIO', + 'randomOffset': 1, + 'checkRead': 0, + 'maxTimeDuration':1}], + + # MPIIO, quitOnError + [{'debug': 'MPIIO quitOnError', + 'api': 'MPIIO', + 'quitOnError': 1}], + + # MPIIO, quitOnError random + [{'debug': 'MPIIO quitOnError random', + 'api': 'MPIIO', + 'randomOffset': 1, + 'checkRead': 0, + 'quitOnError': 1}], + + # MPIIO, multiple file names, ssf + [{'debug': 'MPIIO multiple file names ssf', + 'api': 'MPIIO', + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # MPIIO, multiple file names, ssf random + [{'debug': 'MPIIO multiple file names ssf random', + 'api': 'MPIIO', + 'randomOffset': 1, + 'checkRead': 0, + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # MPIIO, multiple file names, fpp + [{'debug': 'MPIIO multiple file names fpp', + 'api': 'MPIIO', + 'filePerProc': 1, + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # MPIIO, multiple file names, fpp random + [{'debug': 'MPIIO multiple file names fpp random', + 'api': 'MPIIO', + 'filePerProc': 1, + 'randomOffset': 1, + 'checkRead': 0, + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # MPIIO, corruptFile + [{'debug': 'MPIIO corruptFile', + 'api': 'MPIIO', + 'testFile': test.DefaultTest()['testFile'], + 'filePerProc': 0, + 'corruptFile': 1}], + + # MPIIO, corruptFile random + [{'debug': 'MPIIO corruptFile random', + 'api': 'MPIIO', + 'testFile': test.DefaultTest()['testFile'], + 'filePerProc': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'corruptFile': 1}], + + # MPIIO, corruptFile + [{'debug': 'MPIIO corruptFile filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'corruptFile': 1}], + + # MPIIO, corruptFile random + [{'debug': 'MPIIO corruptFile filePerProc random', + 'api': 'MPIIO', + 'filePerProc': 1, + 'randomOffset': 1, + 'checkRead': 0, + 'corruptFile': 1}], + + # MPIIO, useExistingTestFile + [{'debug': 'MPIIO useExistingTestFile', + 'api': 'MPIIO', + 'useExistingTestFile': 0, + 'filePerProc': 0, + 'corruptFile': 0}], + + # MPIIO, useExistingTestFile random + [{'debug': 'MPIIO useExistingTestFile random', + 'api': 'MPIIO', + 'useExistingTestFile': 0, + 'filePerProc': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'corruptFile': 0}], + + # MPIIO, preallocate + [{'debug': 'MPIIO preallocate', + 'api': 'MPIIO', + 'preallocate': 1}], + + # MPIIO, showHints + [{'debug': 'MPIIO showHints', + 'api': 'MPIIO', + 'showHints': 1}], + + # MPIIO, showHints w/hintsFileName + [{'debug': 'MPIIO showHints w/hintsFileName', + 'api': 'MPIIO', + 'hintsFileName': '/g/g0/loewe/IOR/test/hintsFile', + 'showHints': 1}], + + # MPIIO, setTimeStampSignature + [{'debug': 'MPIIO setTimeStampSignature', + 'api': 'MPIIO', + 'setTimeStampSignature': 123}], + + # MPIIO, setTimeStampSignature random + [{'debug': 'MPIIO setTimeStampSignature random', + 'api': 'MPIIO', + 'randomOffset': 1, + 'checkRead': 0, + 'setTimeStampSignature': 123}], + + # + # pattern dependent tests + # + + # MPIIO, independent + [{'debug': 'MPIIO independent', + 'api': 'MPIIO', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent', + 'api': 'MPIIO', + 'collective': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent', + 'api': 'MPIIO', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent', + 'api': 'MPIIO', + 'collective': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent numTasks', + 'api': 'MPIIO', + 'numTasks': 2, + 'collective': 0, + 'segmentCount': 3}], + + # MPIIO, independent random + [{'debug': 'MPIIO independent random', + 'api': 'MPIIO', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent random', + 'api': 'MPIIO', + 'collective': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent random', + 'api': 'MPIIO', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent random', + 'api': 'MPIIO', + 'collective': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent numTasks random', + 'api': 'MPIIO', + 'numTasks': 2, + 'collective': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + # MPIIO, collective + [{'debug': 'MPIIO collective', + 'api': 'MPIIO', + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective', + 'api': 'MPIIO', + 'collective': 1, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective', + 'api': 'MPIIO', + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective', + 'api': 'MPIIO', + 'collective': 1, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective numTasks', + 'api': 'MPIIO', + 'numTasks': 2, + 'collective': 1, + 'segmentCount': 3}], + + # MPIIO, independent, useFileView + [{'debug': 'MPIIO independent useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent useFileView numTasks', + 'api': 'MPIIO', + 'useFileView': 1, + 'numTasks': 2, + 'collective': 0, + 'segmentCount': 3}], + + # MPIIO, collective, useFileView + [{'debug': 'MPIIO collective useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 1, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective useFileView', + 'api': 'MPIIO', + 'useFileView': 1, + 'collective': 1, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective useFileView numTasks', + 'api': 'MPIIO', + 'useFileView': 1, + 'numTasks': 2, + 'collective': 1, + 'segmentCount': 3}], + + # MPIIO, independent, filePerProc + [{'debug': 'MPIIO independent filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent filePerProc numTasks', + 'api': 'MPIIO', + 'filePerProc': 1, + 'numTasks': 2, + 'collective': 0, + 'segmentCount': 3}], + + # MPIIO, independent, filePerProc random + [{'debug': 'MPIIO independent filePerProc random', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent filePerProc random', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent filePerProc random', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent filePerProc random', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent filePerProc numTasks random', + 'api': 'MPIIO', + 'filePerProc': 1, + 'numTasks': 2, + 'collective': 0, + 'randomOffset': 1, + 'checkRead': 0, + 'segmentCount': 3}], + + # MPIIO, collective, filePerProc + [{'debug': 'MPIIO collective filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 1, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective filePerProc', + 'api': 'MPIIO', + 'filePerProc': 1, + 'collective': 1, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective filePerProc numTasks', + 'api': 'MPIIO', + 'filePerProc': 1, + 'numTasks': 2, + 'collective': 1, + 'segmentCount': 3}], + + # MPIIO, independent, filePerProc, useFileView + [{'debug': 'MPIIO independent filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 0, + 'segmentCount': 1}], + + [{'debug': 'MPIIO independent filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 0, + 'segmentCount': 3}], + + [{'debug': 'MPIIO independent filePerProc useFileView numTasks', + 'api': 'MPIIO', + 'filePerProc': 1, + 'numTasks': 2, + 'useFileView': 1, + 'collective': 0, + 'segmentCount': 3}], + + # MPIIO, collective, filePerProc, useFileView + [{'debug': 'MPIIO collective filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 1, + 'segmentCount': 1}], + + [{'debug': 'MPIIO collective filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective filePerProc useFileView', + 'api': 'MPIIO', + 'filePerProc': 1, + 'useFileView': 1, + 'collective': 1, + 'segmentCount': 3}], + + [{'debug': 'MPIIO collective filePerProc useFileView numTasks', + 'api': 'MPIIO', + 'filePerProc': 1, + 'numTasks': 2, + 'useFileView': 1, + 'collective': 1, + 'segmentCount': 3}] + ] + + HDF5_TESTS = [ + # + # pattern independent tests + # + + # HDF5, repetitions + [{'debug': 'HDF5 repetitions', + 'api': 'HDF5', + 'repetitions': 1}], + [{'debug': 'HDF5 repetitions', + 'api': 'HDF5', + 'repetitions': 3}], + + # HDF5, multiFile + [{'debug': 'HDF5 multiFile', + 'api': 'HDF5', + 'repetitions': 3, + 'multiFile': 1}], + + # HDF5, useExistingTestFile [Note: this must follow HDF5 test] + [{'debug': 'HDF5 useExistingTestFile', + 'api': 'HDF5', + 'useExistingTestFile': 1}], + + # HDF5, remove file + [{'debug': 'HDF5 remove file', + 'api': 'HDF5', + 'keepFile': 0}], + + # HDF5, remove file with error + [{'debug': 'HDF5 remove file with error', + 'api': 'HDF5', + 'keepFileWithError': 0}], + + # HDF5, deadline for stonewalling + [{'debug': 'HDF5 deadlineForStonewalling', + 'api': 'HDF5', + 'testFile': test.DefaultTest()['testFile'] + '.stonewall', + 'blockSize': GIBIBYTE/4, + 'readFile': 0, + 'checkWrite': 0, + 'checkRead': 0, + 'deadlineForStonewalling':1}], + + # HDF5, max time duration + [{'debug': 'HDF5 maxTimeDuration', + 'api': 'HDF5', + 'maxTimeDuration':1}], + + # HDF5, quitOnError + [{'debug': 'HDF5 quitOnError', + 'api': 'HDF5', + 'quitOnError': 1}], + + # HDF5, multiple file names, ssf + [{'debug': 'HDF5 multiple file names ssf', + 'api': 'HDF5', + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # HDF5, multiple file names, fpp + [{'debug': 'HDF5 multiple file names fpp', + 'api': 'HDF5', + 'filePerProc': 1, + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # HDF5, corruptFile + [{'debug': 'HDF5 corruptFile', + 'api': 'HDF5', + 'testFile': test.DefaultTest()['testFile'], + 'filePerProc': 0, + 'corruptFile': 1}], + + # HDF5, corruptFile + [{'debug': 'HDF5 corruptFile filePerProc', + 'api': 'HDF5', + 'filePerProc': 1, + 'corruptFile': 1}], + + # HDF5, setTimeStampSignature + [{'debug': 'HDF5 setTimeStampSignature', + 'api': 'HDF5', + 'setTimeStampSignature': 123, + 'filePerProc': 0, + 'corruptFile': 0}], + + # HDF5, setAlignment + [{'debug': 'HDF5 setAlignment', + 'api': 'HDF5', + 'setAlignment': '4m'}], + + # HDF5, showHints + [{'debug': 'HDF5 showHints', + 'api': 'HDF5', + 'showHints': 0}], # WEL: omit this test until + # showHints works + + # HDF5, showHints w/hintsFileName + [{'debug': 'HDF5 showHints w/hintsFileName', + 'api': 'HDF5', + 'hintsFileName': '/g/g0/loewe/IOR/test/hintsFile', + 'showHints': 0}], # WEL: omit this test until + # showHints works + + # HDF5, noFill + [{'debug': 'HDF5 noFill', + 'api': 'HDF5', + 'noFill': 0}], # WEL: omit this test until + # noFill is standard + + # + # pattern dependent tests + # + + # HDF5, independent + [{'debug': 'HDF5 independent', + 'api': 'HDF5', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'HDF5 independent', + 'api': 'HDF5', + 'collective': 0, + 'segmentCount': 1}], + + [{'debug': 'HDF5 independent', + 'api': 'HDF5', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'HDF5 independent', + 'api': 'HDF5', + 'collective': 0, + 'segmentCount': 3}], + + [{'debug': 'HDF5 independent numTasks', + 'api': 'HDF5', + 'numTasks': 2, + 'collective': 0, + 'segmentCount': 3}], + + # HDF5, collective + [{'debug': 'HDF5 collective', + 'api': 'HDF5', + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'HDF5 collective', + 'api': 'HDF5', + 'collective': 1, + 'segmentCount': 1}], + + [{'debug': 'HDF5 collective', + 'api': 'HDF5', + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'HDF5 collective', + 'api': 'HDF5', + 'collective': 1, + 'segmentCount': 3}], + + [{'debug': 'HDF5 collective numTasks', + 'api': 'HDF5', + 'numTasks': 2, + 'collective': 1, + 'segmentCount': 3}] + ] + + NCMPI_TESTS = [ + # + # pattern independent tests + # + + # NCMPI, repetitions + [{'debug': 'NCMPI repetitions', + 'api': 'NCMPI', + 'repetitions': 1}], + [{'debug': 'NCMPI repetitions', + 'api': 'NCMPI', + 'repetitions': 3}], + + # NCMPI, multiFile + [{'debug': 'NCMPI multiFile', + 'api': 'NCMPI', + 'repetitions': 3, + 'multiFile': 1}], + + # NCMPI, deadline for stonewalling + [{'debug': 'NCMPI deadlineForStonewalling', + 'api': 'NCMPI', + 'testFile': test.DefaultTest()['testFile'] + '.stonewall', + 'blockSize': GIBIBYTE/4, + 'readFile': 0, + 'checkWrite': 0, + 'checkRead': 0, + 'deadlineForStonewalling':1}], + + # NCMPI, max time duration + [{'debug': 'NCMPI maxTimeDuration', + 'api': 'NCMPI', + 'maxTimeDuration':1}], + + # NCMPI, remove file + [{'debug': 'NCMPI remove file', + 'api': 'NCMPI', + 'keepFile': 0}], + + # NCMPI, remove file with error + [{'debug': 'NCMPI remove file with error', + 'api': 'NCMPI', + 'keepFileWithError': 0}], + + # NCMPI, quitOnError + [{'debug': 'NCMPI quitOnError', + 'api': 'NCMPI', + 'quitOnError': 1}], + + # NCMPI, multiple file names, ssf + [{'debug': 'NCMPI multiple file names ssf', + 'api': 'NCMPI', + 'testFile': testDir + '/f1@' + testDir + '/f2'}], + + # NCMPI, corruptFile + [{'debug': 'NCMPI corruptFile', + 'api': 'NCMPI', + 'testFile': test.DefaultTest()['testFile'], + 'corruptFile': 1}], + + # NCMPI, setTimeStampSignature + [{'debug': 'NCMPI setTimeStampSignature', + 'api': 'NCMPI', + 'setTimeStampSignature': 123, + 'corruptFile': 0}], + + # NCMPI, useExistingTestFile [Note: this must follow NCMPI test] + [{'debug': 'NCMPI useExistingTestFile', + 'api': 'NCMPI', + 'useExistingTestFile': 1}], + + # + # pattern dependent tests + # + + # NCMPI, independent + [{'debug': 'NCMPI independent', + 'api': 'NCMPI', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'NCMPI independent', + 'api': 'NCMPI', + 'collective': 0, + 'segmentCount': 1}], + + [{'debug': 'NCMPI independent', + 'api': 'NCMPI', + 'collective': 0, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'NCMPI independent', + 'api': 'NCMPI', + 'collective': 0, + 'segmentCount': 3}], + + [{'debug': 'NCMPI independent numTasks', + 'api': 'NCMPI', + 'numTasks': 2, + 'collective': 0, + 'segmentCount': 3}], + + # NCMPI, collective + [{'debug': 'NCMPI collective', + 'api': 'NCMPI', + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 1}], + + [{'debug': 'NCMPI collective', + 'api': 'NCMPI', + 'collective': 1, + 'segmentCount': 1}], + + [{'debug': 'NCMPI collective', + 'api': 'NCMPI', + 'collective': 1, + 'blockSize': IOR_SIZE_T, + 'transferSize': IOR_SIZE_T, + 'segmentCount': 3}], + + [{'debug': 'NCMPI collective', + 'api': 'NCMPI', + 'collective': 1, + 'segmentCount': 3}], + + [{'debug': 'NCMPI collective numTasks', + 'api': 'NCMPI', + 'numTasks': 2, + 'collective': 1, + 'segmentCount': 3}] + ] + + PassTests = [] + if OS == "AIX": + PassTests = PassTests + POSIX_TESTS + PassTests = PassTests + MPIIO_TESTS + PassTests = PassTests + HDF5_TESTS + PassTests = PassTests + NCMPI_TESTS + elif OS == "Linux": + PassTests = PassTests + POSIX_TESTS + PassTests = PassTests + MPIIO_TESTS + #PassTests = PassTests + HDF5_TESTS + #PassTests = PassTests + NCMPI_TESTS + else: + PassTests = [ + [{'debug': 'failure to determine OS'}] + ] + + FailTests = [ + [{'debug': 'no tests should fail'}] + ] + +################################################################################ +################################################################################ +# # +# E N D O F T E S T S # +# # +################################################################################ +################################################################################ + # WEL debugging: if 0 == 0: PassTests = [ [{'debug': 'debug test'}] ] + + if expectation == PASS: + if testNumber == RETURN_TOTAL_TESTS: + return len(PassTests) + else: + return PassTests[testNumber] + else: # expectation == FAIL + if testNumber == RETURN_TOTAL_TESTS: + return len(FailTests) + else: + return FailTests[testNumber] + + + ################### + # run test script # + ################### + def RunScript(self, nodes, procs): + if OS == "AIX": + command = "poe " + executable + " -f " + scriptFile + \ + " -nodes " + str(nodes) + " -procs " + str(procs) + \ + " -rmpool systest -labelio no -retry wait" + elif OS == "Linux": + command = "srun -N " + str(procs) + " -n " + str(procs) + \ + " -ppdebug " + executable + " -f " + scriptFile + else: + command = "unable to run " + executable + " -f " + scriptFile + if debug == TRUE: + Flush2File(command) + else: + childIn, childOut = os.popen4(command) + childIn.close() + while 1: + line = childOut.readline() + if line == '': break + Flush2File(line[:-1]) + childOut.close() + return + + +########################## +# create subsets of list # +########################## +def ListSubsets(tests, size): + listOfSubsets = [] + start = end = 0 + totalTestsSize = len(tests) + for i in range(0, (totalTestsSize / size) + 1): + if end >= totalTestsSize: + break + end = end + size + listOfSubsets.append(tests[start:end]) + start = end + return listOfSubsets + + +################# +# flush to file # +################# +def Flush2File(string): + resultsFile.write(string + '\n') + resultsFile.flush() + + +################################## +# replace blanks with underscore # +################################## +def UnderScore(string): + uString = string + for i in range(0, len(uString)): + if uString[i] == ' ': + uString = uString[:i] + '_' + uString[i+1:] + return(uString) + + +############################# +# grep for keywords in file # +############################# +def grepForKeywords(keywords, resultsFileName): + # create pattern for grep + pattern = "\"" + for i in range(len(keywords)): + pattern = pattern + keywords[i] + if i < len(keywords)-1: + pattern = pattern + '|' + pattern = pattern + "\"" + + # grep for pattern in file + resultsFileNameTmp = resultsFileName + ".tmp" + cmd = "grep -i -E " + pattern + " " + resultsFileName \ + + " >> " + resultsFileNameTmp + " 2>&1" + os.system(cmd) + cmd = "cat " + resultsFileNameTmp + " >> " + resultsFileName + os.system(cmd) + cmd = "rm -f " + resultsFileNameTmp + os.system(cmd) + + +################################################################################ +# main # +################################################################################ +resultsFileName = "./test-results.txt-" + \ + os.popen("date +%m.%d.%y").read()[:-1] +resultsFile = open(resultsFileName, "w") +OS = os.popen("uname -s").read()[:-1] +test = Test() +testNumber = 0 + +#environment variables +nodes = 1 +proccnt = [1, 3] + +Flush2File("TESTING IOR C CODE") + +# loop through different processors counts +for proc in proccnt: + + # first run all expected-PASS test, then the FAILs + for testType in (PASS, FAIL): + + # test type info + if (testType == PASS): + Flush2File("\n*** STARTING EXPECTED P A S S TESTS (PROC=" \ + + str(proc) + ") ***") + else: + Flush2File("\n*** STARTING EXPECTED F A I L TESTS (PROC=" \ + + str(proc) + ") ***") + + # loop through all tests for test type + totalTests = range(test.Tests(testType, RETURN_TOTAL_TESTS)) + firstTest = TRUE + for testSubset in ListSubsets(totalTests, TEST_SUBSET_SIZE): + for i in testSubset: + if (firstTest == TRUE): + Flush2File("\n\n*** Setting up tests ***") + firstTest = FALSE + if (i % 10 == 0 and i != 0): + Flush2File("finished " + str(i) + " tests") + sys.stdout.flush() + # unless an expected fail test, only open a single script + # create script file name + if (testType == PASS): + scriptFile = scriptFileBase + '.' + str(proc) + '.PASS' + else: + scriptFile = scriptFileBase + '.' + str(proc) + '.FAIL' + + scriptFile = scriptFile + '-TESTS_' + str(testSubset[0:1][0]) \ + + '-' + str(testSubset[len(testSubset)-1:][0]) + if ((i % TEST_SUBSET_SIZE == 0) or (testType == FAIL)): + os.system("rm -f " + scriptFile) + script = open(scriptFile, "a") + script.write("IOR START" + "\n") + + # start with a default test, then modify + testValues = test.DefaultTest() + + # loop through all changes to the default script + for j in test.Tests(testType, i)[TEST_SETTINGS].keys(): + testValues[j] = test.Tests(testType, i)[TEST_SETTINGS][j] + + testNumber = testNumber + 1 + testValues['debug'] = UnderScore("Test No. " + \ + str(testNumber) + ": " + \ + testValues['debug']) + # write test information to script file + for entry in testValues.keys(): + if (str(testValues[entry]) != ''): + script.write("\t" + entry + "=" + + str(testValues[entry]) + "\n") + script.write("RUN" + "\n") + + # unless an expected fail test, only close a single script + if ((i == testSubset[len(testSubset)-1:][0]) \ + or (testType == FAIL)): + # create tail, close file + script.write("IOR STOP" + "\n") + script.close() + if (testType == FAIL): + Flush2File("finished 1 test") + else: + Flush2File("finished %d test%s" % ((i + 1), "s"[i==1:])) + firstTest = TRUE + + # display test info for failing test (note that the + # test fails before a description is displayed) + if testType == FAIL: + Flush2File("\n\t================================\n\n") + Flush2File("*** DEBUG MODE ***") + Flush2File("*** " + str(testValues['debug']) + \ + " ***") + Flush2File("") + + # run + os.system ("rm -rf " + testDir) + os.system("mkdir " + testDir) + test.RunScript(nodes, proc) + os.system ("rm -rf " + testDir) + if 0 == 0: os.system("rm -f " + scriptFile) # run scripts + +Flush2File("\nFINISHED TESTING IOR C CODE") +Flush2File("\nRESULTS:") +resultsFile.close() +grepForKeywords(["warn", "fail", "error", "Test_No"], resultsFileName) diff --git a/microbenchmarks/ior/testing/hintsFile b/microbenchmarks/ior/testing/hintsFile new file mode 100644 index 00000000..6931afb6 --- /dev/null +++ b/microbenchmarks/ior/testing/hintsFile @@ -0,0 +1,2 @@ +IOR_HINT__MPI__unrecognizedHint=true +IOR_HINT__MPI__IBM_largeblock_io=true