Re: [Autotest] [PATCH] Adding NAS Parallel Benchmarks(NPB) as client test [1/2] V2

2009-10-05 Thread Lucas Meneghel Rodrigues
First of all, thanks for this client side module Chen. I believe it
might be interesting for quite a lot of people doing performance
testing.

Here are my remarks found during the review of your code:

On Mon, Sep 21, 2009 at 7:01 AM, Cao, Chen k...@redhat.com wrote:
 - Using NPB OpenMP implementaion.

 Changes from the original patch:
 Remove the variant 'extra_params += smp 2', and add a restriction
 (no autotest.npb) under variant 'up', according to mgoldish's advice.
 Nevertheless, user can run this test with smp=1, if he/she wants to.

 Signed-off-by: Cao, Chen k...@redhat.com
 ---
  client/tests/kvm/kvm_tests.cfg.sample   |    4 +
  client/tests/npb/control                |   28 
  client/tests/npb/enable-all-tests.patch |  233 
 +++
  client/tests/npb/npb.py                 |   95 +
  4 files changed, 360 insertions(+), 0 deletions(-)
  create mode 100644 client/tests/npb/control
  create mode 100644 client/tests/npb/enable-all-tests.patch
  create mode 100644 client/tests/npb/npb.py

 diff --git a/client/tests/kvm/kvm_tests.cfg.sample 
 b/client/tests/kvm/kvm_tests.cfg.sample
 index 285a38f..b03b7cd 100644
 --- a/client/tests/kvm/kvm_tests.cfg.sample
 +++ b/client/tests/kvm/kvm_tests.cfg.sample
 @@ -90,6 +90,9 @@ variants:
             - disktest:
                 test_name = disktest
                 test_control_file = disktest.control
 +            - npb:
 +                test_name = npb
 +                test_control_file = npb.control

     - linux_s3:     install setup
         type = linux_s3
 @@ -567,6 +570,7 @@ linux_s3:

  variants:
     - @up:
 +        no autotest.npb
     - smp2:
         extra_params +=  -smp 2

 diff --git a/client/tests/npb/control b/client/tests/npb/control
 new file mode 100644
 index 000..d6c2adb
 --- /dev/null
 +++ b/client/tests/npb/control
 @@ -0,0 +1,28 @@
 +NAME = NAS Parallel Benchmarks
 +AUTHOR = Cao, Chen k...@redhat.com
 +TEST_TYPE = CLIENT
 +TEST_CLASS = HARDWARE
 +TEST_CATEGORY = BENCHMARK
 +TIME = MEDIUM
 +DOC = \
 +Using NPB, OpenMP implementation.
 +
 +See http://www.nas.nasa.gov/Software/NPB/
 +
 +
 +# Supported tests (benchmarks):
 +#   bt.A bt.B bt.C bt.D bt.E bt.S bt.W
 +#   cg.A cg.B cg.C cg.S cg.W
 +#   dc.A dc.B dc.S dc.W
 +#   ep.A ep.B ep.C ep.D ep.E ep.S ep.W
 +#   ft.A ft.B ft.S ft.W
 +#   is.A is.B is.C is.S is.W
 +#   lu.A lu.B lu.C lu.S lu.W
 +#   mg.A mg.B mg.S mg.W
 +#   sp.A sp.B sp.C sp.D sp.E sp.S sp.W
 +#   ua.A ua.B ua.C ua.S ua.W
 +#
 +# Please refer to npb.py for more infomation about
 +# the arguments.
 +job.run_test(url='npb', tests='ep.A ep.B', ratio=0.5)
 +
 diff --git a/client/tests/npb/enable-all-tests.patch 
 b/client/tests/npb/enable-all-tests.patch
 new file mode 100644
 index 000..f08a9d3
 --- /dev/null
 +++ b/client/tests/npb/enable-all-tests.patch
 @@ -0,0 +1,233 @@
 +diff --git a/NPB3.3-OMP/config/make.def b/NPB3.3-OMP/config/make.def
 +new file mode 100644
 +index 000..afffe7d
 +--- /dev/null
  b/NPB3.3-OMP/config/make.def
 +@@ -0,0 +1,161 @@
 ++#---
 ++#
 ++#                SITE- AND/OR PLATFORM-SPECIFIC DEFINITIONS.
 ++#
 ++#---
 ++
 ++#---
 ++# Items in this file will need to be changed for each platform.
 ++#---
 ++
 ++#---
 ++# Parallel Fortran:
 ++#
 ++# For CG, EP, FT, MG, LU, SP, BT and UA, which are in Fortran, the following
 ++# must be defined:
 ++#
 ++# F77        - Fortran compiler
 ++# FFLAGS     - Fortran compilation arguments
 ++# F_INC      - any -I arguments required for compiling Fortran
 ++# FLINK      - Fortran linker
 ++# FLINKFLAGS - Fortran linker arguments
 ++# F_LIB      - any -L and -l arguments required for linking Fortran
 ++#
 ++# compilations are done with $(F77) $(F_INC) $(FFLAGS) or
 ++#                            $(F77) $(FFLAGS)
 ++# linking is done with       $(FLINK) $(F_LIB) $(FLINKFLAGS)
 ++#---
 ++
 ++#---
 ++# This is the fortran compiler used for Fortran programs
 ++#---
 ++F77 = gfortran
 ++# This links fortran programs; usually the same as ${F77}
 ++FLINK = $(F77)
 ++
 ++#---
 ++# These macros are passed to the linker
 ++#---
 ++F_LIB  =
 ++
 ++#---
 ++# These macros are passed to the compiler
 

[PATCH] Adding NAS Parallel Benchmarks(NPB) as client test [1/2] V2

2009-09-21 Thread Cao, Chen
- Using NPB OpenMP implementaion.

Changes from the original patch:
Remove the variant 'extra_params += smp 2', and add a restriction
(no autotest.npb) under variant 'up', according to mgoldish's advice.
Nevertheless, user can run this test with smp=1, if he/she wants to.

Signed-off-by: Cao, Chen k...@redhat.com
---
 client/tests/kvm/kvm_tests.cfg.sample   |4 +
 client/tests/npb/control|   28 
 client/tests/npb/enable-all-tests.patch |  233 +++
 client/tests/npb/npb.py |   95 +
 4 files changed, 360 insertions(+), 0 deletions(-)
 create mode 100644 client/tests/npb/control
 create mode 100644 client/tests/npb/enable-all-tests.patch
 create mode 100644 client/tests/npb/npb.py

diff --git a/client/tests/kvm/kvm_tests.cfg.sample 
b/client/tests/kvm/kvm_tests.cfg.sample
index 285a38f..b03b7cd 100644
--- a/client/tests/kvm/kvm_tests.cfg.sample
+++ b/client/tests/kvm/kvm_tests.cfg.sample
@@ -90,6 +90,9 @@ variants:
 - disktest:
 test_name = disktest
 test_control_file = disktest.control
+- npb:
+test_name = npb
+test_control_file = npb.control
 
 - linux_s3: install setup
 type = linux_s3
@@ -567,6 +570,7 @@ linux_s3:
 
 variants:
 - @up:
+no autotest.npb
 - smp2:
 extra_params +=  -smp 2
 
diff --git a/client/tests/npb/control b/client/tests/npb/control
new file mode 100644
index 000..d6c2adb
--- /dev/null
+++ b/client/tests/npb/control
@@ -0,0 +1,28 @@
+NAME = NAS Parallel Benchmarks
+AUTHOR = Cao, Chen k...@redhat.com
+TEST_TYPE = CLIENT
+TEST_CLASS = HARDWARE
+TEST_CATEGORY = BENCHMARK
+TIME = MEDIUM
+DOC = \
+Using NPB, OpenMP implementation.
+
+See http://www.nas.nasa.gov/Software/NPB/
+
+
+# Supported tests (benchmarks):
+#   bt.A bt.B bt.C bt.D bt.E bt.S bt.W
+#   cg.A cg.B cg.C cg.S cg.W
+#   dc.A dc.B dc.S dc.W
+#   ep.A ep.B ep.C ep.D ep.E ep.S ep.W
+#   ft.A ft.B ft.S ft.W
+#   is.A is.B is.C is.S is.W
+#   lu.A lu.B lu.C lu.S lu.W
+#   mg.A mg.B mg.S mg.W
+#   sp.A sp.B sp.C sp.D sp.E sp.S sp.W
+#   ua.A ua.B ua.C ua.S ua.W
+#
+# Please refer to npb.py for more infomation about
+# the arguments.
+job.run_test(url='npb', tests='ep.A ep.B', ratio=0.5)
+
diff --git a/client/tests/npb/enable-all-tests.patch 
b/client/tests/npb/enable-all-tests.patch
new file mode 100644
index 000..f08a9d3
--- /dev/null
+++ b/client/tests/npb/enable-all-tests.patch
@@ -0,0 +1,233 @@
+diff --git a/NPB3.3-OMP/config/make.def b/NPB3.3-OMP/config/make.def
+new file mode 100644
+index 000..afffe7d
+--- /dev/null
 b/NPB3.3-OMP/config/make.def
+@@ -0,0 +1,161 @@
++#---
++#
++#SITE- AND/OR PLATFORM-SPECIFIC DEFINITIONS. 
++#
++#---
++
++#---
++# Items in this file will need to be changed for each platform.
++#---
++
++#---
++# Parallel Fortran:
++#
++# For CG, EP, FT, MG, LU, SP, BT and UA, which are in Fortran, the following 
++# must be defined:
++#
++# F77- Fortran compiler
++# FFLAGS - Fortran compilation arguments
++# F_INC  - any -I arguments required for compiling Fortran 
++# FLINK  - Fortran linker
++# FLINKFLAGS - Fortran linker arguments
++# F_LIB  - any -L and -l arguments required for linking Fortran 
++# 
++# compilations are done with $(F77) $(F_INC) $(FFLAGS) or
++#$(F77) $(FFLAGS)
++# linking is done with   $(FLINK) $(F_LIB) $(FLINKFLAGS)
++#---
++
++#---
++# This is the fortran compiler used for Fortran programs
++#---
++F77 = gfortran
++# This links fortran programs; usually the same as ${F77}
++FLINK = $(F77)
++
++#---
++# These macros are passed to the linker 
++#---
++F_LIB  =
++
++#---
++# These macros are passed to the compiler 
++#---
++F_INC =
++
++#---
++# Global *compile time* flags for Fortran programs
++#---
++FFLAGS= -O -fopenmp 
++
++#---