* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-22 18:15 Andrea Arteaga
2011-08-22 18:21 ` [gentoo-commits] proj/auto-numerical-bench:0.1 " Andrea Arteaga
0 siblings, 1 reply; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-22 18:15 UTC (permalink / raw
To: gentoo-commits
commit: c064d327bf11f84441ab0f65d07b735124a3e5b2
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug 22 18:14:41 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug 22 18:14:41 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=c064d327
Added COPYING.
---
COPYING | 340 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 340 insertions(+), 0 deletions(-)
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..486449c
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ 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 works. But when you
+distribute the same sections 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 of 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 of 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 or 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 will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of 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
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:0.1 commit in: /
2011-08-22 18:15 [gentoo-commits] proj/auto-numerical-bench:master commit in: / Andrea Arteaga
@ 2011-08-22 18:21 ` Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-22 18:21 UTC (permalink / raw
To: gentoo-commits
commit: c064d327bf11f84441ab0f65d07b735124a3e5b2
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug 22 18:14:41 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug 22 18:14:41 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=c064d327
Added COPYING.
---
COPYING | 340 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 340 insertions(+), 0 deletions(-)
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..486449c
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ 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 works. But when you
+distribute the same sections 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 of 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 of 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 or 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 will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of 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
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ 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 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, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2012-09-02 11:41 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2012-09-02 11:41 UTC (permalink / raw
To: gentoo-commits
commit: e520e72d3dfdf950f9bbd5f192f38dd2170ff3de
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sun Sep 2 11:41:44 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sun Sep 2 11:41:44 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=e520e72d
Merge branch 'master' of ssh://git.overlays.gentoo.org/proj/auto-numerical-bench
samples/blastests.xml | 82 +++++++++++++++++++----------------
samples/cblastests.xml | 103 +++++++++++++++++--------------------------
samples/fftwtests.xml | 69 ++++++++++++++++-------------
samples/lapacketests.xml | 45 +++++++++++---------
samples/lapacktests.xml | 5 +-
samples/openblas.xml | 34 +++++++-------
samples/scalapacktests.xml | 39 +++++++++++------
7 files changed, 192 insertions(+), 185 deletions(-)
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2012-08-11 18:00 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2012-08-11 18:00 UTC (permalink / raw
To: gentoo-commits
commit: 6041f0367d053ef780824e61368d032ba2ef2dd4
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sat Aug 11 20:01:21 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sat Aug 11 20:01:21 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=6041f036
Merge branch 'master' of ssh://git.overlays.gentoo.org/proj/auto-numerical-bench
Conflicts:
samples/lapacktests.xml
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2012-08-04 1:11 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2012-08-04 1:11 UTC (permalink / raw
To: gentoo-commits
commit: de2a152abb7cdc6b4e519d702c36dd9d34f1e66f
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sat Aug 4 01:05:35 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sat Aug 4 01:05:35 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=de2a152a
Merge branch 'btloutput'
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2012-04-09 22:58 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2012-04-09 22:58 UTC (permalink / raw
To: gentoo-commits
commit: dc982ab1bbeb7053f865af8ef5f2af929b94a959
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Apr 9 22:56:01 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Apr 9 22:56:01 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=dc982ab1
Updated setup.py.
---
setup.py | 23 +++++++++++++++++++----
1 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/setup.py b/setup.py
index d850b17..4f366cf 100644
--- a/setup.py
+++ b/setup.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
#=====================================================
-# Copyright (C) 2011 Andrea Arteaga <andyspiros@gmail.com>
+# Copyright (C) 2011-2012 Andrea Arteaga <andyspiros@gmail.com>
#=====================================================
#
# This program is free software; you can redistribute it and/or
@@ -18,13 +18,28 @@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
+import os
from distutils.core import setup
+def recursiveGetPackage(pkg, directory):
+ pkg += os.path.basename(directory)
+ dirs = [os.path.join(directory, i) for i in os.listdir(directory)]
+ dirs = [i for i in dirs if os.path.isdir(i)]
+ res = [pkg]
+ for i in dirs:
+ res += recursiveGetPackage(pkg+'.', i)
+ return res
+
+setupdir = os.path.dirname(os.path.abspath(__file__))
+numdir = os.path.join(setupdir, 'numbench')
+
+
setup(name='Numbench',
version='1.0',
description='Numerical benchmarks for Gentoo',
author='Andrea Arteaga',
author_email='andyspiros@gmail.com',
- url='http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git',
- packages=['numbench'],
- )
\ No newline at end of file
+ url='http://soc.dev.gentoo.org/~spiros',
+ packages=recursiveGetPackage('', numdir),
+ )
+
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2012-03-05 15:48 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2012-03-05 15:48 UTC (permalink / raw
To: gentoo-commits
commit: e9e071f6f4e35f8184cee5daae7466f1d62ce349
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Mar 5 15:46:27 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Mar 5 15:46:27 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=e9e071f6
Merge remote branch 'origin/master'
numbench/benchconfig.py | 2 +-
numbench/modules/blas.py | 4 +-
numbench/modules/cblas.py | 4 +-
numbench/modules/fftw.py | 70 +++++++++++++++++++++++++++++++
numbench/modules/internal/btlBase.py | 12 +++---
numbench/modules/internal/lapackBase.py | 4 +-
numbench/modules/lapack.py | 4 +-
numbench/utils/portageutils.py | 2 +-
samples/fftwtests.xml | 31 ++++++++++++++
9 files changed, 117 insertions(+), 16 deletions(-)
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2012-02-28 19:20 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2012-02-28 19:20 UTC (permalink / raw
To: gentoo-commits
commit: e45796c5cf1111c0011046e0abaa5894cedda1af
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Tue Feb 28 19:19:22 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Tue Feb 28 19:19:22 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=e45796c5
Merge branch 'master' of git://git.overlays.gentoo.org/proj/auto-numerical-bench
cblastests.in | 12 --
fftwtests.in | 5 -
lapacktests.in | 9 --
numbench/basemodule.py | 287 -------------------------------------------
numbench/benchchilds.py | 30 -----
numbench/blas.py | 23 ----
numbench/blas_accuracy.py | 164 ------------------------
numbench/blasbase.py | 82 ------------
numbench/btlbase.py | 194 -----------------------------
numbench/cblas.py | 23 ----
numbench/fftw.py | 86 -------------
numbench/lapack.py | 70 -----------
numbench/lapack_accuracy.py | 169 -------------------------
numbench/metis.py | 184 ---------------------------
numbench/scalapack.py | 88 -------------
15 files changed, 0 insertions(+), 1426 deletions(-)
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2012-02-24 17:22 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2012-02-24 17:22 UTC (permalink / raw
To: gentoo-commits
commit: 07410451faf82fbb764d8889436919f99c03fa64
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Fri Feb 24 18:20:53 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Fri Feb 24 18:20:53 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=07410451
Merge remote branch 'origin/master' into HEAD
Conflicts:
numbench/report.py
blastests.xml | 48 ++++++++++++++++++++++++++++--------------------
numbench/htmlreport.py | 9 ++++++---
numbench/main.py | 3 +++
numbench/report.py | 2 +-
numbench/utils/btl.py | 2 +-
5 files changed, 39 insertions(+), 25 deletions(-)
diff --cc blastests.xml
index d01615b,c8f4379..b1cc327
--- a/blastests.xml
+++ b/blastests.xml
@@@ -7,9 -5,7 +7,8 @@@
<var name="FFLAGS">-O3</var>
</emergeenv>
</test>
+-->
- <!--
<test id="atlas">
<pkg>sci-libs/atlas-3.9.67</pkg>
<emergeenv>
diff --cc numbench/report.py
index 75be5c4,e3b4f73..2d8d384
--- a/numbench/report.py
+++ b/numbench/report.py
@@@ -16,8 -16,8 +16,8 @@@
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
from os.path import join as pjoin, basename
-from shutil import copy as fcopy, copytree
-import numpy as np
+import sys, numpy as np
- from shutil import rmtree
++from shutil import copy as fcopy, copytree, rmtree
import benchconfig as cfg
import benchutils as bu
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-16 23:38 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-16 23:38 UTC (permalink / raw
To: gentoo-commits
commit: ec981d6b55043f28b655ceade6eec2067aea7c51
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Tue Aug 16 23:38:34 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Tue Aug 16 23:38:34 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=ec981d6b
Added "executable".
---
exec.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/exec.py b/exec.py
new file mode 100644
index 0000000..cb4d1eb
--- /dev/null
+++ b/exec.py
@@ -0,0 +1,2 @@
+#!/usr/bin/python2
+import numbench.main
\ No newline at end of file
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-15 21:57 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-15 21:57 UTC (permalink / raw
To: gentoo-commits
commit: aa13341c53fb1fb13dda9bcabaa8e78f23c57a65
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug 15 21:57:04 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug 15 21:57:04 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=aa13341c
Added instructions and more samples.
---
basemodule.py | 4 +++
benchprint.py | 2 +-
fftw.py | 4 +++
main.py | 60 ++++++++++++++++++++++++++++++-----------------------
metis.py | 3 ++
metistests.in | 2 +
scalapacktests.in | 2 +
7 files changed, 50 insertions(+), 27 deletions(-)
diff --git a/basemodule.py b/basemodule.py
index 6185774..7eda37f 100644
--- a/basemodule.py
+++ b/basemodule.py
@@ -69,6 +69,10 @@ class BaseModule:
return []
else:
return [i.split()[0] for i in output.split('\n')]
+
+ # Alternatives-2 version
+ def instructionsFor(self, impl):
+ Print("# eselect " + self.libname + " set " + impl)
def getTest(self, root, impl, testdir, logdir):
TestClass = self._testClass()
diff --git a/benchprint.py b/benchprint.py
index b37acbc..0836bbe 100644
--- a/benchprint.py
+++ b/benchprint.py
@@ -14,7 +14,7 @@ if needsinitialization:
self._maxlevel = maxlevel
self._logfile = logfile
- def __call__(self, arg):
+ def __call__(self, arg='\n'):
if self._level > self._maxlevel:
return
diff --git a/fftw.py b/fftw.py
index dd2b6e8..1d97c02 100644
--- a/fftw.py
+++ b/fftw.py
@@ -32,6 +32,10 @@ class Module(btlbase.BTLBase):
@staticmethod
def get_impls(root):
return ['fftw', 'fftw_threads']
+
+ def instructionsFor(self, impl):
+ Print("Use command 'pkg-config --cflags --libs " + impl + \
+ "' when compiling")
@staticmethod
def _testClass():
diff --git a/main.py b/main.py
index 4be9802..539e4ff 100755
--- a/main.py
+++ b/main.py
@@ -114,15 +114,11 @@ def tests_from_input(input):
else:
e_0, e_1 = var.split('=', 1)
env[e_0] = e_1
- avail = available_packages(spl[1])
- if len(avail) > 1:
- for n,p in enumerate(avail):
- tests[spl[0]+"_%02i"%n] = {'package':p , 'env':env, \
- 'skip':skip, 'changes':change, 'descr':descr}
- elif len(avail) == 1:
- tests[spl[0]] = {'package':avail[0] , 'env':env, 'skip':skip, \
+ try:
+ avail = available_packages(spl[1])[-1]
+ tests[spl[0]] = {'package':avail , 'env':env, 'skip':skip, \
'changes':change, 'descr':descr}
- else:
+ except:
sys.stderr.write('Error: package ' + spl[1] + ' not found\n')
return tests
@@ -237,8 +233,11 @@ for tn,(name,test) in enumerate(cfg.tests.items(),1):
Print.down()
package = normalize_cpv(test['package'])
archive = pjoin(pkgdir, package+".tbz2")
+ test['pkgdir'] = pkgdir
+ test['archive'] = archive
if os.path.exists(archive):
Print("Package already emerged - skipping")
+ test['emergesuccess'] = True
else:
try:
# Emerge dependencies
@@ -256,26 +255,10 @@ for tn,(name,test) in enumerate(cfg.tests.items(),1):
test['package'], env=test['env'], root=root, pkgdir=pkgdir, \
logfile=logfile
)
-# archives.append(archive)
-
- # Unpack the archive onto the given root directory
-# Print("Unpacking packages")
-# logfile = pjoin(tlogdir, 'tar.log')
-# Print("(Run 'tail -f " + logfile + "' on another terminal" \
-# + " to see the progress)")
-# logfile = file(logfile, 'w')
-# tarcmds = [['tar', 'xvjf', a, '-C', root] for a in archives]
-# os.path.exists(root) or os.makedirs(root)
-# tarcmd = ['tar', 'xjf', archive, '-C', root]
-# for c in tarcmds:
-# logfile.write(' '.join(c) + '\n' + 80*'-' + '\n')
-# tarp = sp.Popen(c, stdout=sp.PIPE, stderr=sp.STDOUT)
-# logfile.write(tarp.communicate()[0])
-# logfile.write('\n\n' + 80*'#' + '\n\n')
-# if tarp.returncode != 0:
-# raise InstallException(tarcmd, logfile.name)
+ test['emergesuccess'] = True
except InstallException as e:
+ test['emergesuccess'] = False
Print("Package %s failed to emerge" % package)
Print("Error log: " + e.logfile)
Print.up()
@@ -319,3 +302,28 @@ for (name,test) in cfg.tests.items():
results[(name, impl)] = test['results'][impl]
mod.save_results(results)
+
+
+Print._level = 0
+Print()
+# Print instructions
+for name,test in cfg.tests.items():
+ if not test['emergesuccess']:
+ continue
+ printstr = "Instructions for " + name + ":"
+ Print(printstr)
+ Print(len(printstr)*'-')
+ Print.down()
+ Print("# PKGDIR=" + test['pkgdir'] + " emerge -K '=" + \
+ normalize_cpv(test['package']) + "'")
+ try:
+ for impl in test['implementations']:
+ Print("Implementation " + impl + ":")
+ Print.down()
+ mod.instructionsFor(impl)
+ Print.up()
+ except:
+ pass
+
+ Print.up()
+ Print()
diff --git a/metis.py b/metis.py
index c65d8a8..f3ad768 100644
--- a/metis.py
+++ b/metis.py
@@ -40,6 +40,9 @@ class Module(basemodule.BaseModule):
@staticmethod
def get_impls(*args, **kwargs):
return ('metis',)
+
+ def instructionsFor(self, impl):
+ Print("Nothing to do")
def save_results(self, results):
basemodule.BaseModule.save_results(self, results, 'loglog', 'Seconds')
diff --git a/metistests.in b/metistests.in
new file mode 100644
index 0000000..76de6bb
--- /dev/null
+++ b/metistests.in
@@ -0,0 +1,2 @@
+metis sci-libs/metis-4.0.1-r1 CFLAGS="-march=native"
+metis-O3 sci-libs/metis-4.0.1-r1 CFLAGS="-march=native -O3"
\ No newline at end of file
diff --git a/scalapacktests.in b/scalapacktests.in
new file mode 100644
index 0000000..e32c0fb
--- /dev/null
+++ b/scalapacktests.in
@@ -0,0 +1,2 @@
+reference sci-libs/scalapack-1.8.0 FFLAGS="-march=native"
+reference-O3 sci-libs/scalapack-1.8.0 FFLAGS="-march=native -O3"
\ No newline at end of file
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-14 12:59 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-14 12:59 UTC (permalink / raw
To: gentoo-commits
commit: e0b87487e792a28e25add7aaa04e797764d8303f
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sun Aug 14 12:59:10 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sun Aug 14 12:59:10 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=e0b87487
Solved bug in benchprint
---
benchprint.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/benchprint.py b/benchprint.py
index 8c394e2..b37acbc 100644
--- a/benchprint.py
+++ b/benchprint.py
@@ -20,7 +20,7 @@ if needsinitialization:
if self._level <= 0:
print str(arg)
- bu.mkdir(dirname(logfile))
+ bu.mkdir(dirname(self._logfile))
logfile = file(self._logfile, 'a')
print >> logfile, str(arg)
logfile.close()
@@ -28,7 +28,7 @@ if needsinitialization:
printstr = (self._level-1)*" " + "-- " + str(arg)
if self._level <= self._maxlevel-1:
- bu.mkdir(dirname(logfile))
+ bu.mkdir(dirname(self._logfile))
logfile = file(self._logfile, 'a')
print >> logfile, printstr
logfile.close()
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-14 12:35 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-14 12:35 UTC (permalink / raw
To: gentoo-commits
commit: 1bd7537c4e72fc15f126cb35d3a84e4a87e6ad52
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sun Aug 14 11:15:00 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sun Aug 14 11:15:00 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=1bd7537c
Merge remote branch 'origin/master'
basemodule.py | 13 +++++
benchconfig.py | 4 --
benchprint.py | 15 ++++--
blasbase.py | 17 +++++--
btlbase.py | 11 ++++
lapack.py | 9 ++-
main.py | 147 ++++++++++++++++++++++++++++++++++++++++++++++----------
7 files changed, 172 insertions(+), 44 deletions(-)
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-12 22:56 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-12 22:56 UTC (permalink / raw
To: gentoo-commits
commit: a0bba3e031348a0d5274708b4c6e401e9ae68ed0
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Fri Aug 12 22:55:56 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Fri Aug 12 22:55:56 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=a0bba3e0
Some help added.
---
basemodule.py | 13 +++++
benchconfig.py | 4 --
benchprint.py | 15 ++++--
blasbase.py | 17 +++++--
btlbase.py | 11 ++++
lapack.py | 9 ++-
main.py | 147 ++++++++++++++++++++++++++++++++++++++++++++++----------
7 files changed, 172 insertions(+), 44 deletions(-)
diff --git a/basemodule.py b/basemodule.py
index b55adfc..6185774 100644
--- a/basemodule.py
+++ b/basemodule.py
@@ -45,6 +45,19 @@ class BaseModule:
passargs += [i]
self._parse_args(passargs)
+
+ @classmethod
+ def printHelp(cls):
+ print "Usage: numbench " + cfg.modulename + " [options] [tests]"
+ print
+ print "Generic options:"
+ print " -s -summary"
+ print " Generate a summary image that contains all tests results"
+ print " and show it on the HTML report page."
+ print
+ print " -S -summary-only"
+ print " Only generate the summary image and skip all other plots."
+ print
# Alternatives-2 version
def get_impls(self, root):
diff --git a/benchconfig.py b/benchconfig.py
index f707959..6769e8d 100644
--- a/benchconfig.py
+++ b/benchconfig.py
@@ -43,10 +43,6 @@ if needsinitialization:
logdirb = pjoin(os.environ['HOME'], ".benchmarks/log",
modname + "_" + time.strftime('%Y-%m-%d'))
- bu.mkdir(testsdir)
- bu.mkdir(rootsdir)
- bu.mkdir(pkgsdir)
-
# Report directory
reportdirb += modname + "_" + time.strftime('%Y-%m-%d')
if os.path.exists(reportdirb):
diff --git a/benchprint.py b/benchprint.py
index e4b7e41..8c394e2 100644
--- a/benchprint.py
+++ b/benchprint.py
@@ -12,8 +12,7 @@ if needsinitialization:
def __init__(self, logfile, maxlevel=10):
self._level = 0
self._maxlevel = maxlevel
- bu.mkdir(dirname(logfile))
- self._logfile = file(logfile, 'w')
+ self._logfile = logfile
def __call__(self, arg):
if self._level > self._maxlevel:
@@ -21,14 +20,18 @@ if needsinitialization:
if self._level <= 0:
print str(arg)
- print >> self._logfile, str(arg)
- self._logfile.flush()
+ bu.mkdir(dirname(logfile))
+ logfile = file(self._logfile, 'a')
+ print >> logfile, str(arg)
+ logfile.close()
return
printstr = (self._level-1)*" " + "-- " + str(arg)
if self._level <= self._maxlevel-1:
- print >> self._logfile, printstr
- self._logfile.flush()
+ bu.mkdir(dirname(logfile))
+ logfile = file(self._logfile, 'a')
+ print >> logfile, printstr
+ logfile.close()
print printstr
def up(self, n=1):
diff --git a/blasbase.py b/blasbase.py
index b5d899c..2f2b84e 100644
--- a/blasbase.py
+++ b/blasbase.py
@@ -3,13 +3,20 @@ import subprocess as sp
import shlex
from os.path import join as pjoin
+avail1 = ['axpy', 'axpby', 'rot']
+avail2 = ['matrix_vector','atv','symv', 'ger', 'syr2',
+ 'trisolve_vector']
+avail3 = ['matrix_matrix', 'aat', 'trisolve_matrix', 'trmm']
+
class BLASBase(btlbase.BTLBase):
+
+ avail1 = avail1
+ avail2 = avail2
+ avail3 = avail3
+ avail = avail1 + avail2 + avail3
+
def _initialize(self):
- self.avail1 = ['axpy', 'axpby', 'rot']
- self.avail2 = ['matrix_vector','atv','symv', 'ger', 'syr2',
- 'trisolve_vector']
- self.avail3 = ['matrix_matrix', 'aat', 'trisolve_matrix', 'trmm']
- self.avail = self.avail1 + self.avail2 + self.avail3
+ pass
def _parse_args(self, args):
# Parse arguments
diff --git a/btlbase.py b/btlbase.py
index 5a7c555..4947555 100644
--- a/btlbase.py
+++ b/btlbase.py
@@ -7,10 +7,21 @@ from benchprint import Print
from htmlreport import HTMLreport
import basemodule
import benchconfig as cfg
+from testdescr import testdescr
class BTLBase(basemodule.BaseModule):
+ @classmethod
+ def printHelp(cls):
+ basemodule.BaseModule.printHelp()
+
+ print "Tests:"
+ for i in cls.avail:
+ print " " + i + ":"
+ print " " + testdescr[i]
+ print
+
def _parse_args(self, args):
# Generate list of dat (result) files, relative to the testdir
self.files = [pjoin('bench_%s_%s.dat' % (op, self.libname)) \
diff --git a/lapack.py b/lapack.py
index 677603e..ae318fa 100644
--- a/lapack.py
+++ b/lapack.py
@@ -3,11 +3,14 @@ import subprocess as sp
import shlex
class Module(btlbase.BTLBase):
- def _initialize(self):
- self.libname = "lapack"
- self.avail = ['general_solve', 'least_squares', 'lu_decomp', \
+
+ libname = "lapack"
+ avail = ['general_solve', 'least_squares', 'lu_decomp', \
'cholesky', 'qr_decomp', 'svd_decomp', 'syev', 'stev', 'symm_ev']
+ def _initialize(self):
+ pass
+
def _parse_args(self, args):
# Parse arguments
tests = []
diff --git a/main.py b/main.py
index 0bd842f..4be9802 100755
--- a/main.py
+++ b/main.py
@@ -5,33 +5,89 @@ from os.path import join as pjoin
import subprocess as sp
def print_usage():
- print "Usage: benchmarks [blas|cblas|lapack] file args"
+ print "Usage: numbench [blas|cblas|lapack|scalapack|fftw|metis|" + \
+ "blas_accuracy|lapack_accuracy] file args"
-if len(sys.argv) < 3:
- print_usage()
- exit(1)
-
-from PortageUtils import *
-import benchconfig as cfg
-from benchprint import Print
-
-
-# Import the desired module or print help and exit
-try:
- cfg.inputfile = os.path.abspath(sys.argv[2])
- os.chdir(cfg.scriptdir)
- tmp = __import__(sys.argv[1], fromlist = ['Module'])
- mod = tmp.Module(sys.argv[3:])
- del tmp
- cfg.makedirs()
-except ImportError as e:
- print e
- print_usage()
- exit(1)
-except IndexError:
- print_usage()
- exit(1)
-
+def print_help():
+ print "Usage: numbench module conffile [options]"
+ print " numbench module [-h|--help]"
+ print
+ print "numbench is a tool for compiling and benchmarking numerical"
+ print "libraries. It is useful to find out the implementations of common"
+ print "libraries that run faster on the machine and are more accurate."
+ print "The script makes use of the portage features in order to download,"
+ print "compile, install and test the packages"
+ print
+ print
+ print "Modules:"
+ print "The following modules are available:"
+ print " blas - Test BLAS implementations"
+ print " cblas - Test CBLAS implementations"
+ print " lapack - Test LAPACK implementations"
+ print " scalapack - Test the ScaLAPACK library"
+ print " blas_accuracy - Test BLAS implementations for accuracy"
+ print " lapack_accuracy - Test LAPACK implementations for accuracy"
+ print " fftw - Test the FFTW library"
+ print " metis - Test the METIS tools"
+ print
+ print "More information about a module is available through the command:"
+ print " numbench module --help"
+ print
+ print
+ print "Config file:"
+ print "In order to run a test, a configuration file has to be provided."
+ print "Each line of this file defines a package that is to be tested."
+ print "It is possible to test different versions of the same package, or"
+ print "even to test many times the same package with different compile-time"
+ print "environment; for each different version or environment, a different"
+ print "line has to be written."
+ print
+ print "Each line begins with an identification token of the test. This"
+ print "identification can contain any characters, but it is recommended"
+ print "that it only contains alphanumeric digits, the period . , the minus"
+ print "sign - and the underscore _ ."
+ print "After the identification word, the package has to be provided. The"
+ print "package specification should be fully provided, in the usual"
+ print "category/package-version[-revision] format. For instance"
+ print "sci-libs/lapack-reference-3.3.1-r1. However, the script will try to"
+ print "choose the best package in case of lacking information."
+ print "After the package, the environment has to be specified. In order"
+ print "to do that, the user has to use the KEY=VALUE format. If the value"
+ print "contains a whitespace, the single or double quoting marks have to be"
+ print "used. The following are two valid configuration lines that define"
+ print "the tests for the sci-libs/atlas package with different compilers"
+ print "and CFLAGS:"
+ print
+ print "atlas-gcc sci-libs/atlas-3.9.46 CC=gcc CFLAGS=-O2"
+ print "atlas-gcc-4.6.1 sci-libs/atlas-3.9.46 CC=gcc-4.6.1",
+ print "CFLAGS=\"-O3 -march=native\""
+ print
+ print "Variables that affect the emerge process, such as USE, can be used"
+ print "and are effective."
+ print "More configuration options are available. As each package can"
+ print "install many implementations of the same library (for instance, the"
+ print "sci-libs/atlas package installs the serial version and the"
+ print "parallelized version with threads or openmp, depending on the USE"
+ print "flags), each implementation is tested; but if you do not want to"
+ print "test a specific implementation, you can mask it by adding to the"
+ print "configuration line the string '-implementation' (without quoting"
+ print "marks); then the script will skip the implementation. The following"
+ print "is an example where the 32-bit implementations of the acml are"
+ print "skipped:"
+ print
+ print "acml sci-libs/acml-4.4.0 -acml32-gfortran -acml32-gfortran-openmp"
+ print
+ print "The last configuration option that can be used is for libraries that"
+ print "internally use other libraries. For example, most LAPACK"
+ print "implementations lie on BLAS and/or CBLAS implementations. It is"
+ print "possible to make the tested LAPACK implementation use a specific"
+ print "BLAS implementation through the 'blas:implementation' (without"
+ print "quotation marks) format. For instance, the following line"
+ print "defines a test where the atlas LAPACK implementation uses the"
+ print "openblas library as BLAS and CBLAS (openblas has to be installed for"
+ print "this to work):"
+ print
+ print "atlas sci-libs/atlas-3.9.46 blas:openblas"
def tests_from_input(input):
tests = {}
@@ -69,7 +125,46 @@ def tests_from_input(input):
else:
sys.stderr.write('Error: package ' + spl[1] + ' not found\n')
return tests
+
+import benchconfig as cfg
+
+
+# Import the desired module or print help and exit
+try:
+
+ # Print main help
+ if (sys.argv[1] in ('-h', '--help')):
+ print_help()
+ exit(0);
+ cfg.modulename = sys.argv[1]
+
+ # Print module help
+ if (sys.argv[2] in ('-h', '--help')):
+ os.chdir(cfg.scriptdir)
+ cfg.inputfile = ''
+ tmp = __import__(cfg.modulename, fromlist = ['Module'])
+ tmp.Module.printHelp()
+ exit(0)
+
+ # Normal run: import module
+ cfg.inputfile = os.path.abspath(sys.argv[2])
+ os.chdir(cfg.scriptdir)
+ tmp = __import__(sys.argv[1], fromlist = ['Module'])
+ mod = tmp.Module(sys.argv[3:])
+ del tmp
+ cfg.makedirs()
+
+except ImportError as e:
+ print e
+ print_usage()
+ exit(1)
+except IndexError:
+ print_usage()
+ exit(1)
+
+from PortageUtils import *
+from benchprint import Print
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-09 0:00 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-09 0:00 UTC (permalink / raw
To: gentoo-commits
commit: c6b10b2698803d97f41cc2d95c384fcae690361f
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug 8 23:59:39 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug 8 23:59:39 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=c6b10b26
Added main logging. Solved issues with utils and Portage.
---
PortageUtils.py | 62 ++++++++++++++++++++++++++++++------------------------
benchconfig.py | 7 +++++-
benchprint.py | 21 +++++++++++++++---
benchutils.py | 5 +---
4 files changed, 58 insertions(+), 37 deletions(-)
diff --git a/PortageUtils.py b/PortageUtils.py
index 8280d1c..f06c53d 100644
--- a/PortageUtils.py
+++ b/PortageUtils.py
@@ -8,6 +8,35 @@ class InstallException(Exception):
def __init__(self, command, logfile):
self.command = command
self.logfile = logfile
+
+def _getEnv(root='/', envAdds={}):
+ denv = os.environ.copy()
+
+ #PATH
+ denv['PATH'] = ':'.join([pjoin(root, i) for i in ('bin', 'usr/bin')])
+ if os.environ.has_key('PATH'):
+ denv['PATH'] += ':' + os.environ['PATH']
+ denv['ROOTPATH'] = denv['PATH']
+ #LIBRARY_PATH
+ denv['LIBRARY_PATH'] = ':'.join([pjoin(root, i) for i in \
+ ('usr/lib', 'usr/lib64', 'usr/lib32')])
+ if os.environ.has_key('LIBRARY_PATH'):
+ denv['LIBRARY_PATH'] += ':' + os.environ['LIBRARY_PATH']
+ #LD_LIBRARY_PATH
+ denv['LD_LIBRARY_PATH'] = ':'.join([pjoin(root, i) for i in \
+ ('usr/lib', 'usr/lib64', 'usr/lib32')])
+ if os.environ.has_key('LD_LIBRARY_PATH'):
+ denv['LD_LIBRARY_PATH'] += ':' + os.environ['LD_LIBRARY_PATH']
+ #INCLUDE_PATH
+ denv['INCLUDE_PATH'] = ':'.join([pjoin(root, i) for i in ('usr/include',)])
+ if os.environ.has_key('INCLUDE_PATH'):
+ denv['INCLUDE_PATH'] += ':' + os.environ['INCLUDE_PATH']
+
+ # Adds
+ for k,v in envAdds.items():
+ denv[k] = v
+
+ return denv
def available_packages(pattern):
"""Returns a list of packages matching the given pattern.
@@ -51,9 +80,7 @@ def install_dependencies(package, env={}, root='/',
logdir = "/var/log/benchmarks/.unordered"
# Adjust environment
- denv = os.environ
- for k,v in env.items():
- denv[k] = v
+ denv = _getEnv(root, dict(PKGDIR=pkgdir))
# Retrieve dependencies
deps = get_dependencies(package, denv, False)
@@ -83,31 +110,10 @@ def install_package(package, env={}, root='/', pkgdir='usr/portage/packages',
The function has no return value and raises an exception in case of building
or emerging failure. Note: dependencies will NOT be emerged!
"""
-
- # Adjust environment
- denv = os.environ.copy()
- for k,v in env.items():
- denv[k] = v
- denv['PKGDIR'] = pkgdir
- #PATH
- denv['PATH'] = ':'.join([pjoin(root, i) for i in ('bin', 'usr/bin')])
- if os.environ.has_key('PATH'):
- denv['PATH'] += ':' + os.environ['PATH']
- denv['ROOTPATH'] = denv['PATH']
- #LIBRARY_PATH
- denv['LIBRARY_PATH'] = ':'.join([pjoin(root, i) for i in \
- ('usr/lib', 'usr/lib64', 'usr/lib32')])
- if os.environ.has_key('LIBRARY_PATH'):
- denv['LIBRARY_PATH'] += ':' + os.environ['LIBRARY_PATH']
- #LD_LIBRARY_PATH
- denv['LD_LIBRARY_PATH'] = ':'.join([pjoin(root, i) for i in \
- ('usr/lib', 'usr/lib64', 'usr/lib32')])
- if os.environ.has_key('LD_LIBRARY_PATH'):
- denv['LD_LIBRARY_PATH'] += ':' + os.environ['LD_LIBRARY_PATH']
- #INCLUDE_PATH
- denv['INCLUDE_PATH'] = ':'.join([pjoin(root, i) for i in ('usr/include',)])
- if os.environ.has_key('INCLUDE_PATH'):
- denv['INCLUDE_PATH'] += ':' + os.environ['INCLUDE_PATH']
+ envAdds = env.copy()
+ envAdds['PKGDIR'] = pkgdir
+ denv = _getEnv(root, envAdds)
+ del envAdds
# Retrieve package string
pkg = normalize_cpv(package)
diff --git a/benchconfig.py b/benchconfig.py
index c684685..f707959 100644
--- a/benchconfig.py
+++ b/benchconfig.py
@@ -32,6 +32,7 @@ if needsinitialization:
testsdir = "/var/tmp/benchmarks/tests/"
rootsdir = "/var/tmp/benchmarks/roots/"
pkgsdir = "/var/cache/benchmarks/packages/"
+
reportdirb = "/var/cache/benchmarks/reports/"
logdirb = "/var/log/benchmarks/"+modname+"_"+time.strftime('%Y-%m-%d')
else:
@@ -42,6 +43,10 @@ if needsinitialization:
logdirb = pjoin(os.environ['HOME'], ".benchmarks/log",
modname + "_" + time.strftime('%Y-%m-%d'))
+ bu.mkdir(testsdir)
+ bu.mkdir(rootsdir)
+ bu.mkdir(pkgsdir)
+
# Report directory
reportdirb += modname + "_" + time.strftime('%Y-%m-%d')
if os.path.exists(reportdirb):
@@ -76,4 +81,4 @@ def makedirs():
-inizialized = True
\ No newline at end of file
+inizialized = True
diff --git a/benchprint.py b/benchprint.py
index b91da66..e4b7e41 100644
--- a/benchprint.py
+++ b/benchprint.py
@@ -5,24 +5,37 @@ except NameError:
if needsinitialization:
+ import benchconfig as cfg, benchutils as bu
+ from os.path import dirname, join as pjoin
+
class _Print:
- def __init__(self, maxlevel=10):
+ def __init__(self, logfile, maxlevel=10):
self._level = 0
self._maxlevel = maxlevel
+ bu.mkdir(dirname(logfile))
+ self._logfile = file(logfile, 'w')
def __call__(self, arg):
if self._level > self._maxlevel:
return
+
if self._level <= 0:
print str(arg)
+ print >> self._logfile, str(arg)
+ self._logfile.flush()
return
- print (self._level-1)*" " + "-- " + str(arg)
+
+ printstr = (self._level-1)*" " + "-- " + str(arg)
+ if self._level <= self._maxlevel-1:
+ print >> self._logfile, printstr
+ self._logfile.flush()
+ print printstr
def up(self, n=1):
self._level = max(self._level-n, 0)
def down(self, n=1):
self._level = max(self._level+n, 0)
- Print = _Print(3)
+ Print = _Print(pjoin(cfg.logdir, 'main.log'), 3)
-initialized = True
\ No newline at end of file
+initialized = True
diff --git a/benchutils.py b/benchutils.py
index 748f928..df12ee9 100644
--- a/benchutils.py
+++ b/benchutils.py
@@ -1,11 +1,8 @@
import os, sys
-from os.path import join as pjoin, basename, dirname
import subprocess as sp
-import benchconfig as cfg
-import benchpkgconfig as pc
def mkdir(dir):
if not os.path.exists(dir):
os.makedirs(dir)
-run_cmd = lambda c : sp.Popen(c, stdout=sp.PIPE).communicate()[0]
\ No newline at end of file
+run_cmd = lambda c : sp.Popen(c, stdout=sp.PIPE).communicate()[0]
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-08-09 0:00 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-08-09 0:00 UTC (permalink / raw
To: gentoo-commits
commit: 21035a61148d88293ba8af84d7c96555aa19428e
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Aug 8 22:40:53 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Aug 8 22:40:53 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=21035a61
Merge branch 'unstable' of git+ssh://git.overlays.gentoo.org/proj/auto-numerical-bench
PortageUtils.py | 109 +++-
accuracy/lapack/diff.hh | 30 +
accuracy/lapack/lapack_LU.hh | 57 ++
accuracy/lapack/lapack_QR.hh | 57 ++
accuracy/lapack/lapack_STEV.hh | 35 +
accuracy/lapack/lapack_SVD.hh | 40 ++
accuracy/lapack/lapack_SYEV.hh | 43 ++
accuracy/lapack/lapack_cholesky.hh | 37 ++
accuracy/lapack/main_lapack.cpp | 103 +++
accuracy/lapack/timer.hh | 50 ++
accuracy/sizes.hh | 42 ++
basemodule.py | 12 +-
benchconfig.py | 44 +-
btl/COPYING | 340 ----------
btl/README | 154 -----
btl/actions/action_aat_product.hh | 145 -----
btl/actions/action_ata_product.hh | 145 -----
btl/actions/action_atv_product.hh | 134 ----
btl/actions/action_axpby.hh | 127 ----
btl/actions/action_axpy.hh | 139 ----
btl/actions/action_cholesky.hh | 129 ----
btl/actions/action_fftw_1d_backward_estimate.hh | 94 ---
btl/actions/action_fftw_1d_backward_measure.hh | 94 ---
btl/actions/action_fftw_1d_forward_estimate.hh | 94 ---
btl/actions/action_fftw_1d_forward_measure.hh | 94 ---
btl/actions/action_general_solve.hh | 120 ----
btl/actions/action_ger.hh | 128 ----
btl/actions/action_hessenberg.hh | 233 -------
btl/actions/action_least_squares.hh | 120 ----
btl/actions/action_lu_decomp.hh | 124 ----
btl/actions/action_lu_solve.hh | 136 ----
btl/actions/action_matrix_matrix_product.hh | 150 -----
btl/actions/action_matrix_matrix_product_bis.hh | 152 -----
btl/actions/action_matrix_vector_product.hh | 153 -----
btl/actions/action_partial_lu.hh | 125 ----
btl/actions/action_rot.hh | 116 ----
btl/actions/action_symm_ev.hh | 87 ---
btl/actions/action_symv.hh | 139 ----
btl/actions/action_syr2.hh | 133 ----
btl/actions/action_trisolve.hh | 137 ----
btl/actions/action_trisolve_matrix.hh | 165 -----
btl/actions/action_trmm.hh | 165 -----
btl/actions/basic_actions.hh | 21 -
btl/actions/fftw_actions.hh | 9 -
btl/data/action_settings.txt | 18 -
btl/data/gnuplot_common_settings.hh | 87 ---
btl/data/go_mean | 57 --
btl/data/mean.cxx | 182 ------
btl/data/mk_gnuplot_script.sh | 68 --
btl/data/mk_mean_script.sh | 52 --
btl/data/mk_new_gnuplot.sh | 54 --
btl/data/perlib_plot_settings.txt | 16 -
btl/data/regularize.cxx | 131 ----
btl/data/smooth.cxx | 198 ------
btl/data/smooth_all.sh | 68 --
btl/generic_bench/bench.hh | 168 -----
btl/generic_bench/bench_parameter.hh | 53 --
btl/generic_bench/btl.hh | 247 -------
btl/generic_bench/init/init_function.hh | 54 --
btl/generic_bench/init/init_matrix.hh | 64 --
btl/generic_bench/init/init_vector.hh | 37 --
btl/generic_bench/static/bench_static.hh | 80 ---
btl/generic_bench/static/intel_bench_fixed_size.hh | 66 --
btl/generic_bench/static/static_size_generator.hh | 57 --
btl/generic_bench/timers/STL_perf_analyzer.hh | 82 ---
btl/generic_bench/timers/STL_timer.hh | 78 ---
btl/generic_bench/timers/mixed_perf_analyzer.hh | 73 ---
btl/generic_bench/timers/portable_perf_analyzer.hh | 103 ---
.../timers/portable_perf_analyzer_old.hh | 134 ----
btl/generic_bench/timers/portable_timer.hh | 145 -----
btl/generic_bench/timers/x86_perf_analyzer.hh | 108 ----
btl/generic_bench/timers/x86_timer.hh | 246 -------
btl/generic_bench/utils/size_lin_log.hh | 70 --
btl/generic_bench/utils/size_log.hh | 54 --
btl/generic_bench/utils/utilities.h | 90 ---
btl/generic_bench/utils/xy_file.hh | 75 ---
btl/libs/BLAS/CMakeLists.txt | 60 --
btl/libs/BLAS/blas.h | 675 --------------------
btl/libs/BLAS/blas_interface.hh | 76 ---
btl/libs/BLAS/blas_interface_impl.hh | 79 ---
btl/libs/BLAS/c_interface_base.h | 72 ---
btl/libs/BLAS/cblas_interface_impl.hh | 79 ---
btl/libs/BLAS/main.cpp | 106 ---
btl/libs/FFTW/fftw_interface.hh | 62 --
btl/libs/FFTW/main.cpp | 45 --
btl/libs/LAPACK/lapack_interface.hh | 53 --
btl/libs/LAPACK/lapack_interface_impl.hh | 68 --
btl/libs/LAPACK/main.cpp | 48 --
btl/libs/STL/CMakeLists.txt | 2 -
btl/libs/STL/STL_interface.hh | 244 -------
btl/libs/STL/main.cpp | 42 --
btl/libs/eigen3/CMakeLists.txt | 65 --
btl/libs/eigen3/btl_tiny_eigen3.cpp | 46 --
btl/libs/eigen3/eigen3_interface.hh | 240 -------
btl/libs/eigen3/main_adv.cpp | 44 --
btl/libs/eigen3/main_linear.cpp | 35 -
btl/libs/eigen3/main_matmat.cpp | 35 -
btl/libs/eigen3/main_vecmat.cpp | 36 -
btlbase.py | 18 +-
fftw.py | 5 +-
lapack.py | 5 +-
blas_accuracy.py => lapack_accuracy.py | 29 +-
main.py | 64 +-
metis.py | 162 +++++
scalapack.py | 68 ++
testdescr.py | 14 +-
106 files changed, 925 insertions(+), 9428 deletions(-)
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-07-17 0:21 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-07-17 0:21 UTC (permalink / raw
To: gentoo-commits
commit: 3eadb96a4cc26784a088a60b74f39cabe5331f40
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Sun Jul 17 00:16:49 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Sun Jul 17 00:16:49 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=3eadb96a
main.py executable
---
0 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/main.py b/main.py
old mode 100644
new mode 100755
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-07-13 21:48 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-07-13 21:48 UTC (permalink / raw
To: gentoo-commits
commit: 0f0ac12a76e94ec68683ab2d61dd55cba4b49821
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Wed Jul 13 21:44:37 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Wed Jul 13 21:44:37 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=0f0ac12a
main.py executable
---
0 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/main.py b/main.py
old mode 100644
new mode 100755
^ permalink raw reply [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-06-15 23:25 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-06-15 23:25 UTC (permalink / raw
To: gentoo-commits
commit: 9e8213dc144f97872735ca329734609767a9d9a5
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Wed Jun 15 23:24:43 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Wed Jun 15 23:24:43 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=9e8213dc
Correct bug at main.py:207.
---
btlbase.py | 1 +
btlutils.py | 1 +
main.py | 5 +++--
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/btlbase.py b/btlbase.py
index ecb74d9..a8d8c1e 100644
--- a/btlbase.py
+++ b/btlbase.py
@@ -92,6 +92,7 @@ class BTLBase:
os.environ[k] = v
# Compile
+ # TODO: use CXX instead of g++
btldir = 'btl/'
returncode, compilecl = btl.btlcompile(
exe = testdir + "/test",
diff --git a/btlutils.py b/btlutils.py
index 3da5b0c..752096e 100644
--- a/btlutils.py
+++ b/btlutils.py
@@ -22,6 +22,7 @@ def btlcompile(exe, source, btldir, includes, defines, libs, libdirs, other):
otherflags = ' '.join(other)
+ # TODO: use CXX instead of g++
cl = "g++ -o %s %s %s %s %s %s %s %s" \
% (exe, source, incs, defs, libs, libdirs, cxxflags, otherflags)
cl = shlex.split(cl)
diff --git a/main.py b/main.py
index 9799a43..474f9bd 100644
--- a/main.py
+++ b/main.py
@@ -204,8 +204,9 @@ if not os.path.exists(figdir):
results = {}
for (name,test) in tests.items():
- for impl in test['implementations']:
- results[(name, impl)] = test['results'][impl]
+ if test.has_key('implementations'):
+ for impl in test['implementations']:
+ results[(name, impl)] = test['results'][impl]
mod.save_results(results, figdir)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-06-15 12:56 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-06-15 12:56 UTC (permalink / raw
To: gentoo-commits
commit: bb92ba7dd4ebb313038d5ea0452c06787d3998c0
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Wed Jun 15 12:55:43 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Wed Jun 15 12:55:43 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=bb92ba7d
Introduced LAPACK, cleanup of btlbase (former blasbase). Some changes
to main.
---
blas.py | 70 ++++++++++++++++++++++++-----
blasbase.py => btlbase.py | 109 ++++++++++++++++++++++++---------------------
cblas.py | 72 ++++++++++++++++++++++++-----
lapack.py | 56 +++++++++++++++++++++++
lapacktests.in | 2 +
main.py | 26 +++++-----
6 files changed, 246 insertions(+), 89 deletions(-)
diff --git a/blas.py b/blas.py
index b9d6ed8..52bb221 100644
--- a/blas.py
+++ b/blas.py
@@ -1,23 +1,69 @@
-import os, blasbase
+import os, btlbase
import subprocess as sp
+import shlex
-class Module(blasbase.ModuleBase):
+class Module(btlbase.BTLBase):
+ def _initialize(self):
+ self.libname = "blas"
+ self.avail1 = ['axpy', 'axpby', 'rot']
+ self.avail2 = ['matrix_vector','atv','symv','syr2','ger',
+ 'trisolve_vector']
+ self.avail3 = ['matrix_matrix', 'aat', 'trisolve_matrix', 'trmm']
+ self.avail = self.avail1 + self.avail2 + self.avail3
+
+ def _parse_args(self, args):
+ # Parse arguments
+ tests = []
+ for i in args:
+ if i == '1':
+ tests += avail1
+ continue
+ if i == '2':
+ tests += avail2
+ continue
+ if i == '3':
+ tests += avail3
+ continue
+ if i in self.avail:
+ tests.append(i)
+ continue
+ raise Exception("Argument not recognized: " + i)
+
+ # Sort tests
+ self.tests = [i for i in self.avail if i in tests]
+
+ # If no test is specified, then choose four standard tests
+ if len(self.tests) == 0:
+ self.tests = ['axpy', 'matrix_vector', \
+ 'trisolve_vector', 'matrix_matrix']
+
@staticmethod
- def get_impls(root):
- output = sp.Popen(
- ['eselect', '--no-color', '--brief', 'blas', 'list'],
- env={'ROOT' : root}, stdout=sp.PIPE
- ).communicate()[0]
- return output.strip().split('\n')
+ def _btl_source():
+ return "/libs/BLAS/main.cpp"
+
+ @staticmethod
+ def _btl_includes():
+ return ["/libs/BLAS"]
+
+ def _btl_defines(self):
+ return ["CBLASNAME=" + self.libname, "BLAS_INTERFACE"]
def _get_flags(self, root, impl, libdir):
# Retrieve pkgconfig settings and map the directories to the new root
- path = \
- "%s/etc/env.d/alternatives/blas/%s/%s/pkgconfig" % (root,impl,libdir)
+ path = "%s/etc/env.d/alternatives/%s/%s/%s/pkgconfig" % \
+ (root, self.libname, impl, libdir)
pkgconf = sp.Popen('pkg-config --libs --cflags blas', shell=True, \
stdout=sp.PIPE, env={'PKG_CONFIG_PATH':path}).communicate()[0]
pkgconf = pkgconf.replace('-L/', '-L'+root+'/')
pkgconf = pkgconf.replace('-I/', '-I'+root+'/')
- return pkgconf + " -DBLAS_INTERFACE"
+ return shlex.split(pkgconf)
+
+
+ def get_impls(self, root):
+ output = sp.Popen(
+ ['eselect', '--no-color', '--brief', self.libname, 'list'],
+ env={'ROOT' : root}, stdout=sp.PIPE
+ ).communicate()[0]
+ return output.strip().split('\n')
-del blasbase
+del btlbase
diff --git a/blasbase.py b/btlbase.py
similarity index 66%
rename from blasbase.py
rename to btlbase.py
index 36413c7..ecb74d9 100644
--- a/blasbase.py
+++ b/btlbase.py
@@ -5,62 +5,49 @@ import subprocess as sp
try:
import matplotlib.pyplot as plt
import numpy as np
+ with_images = True
except ImportError:
sys.stderr.write('Error: matplotlib and numpy are needed' + \
'in order to generate the reports!\n')
- sys.stderr.write('Continue anyway.\n')
+ sys.stderr.write('Continue anyway.\n\n')
+ with_images = False
import btlutils as btl
run_cmd = lambda c : sp.Popen(c, stdout=sp.PIPE).communicate()[0]
-class ModuleBase:
+class BTLBase:
def __init__(self, Print, libdir, args):
self.Print = Print
self.libdir = libdir
self.summary = False
self.summary_only = False
- avail1 = ['axpy', 'axpby', 'rot']
- avail2 = ['matrix_vector','atv','symv','syr2','ger','trisolve_vector']
- avail3 = ['matrix_matrix', 'aat', 'trisolve_matrix', 'trmm']
+ self._initialize()
- tests = []
+ passargs = []
for i in args:
if i == '-S':
self.summary_only = True
continue
- if i == '-s':
+ elif i == '-s':
self.summary = True
continue
- if i == '1':
- tests += avail1
- continue
- if i == '2':
- tests += avail2
- continue
- if i == '3':
- tests += avail3
- continue
- if i in avail1 + avail2 + avail3:
- tests.append(i)
- continue
- raise Exception("Argument not recognized: " + i)
- self.tests = [i for i in avail1+avail2+avail3 if i in tests]
+ else:
+ passargs += [i]
- if len(self.tests) == 0:
- self.tests = ['axpy', 'matrix_vector', \
- 'trisolve_vector', 'matrix_matrix']
+ self._parse_args(passargs)
- def run_test(self, root, impl, testdir):
+ def run_test(self, root, impl, testdir, env):
+ # Convenient renames and definition of report files
Print = self.Print
libdir = self.libdir
- name = 'blas'
+ name = self.libname
files = ['%s/bench_%s_%s.dat' %(testdir, op, name) for op in self.tests]
- # Create dir. If all results already exist use them, otherwise
- # remove old results
+ # Create dir. If all results already exist use them and do not perform
+ # the tests, otherwise remove every old results.
runtests = False
if os.path.exists(testdir):
runtests = not all([os.path.exists(i) for i in files])
@@ -77,31 +64,44 @@ class ModuleBase:
for i in files:
if os.path.exists(i): os.remove(i)
+
+ # Prepare the environment
+ if env.has_key('LIBRARY_PATH'):
+ env['LIBRARY_PATH'] = root+libdir + ":" + env['LIBRARY_PATH']
+ else:
+ env['LIBRARY_PATH'] = root+libdir
+
+ if env.has_key('INCLUDE_PATH'):
+ env['INCLUDE_PATH'] = root+"/usr/include" +":"+ env['INCLUDE_PATH']
+ else:
+ env['INCLUDE_PATH'] = root+"/usr/include"
+
+ if env.has_key('LD_LIBRARY_PATH'):
+ env['LD_LIBRARY_PATH'] = root+libdir + ":" + env['LD_LIBRARY_PATH']
+ else:
+ env['LD_LIBRARY_PATH'] = root+libdir
- # Setup environment for testing
+ # Backup the environment
oldenv = {}
- for v in ('LIBRARY_PATH', 'INCLUDE_PATH', 'LD_LIBRARY_PATH'):
- # Backup old environment variables
- oldenv[v] = \
- (os.environ.has_key(v) and (os.environ[v],) or (None,))[0]
- os.environ['LIBRARY_PATH'] = root + libdir
- os.environ['INCLUDE_PATH'] = root + '/usr/include'
- if oldenv['LD_LIBRARY_PATH'] != None:
- os.environ['LD_LIBRARY_PATH'] = \
- root + libdir + ":" + oldenv['LD_LIBRARY_PATH']
- else:
- os.environ['LD_LIBRARY_PATH'] = root + libdir
+ for k in env.keys():
+ oldenv[k] = \
+ (os.environ.has_key(k) and (os.environ[k],) or (None,))[0]
+
+ # Set the environment
+ for k,v in env.items():
+ os.environ[k] = v
# Compile
+ btldir = 'btl/'
returncode, compilecl = btl.btlcompile(
exe = testdir + "/test",
- source = "btl/libs/BLAS/main.cpp",
- btldir = 'btl/',
- includes = ['btl/libs/BLAS'],
- defines = ["CBLASNAME=" + name],
+ source = btldir + self._btl_source(),
+ btldir = btldir,
+ includes = [btldir+d for d in self._btl_includes()],
+ defines = self._btl_defines(),
libs = [],
libdirs = [root+libdir],
- other = [self._get_flags(root, impl, libdir)]
+ other = self._get_flags(root, impl, libdir)
)
if returncode != 0:
raise Exception("Compilation failed: " + compilecl)
@@ -132,15 +132,20 @@ class ModuleBase:
else:
Print('Test successful')
- # Restore old environment variables
- for v in ('LIBRARY_PATH', 'INCLUDE_PATH', 'LD_LIBRARY_PATH'):
- if oldenv[v] != None:
- os.environ[v] = oldenv[v]
- elif os.environ.has_key(v):
- del os.environ[v]
+ # Restore the old environment
+ for k in env.keys():
+ if oldenv[k] != None:
+ os.environ[k] = oldenv[k]
+ elif os.environ.has_key(k):
+ del os.environ[k]
return results
def save_results(self, results, figdir):
+ if not with_images:
+ self.Print("Report generation skipped - missing libraries")
+ return
+
+ # Re-order the result dictionary
newresults = {}
for test in self.tests:
newresults[test] = {}
@@ -149,6 +154,7 @@ class ModuleBase:
resdat = results[nameimpl][test]
newresults[test][nameimplstr] = resdat
+ # Generate summary - a single image with all plots
if self.summary or self.summary_only:
# Save summary figure
sprows = (len(self.tests)+1)/2
@@ -165,6 +171,7 @@ class ModuleBase:
plt.savefig(fname, format='png')
self.Print('Summary figure saved: ' + fname)
+ # Generate plots
if not self.summary_only:
for test in self.tests:
plt.figure(figsize=(12,9), dpi=300)
diff --git a/cblas.py b/cblas.py
index ad47c65..c3d0342 100644
--- a/cblas.py
+++ b/cblas.py
@@ -1,23 +1,69 @@
-import os, blasbase
+import os, btlbase
import subprocess as sp
+import shlex
-class Module(blasbase.ModuleBase):
+class Module(btlbase.BTLBase):
+ def _initialize(self):
+ self.libname = "cblas"
+ self.avail1 = ['axpy', 'axpby', 'rot']
+ self.avail2 = ['matrix_vector','atv','symv','syr2','ger',
+ 'trisolve_vector']
+ self.avail3 = ['matrix_matrix', 'aat', 'trisolve_matrix', 'trmm']
+ self.avail = self.avail1 + self.avail2 + self.avail3
+
+ def _parse_args(self, args):
+ # Parse arguments
+ tests = []
+ for i in args:
+ if i == '1':
+ tests += avail1
+ continue
+ if i == '2':
+ tests += avail2
+ continue
+ if i == '3':
+ tests += avail3
+ continue
+ if i in self.avail:
+ tests.append(i)
+ continue
+ raise Exception("Argument not recognized: " + i)
+
+ # Sort tests
+ self.tests = [i for i in self.avail if i in tests]
+
+ # If no test is specified, then choose four standard tests
+ if len(self.tests) == 0:
+ self.tests = ['axpy', 'matrix_vector', \
+ 'trisolve_vector', 'matrix_matrix']
+
@staticmethod
- def get_impls(root):
- output = sp.Popen(
- ['eselect', '--no-color', '--brief', 'cblas', 'list'],
- env={'ROOT' : root}, stdout=sp.PIPE
- ).communicate()[0]
- return output.strip().split('\n')
-
+ def _btl_source():
+ return "/libs/BLAS/main.cpp"
+
+ @staticmethod
+ def _btl_includes():
+ return ["/libs/BLAS"]
+
+ def _btl_defines(self):
+ return ["CBLASNAME=" + self.libname, "CBLAS_INTERFACE"]
+
def _get_flags(self, root, impl, libdir):
# Retrieve pkgconfig settings and map the directories to the new root
- path = \
- "%s/etc/env.d/alternatives/cblas/%s/%s/pkgconfig" % (root,impl,libdir)
+ path = "%s/etc/env.d/alternatives/%s/%s/%s/pkgconfig" % \
+ (root, self.libname, impl, libdir)
pkgconf = sp.Popen('pkg-config --libs --cflags cblas', shell=True, \
stdout=sp.PIPE, env={'PKG_CONFIG_PATH':path}).communicate()[0]
pkgconf = pkgconf.replace('-L/', '-L'+root+'/')
pkgconf = pkgconf.replace('-I/', '-I'+root+'/')
- return pkgconf + " -DCBLAS_INTERFACE"
+ return shlex.split(pkgconf)
+
+
+ def get_impls(self, root):
+ output = sp.Popen(
+ ['eselect', '--no-color', '--brief', self.libname, 'list'],
+ env={'ROOT' : root}, stdout=sp.PIPE
+ ).communicate()[0]
+ return output.strip().split('\n')
-del blasbase
+del btlbase
diff --git a/lapack.py b/lapack.py
new file mode 100644
index 0000000..1d2f3cb
--- /dev/null
+++ b/lapack.py
@@ -0,0 +1,56 @@
+import os, blasbase
+import subprocess as sp
+import shlex
+
+class Module(blasbase.BTLBase):
+ def _initialize(self):
+ self.libname = "lapack"
+ self.avail = ['general_solve', 'least_squares', 'lu_decomp', \
+ 'cholesky', 'symm_ev']
+
+ def _parse_args(self, args):
+ # Parse arguments
+ tests = []
+ for i in args:
+ if i in self.avail:
+ tests.append(i)
+ continue
+ raise Exception("Argument not recognized: " + i)
+
+ # Sort tests
+ self.tests = [i for i in self.avail if i in tests]
+
+ # If no test is specified, run everything
+ if len(self.tests) == 0:
+ self.tests = self.avail
+
+ @staticmethod
+ def _btl_source():
+ return "/libs/LAPACK/main.cpp"
+
+ @staticmethod
+ def _btl_includes():
+ return ["/libs/BLAS", "libs/LAPACK"]
+
+ def _btl_defines(self):
+ return ["LAPACKNAME=" + self.libname]
+
+ def _get_flags(self, root, impl, libdir):
+ # Retrieve pkgconfig settings and map the directories to the new root
+ path = "%s/etc/env.d/alternatives/%s/%s/%s/pkgconfig" % \
+ (root, self.libname, impl, libdir)
+ pkgconf = sp.Popen('pkg-config --libs --cflags lapack', shell=True, \
+ stdout=sp.PIPE, env={'PKG_CONFIG_PATH':path}).communicate()[0]
+ pkgconf = pkgconf.replace('-L/', '-L'+root+'/')
+ pkgconf = pkgconf.replace('-I/', '-I'+root+'/')
+ return shlex.split(pkgconf)
+
+
+ def get_impls(self, root):
+ output = sp.Popen(
+ ['eselect', '--no-color', '--brief', self.libname, 'list'],
+ env={'ROOT' : root}, stdout=sp.PIPE
+ ).communicate()[0]
+ return output.strip().split('\n')
+
+del blasbase
diff --git a/lapacktests.in b/lapacktests.in
new file mode 100644
index 0000000..1dfcfb6
--- /dev/null
+++ b/lapacktests.in
@@ -0,0 +1,2 @@
+reference-O2 sci-libs/lapack-reference-3.3.1-r1 FFLAGS=-O2
+reference-O3 sci-libs/lapack-reference-3.3.1-r1 FFLAGS=-O3
diff --git a/main.py b/main.py
index feeef86..8933834 100644
--- a/main.py
+++ b/main.py
@@ -80,11 +80,6 @@ try:
except ImportError, IndexError:
print_usage()
exit(1)
-
-#tmp = __import__(sys.argv[1], fromlist = ['Module'])
-#mod = tmp.Module(Print, libdir, sys.argv[3:])
-#del tmp
-#testsfname = sys.argv[2]
"""
@@ -102,22 +97,22 @@ After the tests every successful tested item will contain the item "result",
which can contain any type of data and will be used for the final report.
"""
#tests = {
-# "abcde" : {
+# "reference-gfortran" : {
# "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
# "env" : {'FC' : 'gfortran'}
# },
#
-# "fghij" : {
+# "eigen-gcc" : {
# "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'),
-# "env" : {'CXX' : 'gcc', 'CXXFLAGS' : '-O2'}
+# "env" : {'CXX' : 'g++', 'CXXFLAGS' : '-O2'}
# },
#
-# "klmno" : {
+# "eigen-icc" : {
# "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'),
# "env" : {'CXX' : 'icc', 'CXXFLAGS' : '-O3'}
# },
#
-# "pqrst" : {
+# "reference-ifort" : {
# "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
# "env" : {'FC' : 'ifort'}
# }
@@ -136,13 +131,17 @@ dictionary; the line has to contain:
input = file(testsfname).read()
tests = tests_from_input(input)
+# Write summary
+print 60*'='
print "The following tests will be run:"
for tname, ttest in tests.items():
- print "Tests: " + tname
+ print "Test: " + tname
print " - Package: " + "%s/%s-%s-%s" % ttest['package']
print " - Environment: " + \
' '.join([n+'="'+v+'"' for n,v in ttest['env'].items()])
print
+print 60*'='
+print
for tn,(name,test) in enumerate(tests.items(),1):
Print("BEGIN TEST %i - %s" % (tn, name))
@@ -187,9 +186,10 @@ for tn,(name,test) in enumerate(tests.items(),1):
Print("Testing " + impl)
Print.down()
- # Compile/link the test suite against the library
+ # Run the test suite
testdir = "%s/%s/%s" % (testsdir, name, impl)
- test['results'][impl] = mod.run_test(root, impl, testdir)
+ test['results'][impl] = \
+ mod.run_test(root=root, impl=impl, testdir=testdir, env=test['env'])
Print.up()
Print.up()
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-06-13 23:53 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-06-13 23:53 UTC (permalink / raw
To: gentoo-commits
commit: 351b0455f1858ec0f8d19edfba0e0620a4133052
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Jun 13 23:52:50 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Jun 13 23:52:50 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=351b0455
Some bugs solved.
---
blas.py | 7 +++++--
blastests.in | 4 ++--
main.py | 23 +++++++++++++++--------
3 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/blas.py b/blas.py
index 295e833..b9d6ed8 100644
--- a/blas.py
+++ b/blas.py
@@ -4,8 +4,11 @@ import subprocess as sp
class Module(blasbase.ModuleBase):
@staticmethod
def get_impls(root):
- return [i for i in os.listdir(root + "/etc/env.d/alternatives/blas") \
- if i[0] != '_']
+ output = sp.Popen(
+ ['eselect', '--no-color', '--brief', 'blas', 'list'],
+ env={'ROOT' : root}, stdout=sp.PIPE
+ ).communicate()[0]
+ return output.strip().split('\n')
def _get_flags(self, root, impl, libdir):
# Retrieve pkgconfig settings and map the directories to the new root
diff --git a/blastests.in b/blastests.in
index a5f5998..3b80df7 100644
--- a/blastests.in
+++ b/blastests.in
@@ -1,2 +1,2 @@
-eigen-O2 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O2'
-eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O3'
+eigen-O2 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O2 -march=native'
+eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O3 -march=native'
diff --git a/main.py b/main.py
index a992e58..ea459a4 100644
--- a/main.py
+++ b/main.py
@@ -22,7 +22,7 @@ class _Print:
def down(self, n=1):
self._level = max(self._level+n, 0)
-Print = _Print(2)
+Print = _Print(3)
# Retrieve relevant directories
@@ -54,19 +54,18 @@ def tests_from_input(input):
continue
if line[0] == '#':
continue
- avail = available_packages(spl[1])
env = {}
# TODO: add @file for env set based on external file
# TODO: add -impl for skipping implementation
for var in spl[2:]:
- s = var.split('=')
+ s = var.split('=', 1)
env[s[0]] = s[1]
- avail = available_packages(spl[1])
- if len(avail) > 1:
+ avail = available_packages(spl[1])
+ if len(avail) > 1:
for n,p in enumerate(avail):
- tests[spl[0]+"_%02i"%n] = {'package':p , 'env':env}
- else:
- tests[spl[0]] = {'package':avail[0] , 'env':env}
+ tests[spl[0]+"_%02i"%n] = {'package':p , 'env':env}
+ else:
+ tests[spl[0]] = {'package':avail[0] , 'env':env}
return tests
@@ -135,6 +134,14 @@ dictionary; the line has to contain:
input = file(testsfname).read()
tests = tests_from_input(input)
+print "The following tests will be run:"
+for tname, ttest in tests.items():
+ print "Tests: " + tname
+ print " - Package: " + "%s/%s-%s-%s" % ttest['package']
+ print " - Environment: " + \
+ ' '.join([n+'="'+v+'"' for n,v in ttest['env'].items()])
+ print
+
for tn,(name,test) in enumerate(tests.items(),1):
Print("BEGIN TEST %i - %s" % (tn, name))
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-06-13 14:12 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-06-13 14:12 UTC (permalink / raw
To: gentoo-commits
commit: 3ce46646c899b4a452a8dff930f39b6e7d898bd2
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Jun 13 14:11:53 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Jun 13 14:11:53 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=3ce46646
Starting code cleanup. Created btlutils.
---
blasbase.py | 36 +++++++++++++++---------------------
btlutils.py | 30 ++++++++++++++++++++++++++++++
main.py | 6 ++++++
3 files changed, 51 insertions(+), 21 deletions(-)
diff --git a/blasbase.py b/blasbase.py
index 3335000..b9be2cd 100644
--- a/blasbase.py
+++ b/blasbase.py
@@ -3,6 +3,7 @@ import commands as cmd
import subprocess as sp
import matplotlib.pyplot as plt
import numpy as np
+import btlutils as btl
run_cmd = lambda c : sp.Popen(c, stdout=sp.PIPE).communicate()[0]
@@ -85,29 +86,22 @@ class ModuleBase:
os.environ['LD_LIBRARY_PATH'] = root + libdir
# Compile
- exe = testdir + "/test"
- inc = """
- -Ibtl/actions
- -Ibtl/generic_bench
- -Ibtl/generic_bench/utils
- -Ibtl/libs/BLAS
- -Ibtl/libs/STL
- """.replace('\n', '')
- libs = "-lrt -L" + root+libdir
- cxxflags = run_cmd(['portageq', 'envvar', 'CXXFLAGS']).strip()
- defines = "-DCBLASNAME=" + name
- implflags = self._get_flags(root, impl, libdir)
- cl = "g++ %s %s %s %s %s btl/libs/BLAS/main.cpp -o %s" \
- % (inc, libs, cxxflags, defines, implflags, exe)
- cl = shlex.split(cl)
- cp = sp.Popen(cl, stdout=sp.PIPE, stderr=sp.PIPE)
- cp.communicate()
- if cp.returncode != 0:
- raise Exception("Compilation failed: " + " ".join(cl))
- Print("Compilation successful")
+ returncode, compilecl = btl.btlcompile(
+ exe = testdir + "/test",
+ source = "btl/libs/BLAS/main.cpp",
+ btldir = 'btl/',
+ includes = ['btl/libs/BLAS'],
+ defines = ["CBLASNAME=" + name],
+ libs = [],
+ libdirs = [root+libdir],
+ other = [self._get_flags(root, impl, libdir)]
+ )
+ if returncode != 0:
+ raise Exception("Compilation failed: " + compilecl)
+ Print("Compilation successful: " + compilecl)
# Run test
- args = [exe] + self.tests
+ args = [testdir + "/test"] + self.tests
proc = sp.Popen(args, bufsize=1, stdout=sp.PIPE, stderr=sp.PIPE,
cwd = testdir)
results = {}
diff --git a/btlutils.py b/btlutils.py
new file mode 100644
index 0000000..3da5b0c
--- /dev/null
+++ b/btlutils.py
@@ -0,0 +1,30 @@
+import subprocess as sp
+import shlex
+
+run_cmd = lambda c : sp.Popen(c, stdout=sp.PIPE).communicate()[0]
+
+def btlcompile(exe, source, btldir, includes, defines, libs, libdirs, other):
+ incs = (
+ "%s/actions" % btldir,
+ "%s/generic_bench" % btldir,
+ "%s/generic_bench/utils" % btldir,
+ "%s/libs/STL" % btldir
+ ) + tuple(includes)
+ incs = ' '.join(['-I'+i for i in incs])
+
+ defs = ' '.join(['-D'+d for d in ["NDEBUG"] + defines])
+
+ libs = ' '.join(['-l'+l for l in ["rt"] + libs])
+
+ libdirs = ' '.join(['-L'+L for L in libdirs])
+
+ cxxflags = run_cmd(['portageq', 'envvar', 'CXXFLAGS']).strip()
+
+ otherflags = ' '.join(other)
+
+ cl = "g++ -o %s %s %s %s %s %s %s %s" \
+ % (exe, source, incs, defs, libs, libdirs, cxxflags, otherflags)
+ cl = shlex.split(cl)
+ cp = sp.Popen(cl, stdout=sp.PIPE, stderr=sp.PIPE)
+ cp.communicate()
+ return (cp.returncode, ' '.join(cl))
diff --git a/main.py b/main.py
index ee17fed..a992e58 100644
--- a/main.py
+++ b/main.py
@@ -1,6 +1,7 @@
import os, sys, shlex
from PortageUtils import *
import subprocess as sp
+import time
class _Print:
def __init__(self, maxlevel=10):
@@ -78,6 +79,11 @@ try:
except ImportError, IndexError:
print_usage()
exit(1)
+
+#tmp = __import__(sys.argv[1], fromlist = ['Module'])
+#mod = tmp.Module(Print, libdir, sys.argv[3:])
+#del tmp
+#testsfname = sys.argv[2]
"""
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-06-10 1:02 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-06-10 1:02 UTC (permalink / raw
To: gentoo-commits
commit: 43def047ec2a4adcf7cc6fddd0c9459dfdbbe5cc
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Fri Jun 10 00:59:35 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Fri Jun 10 00:59:35 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=43def047
Two tiny corrections
---
blasbase.py | 1 -
main.py | 3 ++-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/blasbase.py b/blasbase.py
index 713ffcf..3335000 100644
--- a/blasbase.py
+++ b/blasbase.py
@@ -144,7 +144,6 @@ class ModuleBase:
for test in self.tests:
newresults[test] = {}
for nameimpl in results:
- print results[nameimpl]
nameimplstr = "%s/%s" % nameimpl
resdat = results[nameimpl][test]
newresults[test][nameimplstr] = resdat
diff --git a/main.py b/main.py
index 1ecb376..ee17fed 100644
--- a/main.py
+++ b/main.py
@@ -30,7 +30,8 @@ if os.getuid() == 0:
figdir = "/var/cache/benchmarks/results/"
else:
pkgsdir = os.environ['HOME'] + "/.benchmarks/packages/"
- figdir = os.environ['HOME'] + "/.benchmarks/results"
+ figdir = os.environ['HOME'] + "/.benchmarks/results/"
+figdir += time.strftime('%Y%m%d-%H%M') + '/'
rootsdir = "/var/tmp/benchmarks/roots/"
testsdir = "/var/tmp/benchmarks/tests/"
libdir = sp.Popen \
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-06-10 0:52 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-06-10 0:52 UTC (permalink / raw
To: gentoo-commits
commit: 71e3163c58a285bd61dd34f662d5e3674490f588
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Fri Jun 10 00:49:32 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Fri Jun 10 00:49:32 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=71e3163c
Initial work for reports.
---
blasbase.py | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++----
blastests.in | 6 +---
main.py | 9 ++++++-
3 files changed, 69 insertions(+), 11 deletions(-)
diff --git a/blasbase.py b/blasbase.py
index 1f8abb1..713ffcf 100644
--- a/blasbase.py
+++ b/blasbase.py
@@ -1,6 +1,8 @@
import os, shlex
import commands as cmd
import subprocess as sp
+import matplotlib.pyplot as plt
+import numpy as np
run_cmd = lambda c : sp.Popen(c, stdout=sp.PIPE).communicate()[0]
@@ -8,6 +10,8 @@ class ModuleBase:
def __init__(self, Print, libdir, args):
self.Print = Print
self.libdir = libdir
+ self.summary = False
+ self.summary_only = False
avail1 = ['axpy', 'axpby', 'rot']
avail2 = ['matrix_vector','atv','symv','syr2','ger','trisolve_vector']
@@ -15,6 +19,12 @@ class ModuleBase:
tests = []
for i in args:
+ if i == '-S':
+ self.summary_only = True
+ continue
+ if i == '-s':
+ self.summary = True
+ continue
if i == '1':
tests += avail1
continue
@@ -52,7 +62,10 @@ class ModuleBase:
if not runtests:
Print("Not testing: results exist")
- return files
+ results = {}
+ for i in self.tests:
+ results[i] = '%s/bench_%s_%s.dat' %(testdir, i, name)
+ return results
for i in files:
if os.path.exists(i): os.remove(i)
@@ -91,19 +104,20 @@ class ModuleBase:
cp.communicate()
if cp.returncode != 0:
raise Exception("Compilation failed: " + " ".join(cl))
- Print("Compilation successful: %s" % " ".join(cl))
+ Print("Compilation successful")
# Run test
args = [exe] + self.tests
proc = sp.Popen(args, bufsize=1, stdout=sp.PIPE, stderr=sp.PIPE,
cwd = testdir)
- results = []
+ results = {}
while True:
errline = proc.stderr.readline()
if not errline:
break
resfile = errline.split()[-1]
- results.append(resfile)
+ testname = resfile[6:-5-len(name)]
+ results[testname] = resfile
Print(resfile)
Print.down()
for i in xrange(100):
@@ -123,4 +137,45 @@ class ModuleBase:
os.environ[v] = oldenv[v]
elif os.environ.has_key(v):
del os.environ[v]
- return files
+ return results
+
+ def save_results(self, results, figdir):
+ newresults = {}
+ for test in self.tests:
+ newresults[test] = {}
+ for nameimpl in results:
+ print results[nameimpl]
+ nameimplstr = "%s/%s" % nameimpl
+ resdat = results[nameimpl][test]
+ newresults[test][nameimplstr] = resdat
+
+ if self.summary or self.summary_only:
+ # Save summary figure
+ sprows = (len(self.tests)+1)/2
+ plt.figure(figsize=(16,6*sprows), dpi=300)
+ for i, test in enumerate(self.tests, 1):
+ plt.subplot(sprows, 2, i)
+ plt.title(test)
+ for impl in newresults[test]:
+ x,y = np.loadtxt(newresults[test][impl], unpack=True)
+ plt.semilogx(x,y, label=impl, hold=True)
+ plt.legend(loc='best')
+ plt.grid(True)
+ fname = figdir+ '/summary.png'
+ plt.savefig(fname, format='png')
+ self.Print('Summary figure saved: ' + fname)
+
+ if not self.summary_only:
+ for test in self.tests:
+ plt.figure(figsize=(12,9), dpi=300)
+ plt.title(test)
+ for impl in newresults[test]:
+ x,y = np.loadtxt(newresults[test][impl], unpack=True)
+ plt.semilogx(x,y, label=impl, hold=True)
+ plt.legend(loc='best')
+ plt.grid(True)
+ fname = figdir + '/' + test + '.png'
+ plt.savefig(fname, format='png')
+ self.Print('Figure ' + fname + ' saved')
+
+
diff --git a/blastests.in b/blastests.in
index c9462e3..a5f5998 100644
--- a/blastests.in
+++ b/blastests.in
@@ -1,4 +1,2 @@
-abcde blas-reference-3.3.1-r1 FC=gfortran
-fghij dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O2'
-#klmno dev-cpp/eigen-3.0.0-r1 CXX=icpc CXXFLAGS='-O3'
-#pqrst sci-libs/blas-reference-3.3.1-r1 FC=ifort
+eigen-O2 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O2'
+eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O3'
diff --git a/main.py b/main.py
index 7b3c3a9..1ecb376 100644
--- a/main.py
+++ b/main.py
@@ -27,8 +27,10 @@ Print = _Print(2)
# Retrieve relevant directories
if os.getuid() == 0:
pkgsdir = "/var/cache/benchmarks/packages/"
+ figdir = "/var/cache/benchmarks/results/"
else:
pkgsdir = os.environ['HOME'] + "/.benchmarks/packages/"
+ figdir = os.environ['HOME'] + "/.benchmarks/results"
rootsdir = "/var/tmp/benchmarks/roots/"
testsdir = "/var/tmp/benchmarks/tests/"
libdir = sp.Popen \
@@ -178,10 +180,13 @@ for tn,(name,test) in enumerate(tests.items(),1):
print
+
+if not os.path.exists(figdir):
+ os.makedirs(figdir)
+
results = {}
for (name,test) in tests.items():
for impl in test['implementations']:
results[(name, impl)] = test['results'][impl]
-for r,rr in results.items():
- print r, rr
+mod.save_results(results, figdir)
^ permalink raw reply related [flat|nested] 25+ messages in thread
* [gentoo-commits] proj/auto-numerical-bench:master commit in: /
@ 2011-06-06 20:05 Andrea Arteaga
0 siblings, 0 replies; 25+ messages in thread
From: Andrea Arteaga @ 2011-06-06 20:05 UTC (permalink / raw
To: gentoo-commits
commit: e929ad6df4c9e9ce5656b5aa79b27e78ad13633d
Author: spiros <andyspiros <AT> gmail <DOT> com>
AuthorDate: Mon Jun 6 20:04:03 2011 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Mon Jun 6 20:04:03 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=e929ad6d
User input interface begin
---
PortageUtils.py | 2 +-
blas.py | 4 +-
main.py | 87 +++++++++++++++++++++++++++++++++++++++----------------
3 files changed, 65 insertions(+), 28 deletions(-)
diff --git a/PortageUtils.py b/PortageUtils.py
index 1cb1521..c27dc79 100644
--- a/PortageUtils.py
+++ b/PortageUtils.py
@@ -14,7 +14,7 @@ def available_packages(pattern):
every matching pattern in the portage tree and installed overlays.
"""
return [portage.catpkgsplit(l) \
- for l in cmd.getoutput('equery -q list -p -e ' + pattern).split()]
+ for l in cmd.getoutput('equery -q list -po ' + pattern).split()]
def install_package(package, env={}, root='/', pkgdir='usr/portage/packages'):
diff --git a/blas.py b/blas.py
index 88ebe90..2cf1ec8 100644
--- a/blas.py
+++ b/blas.py
@@ -23,8 +23,8 @@ class Module:
'syr2', 'ger', 'rot', 'matrix_matrix', 'aat',
'trisolve_vector', 'trisolve_matrix', 'trmm')]
- # Create dir. If alls results already exist use them, otherwise
- # remove old results
+ # Create dir. If all results already exist use them, otherwise
+ # remove old results
runtests = False
if os.path.exists(testdir):
runtests = all([os.path.exists(i) for i in files])
diff --git a/main.py b/main.py
index dcd0488..5f2f0d3 100644
--- a/main.py
+++ b/main.py
@@ -1,4 +1,4 @@
-import os, sys
+import os, sys, shlex
import commands as cmd
from PortageUtils import *
@@ -37,6 +37,22 @@ def print_usage():
print "Usage: benchmarks [blas|cblas|lapack]"
+def tests_from_input(input):
+ tests = {}
+ for line in input.split('\n'):
+ line = line.strip()
+ spl = shlex.split(line)
+ if len(spl) < 2:
+ continue
+ package = available_packages(spl[1])
+ env = {}
+ for var in spl[2:]:
+ s = var.split('=')
+ env[s[0]] = s[1]
+ tests[spl[0]] = {'package' : package , 'env' : env}
+ return tests
+
+
# Import the desired module or print help and exit
try:
tmp = __import__(sys.argv[1], fromlist = ['Module'])
@@ -61,27 +77,45 @@ used at compile-time as dictionary (it can just be a void one).
After the tests every successful tested item will contain the item "result",
which can contain any type of data and will be used for the final report.
"""
-tests = {
- "abcde" : {
- "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
- "env" : {'FC' : 'gfortran'}
- },
-
- "fghij" : {
- "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'),
- "env" : {'CXX' : 'gcc', 'CXXFLAGS' : '-O2'}
- },
-
+#tests = {
+# "abcde" : {
+# "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
+# "env" : {'FC' : 'gfortran'}
+# },
+#
+# "fghij" : {
+# "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'),
+# "env" : {'CXX' : 'gcc', 'CXXFLAGS' : '-O2'}
+# },
+#
# "klmno" : {
# "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'),
# "env" : {'CXX' : 'icc', 'CXXFLAGS' : '-O3'}
# },
+#
+# "pqrst" : {
+# "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
+# "env" : {'FC' : 'ifort'}
+# }
+#}
- "pqrst" : {
- "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'),
- "env" : {'FC' : 'ifort'}
- }
-}
+
+"""
+The test variable is generated from a string which can be read from input.
+Here is an example of the parsed input.
+Every line contains a configuration and will be an entry in the tests
+dictionary; the line has to contain:
+- an identification string
+- a package description, which can, but does not must to, contain a version
+- a list of environment variables separated by means of spaces
+"""
+input = '''
+abcde blas-reference-3.3.1-r1 FC=gfortran
+fghij dev-cpp/eigen-3.0.0-r1 CXX=gcc CXXFLAGS='-O2'
+klmno dev-cpp/eigen-3.0.0-r1 CXX=icc CXXFLAGS='-O3'
+pqrst sci-libs/blas-reference-3.3.1-r1 FC=ifort
+'''
+tests = tests_from_input(input)
for tn,(name,test) in enumerate(tests.items(),1):
Print("BEGIN TEST %i" % tn)
@@ -93,14 +127,17 @@ for tn,(name,test) in enumerate(tests.items(),1):
Print.down()
package = "%s/%s-%s-%s" % test['package']
Print("Emerging package %s" % package)
- try:
- install_package( \
- test['package'], env=test['env'], root=root, pkgdir=pkgdir)
- except InstallException as e:
- Print("Package %s failed to emerge: %s" % (package, e.command))
- Print.up()
- print
- continue
+ if os.exists(pkgdir+package+".tbz2"):
+ Print("Package already emerged - skipping")
+ else:
+ try:
+ install_package( \
+ test['package'], env=test['env'], root=root, pkgdir=pkgdir)
+ except InstallException as e:
+ Print("Package %s failed to emerge: %s" % (package, e.command))
+ Print.up()
+ print
+ continue
Print("Package emerged")
# Find implementations
^ permalink raw reply related [flat|nested] 25+ messages in thread
end of thread, other threads:[~2012-09-02 11:42 UTC | newest]
Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 18:15 [gentoo-commits] proj/auto-numerical-bench:master commit in: / Andrea Arteaga
2011-08-22 18:21 ` [gentoo-commits] proj/auto-numerical-bench:0.1 " Andrea Arteaga
-- strict thread matches above, loose matches on Subject: below --
2012-09-02 11:41 [gentoo-commits] proj/auto-numerical-bench:master " Andrea Arteaga
2012-08-11 18:00 Andrea Arteaga
2012-08-04 1:11 Andrea Arteaga
2012-04-09 22:58 Andrea Arteaga
2012-03-05 15:48 Andrea Arteaga
2012-02-28 19:20 Andrea Arteaga
2012-02-24 17:22 Andrea Arteaga
2011-08-16 23:38 Andrea Arteaga
2011-08-15 21:57 Andrea Arteaga
2011-08-14 12:59 Andrea Arteaga
2011-08-14 12:35 Andrea Arteaga
2011-08-12 22:56 Andrea Arteaga
2011-08-09 0:00 Andrea Arteaga
2011-08-09 0:00 Andrea Arteaga
2011-07-17 0:21 Andrea Arteaga
2011-07-13 21:48 Andrea Arteaga
2011-06-15 23:25 Andrea Arteaga
2011-06-15 12:56 Andrea Arteaga
2011-06-13 23:53 Andrea Arteaga
2011-06-13 14:12 Andrea Arteaga
2011-06-10 1:02 Andrea Arteaga
2011-06-10 0:52 Andrea Arteaga
2011-06-06 20:05 Andrea Arteaga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox