aboutsummaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authormaho <maho@FreeBSD.org>2007-01-04 14:08:43 +0800
committermaho <maho@FreeBSD.org>2007-01-04 14:08:43 +0800
commit47c2bd1b68183cff64b028982b5f2adfe24b916f (patch)
tree2970d104e818e6c249353bdcb930a48abd86ddb0 /benchmarks
parent1b0b9fc13fbbc917d1efb7470a718f17afce142f (diff)
downloadfreebsd-ports-gnome-47c2bd1b68183cff64b028982b5f2adfe24b916f.tar.gz
freebsd-ports-gnome-47c2bd1b68183cff64b028982b5f2adfe24b916f.tar.zst
freebsd-ports-gnome-47c2bd1b68183cff64b028982b5f2adfe24b916f.zip
* Migrate to gfortran42.
* Add file/run_benchmark to do benchmark with different compilers. * portlint.
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/himenobench/Makefile72
-rw-r--r--benchmarks/himenobench/files/run_benchmark24
-rw-r--r--benchmarks/himenobench/pkg-plist2
3 files changed, 68 insertions, 30 deletions
diff --git a/benchmarks/himenobench/Makefile b/benchmarks/himenobench/Makefile
index f105aa3f2371..62c7bfe6d0da 100644
--- a/benchmarks/himenobench/Makefile
+++ b/benchmarks/himenobench/Makefile
@@ -24,15 +24,15 @@ BUILD_DEPENDS= ${LOCALBASE}/intel_fc_80/bin/ifort:${PORTSDIR}/lang/ifc
.endif
EXTRACT_DEPENDS= lha:${PORTSDIR}/archivers/lha
-RESTRICTED= "unsure to redistribute"
+#use gfortran
+USE_GCC?=4.2+
+GCCVER:= ${USE_GCC:S/+//}
+
+RESTRICTED= unsure to redistribute
.if defined(WITH_OPTIMIZED_FLAGS)
-FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations
-CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations
-.if (${MACHINE_ARCH} == "i386" && !${MACHINE_ARCH}== "amd64")
-FFLAGS+= -mfancy-math-387 -mpreferred-stack-boundary=3 -malign-double
-CFLAGS+= -mfancy-math-387 -mpreferred-stack-boundary=3 -malign-double
-.endif # i386
+FFLAGS+= -O2 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations
+CFLAGS+= -O2 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations
.endif
.if defined(WITH_ICC)
@@ -50,40 +50,52 @@ PLIST_SUB+= WITH_IFC=""
PLIST_SUB+= WITH_IFC="@comment "
.endif
+.if ${GCCVER} < 4.2
+PLIST_SUB+= WITH_GFORTRAN="@comment "
+.else
+PLIST_SUB+= WITH_GFORTRAN=""
+.endif
+
do-extract:
@${MKDIR} ${WRKSRC}
@for i in ${DISTFILES}; do \
- cd ${WRKSRC} ; lha x ${DISTDIR}/${DIST_SUBDIR}/$$i; \
+ cd ${WRKSRC} ; lha xf ${DISTDIR}/${DIST_SUBDIR}/$$i; \
done
do-build:
-# @cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_xl himenobmtxp_xl.f #Too large
-# @cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_l himenobmtxp_l.f
- @cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_m himenobmtxp_m.f
- @cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_s himenobmtxp_s.f
-# @cd ${WRKSRC} ; ${CC} ${CFLAGS} -DELARGE -o himenobmtxps_xl himenobmtxps.c #Too large
- @cd ${WRKSRC} ; ${CC} ${CFLAGS} -DLARGE -o himenobmtxps_l himenobmtxps.c
- @cd ${WRKSRC} ; ${CC} ${CFLAGS} -DMIDDLE -o himenobmtxps_m himenobmtxps.c
- @cd ${WRKSRC} ; ${CC} ${CFLAGS} -DSMALL -o himenobmtxps_s himenobmtxps.c
- @cd ${WRKSRC} ; ${CC} ${CFLAGS} -DSSMALL -o himenobmtxps_ss himenobmtxps.c
- @cd ${WRKSRC} ; ${CC} ${CFLAGS} -o himenobmtxpa himenobmtxpa.c
+.if ${GCCVER} >= 4.2
+ cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp himenobmtxp.f90
+.endif
+# cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_xl himenobmtxp_xl.f #Too large
+ cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_l himenobmtxp_l.f
+ cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_m himenobmtxp_m.f
+ cd ${WRKSRC} ; ${FC} ${FFLAGS} -o himenobmtxp_s himenobmtxp_s.f
+# cd ${WRKSRC} ; ${CC} ${CFLAGS} -DELARGE -o himenobmtxps_xl himenobmtxps.c #Too large
+ cd ${WRKSRC} ; ${CC} ${CFLAGS} -DLARGE -o himenobmtxps_l himenobmtxps.c
+ cd ${WRKSRC} ; ${CC} ${CFLAGS} -DMIDDLE -o himenobmtxps_m himenobmtxps.c
+ cd ${WRKSRC} ; ${CC} ${CFLAGS} -DSMALL -o himenobmtxps_s himenobmtxps.c
+ cd ${WRKSRC} ; ${CC} ${CFLAGS} -DSSMALL -o himenobmtxps_ss himenobmtxps.c
+ cd ${WRKSRC} ; ${CC} ${CFLAGS} -o himenobmtxpa himenobmtxpa.c
.if defined(WITH_IFC)
-# @cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_xl.ifc himenobmtxp_xl.f #Too large
- @cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_l.ifc himenobmtxp_l.f
- @cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_m.ifc himenobmtxp_m.f
- @cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_s.ifc himenobmtxp_s.f
- @cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp.ifc himenobmtxp.f90
+# cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_xl.ifc himenobmtxp_xl.f #Too large
+ cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_l.ifc himenobmtxp_l.f
+ cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_m.ifc himenobmtxp_m.f
+ cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp_s.ifc himenobmtxp_s.f
+ cd ${WRKSRC} ; ${IFC} ${FFLAGS_IFC} -o himenobmtxp.ifc himenobmtxp.f90
.endif
.if defined(WITH_ICC)
-# @cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DELARGE -o himenobmtxps_xl.icc himenobmtxps.c #Too large
- @cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DLARGE -o himenobmtxps_l.icc himenobmtxps.c
- @cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DMIDDLE -o himenobmtxps_m.icc himenobmtxps.c
- @cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DSMALL -o himenobmtxps_s.icc himenobmtxps.c
- @cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DSSMALL -o himenobmtxps_ss.icc himenobmtxps.c
- @cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -o himenobmtxpa.icc himenobmtxpa.c
+# cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DELARGE -o himenobmtxps_xl.icc himenobmtxps.c #Too large
+ cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DLARGE -o himenobmtxps_l.icc himenobmtxps.c
+ cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DMIDDLE -o himenobmtxps_m.icc himenobmtxps.c
+ cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DSMALL -o himenobmtxps_s.icc himenobmtxps.c
+ cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -DSSMALL -o himenobmtxps_ss.icc himenobmtxps.c
+ cd ${WRKSRC} ; ${ICC} ${CFLAGS_ICC} -o himenobmtxpa.icc himenobmtxpa.c
.endif
do-install:
# ${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_xl ${PREFIX}/bin #Too large
-# @${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_l ${PREFIX}/bin#Too large
+.if ${GCCVER} >= 4.2
+ @${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp ${PREFIX}/bin
+.endif
+ @${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_l ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_m ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxp_s ${PREFIX}/bin
@${INSTALL_PROGRAM} ${WRKSRC}/himenobmtxpa ${PREFIX}/bin
diff --git a/benchmarks/himenobench/files/run_benchmark b/benchmarks/himenobench/files/run_benchmark
new file mode 100644
index 000000000000..78ae90155389
--- /dev/null
+++ b/benchmarks/himenobench/files/run_benchmark
@@ -0,0 +1,24 @@
+make deinstall clean package ; mv himenobench-2004.08.16.tbz himenobench-2004.08.16-gcc42.tbz
+make -DWITH_OPTIMIZED_FLAGS deinstall clean package ; mv himenobench-2004.08.16.tbz himenobench-2004.08.16-gcc42-opt.tbz
+make USE_GCC=3.2+ deinstall clean package ; mv himenobench-2004.08.16.tbz himenobench-2004.08.16-gcc34.tbz
+make USE_GCC=3.2+ -DWITH_OPTIMIZED_FLAGS deinstall clean package ; mv himenobench-2004.08.16.tbz himenobench-2004.08.16-gcc34-opt.tbz
+pkg_delete himenobench-2004.08.16 ; pkg_add himenobench-2004.08.16-gcc34-opt.tbz
+echo g77-34opt
+himenobmtxp_m
+echo gcc34opt
+himenobmtxps_m
+pkg_delete himenobench-2004.08.16 ; pkg_add himenobench-2004.08.16-gcc34.tbz
+echo g77-34
+himenobmtxp_m
+echo gcc34
+himenobmtxps_m
+pkg_delete himenobench-2004.08.16 ; pkg_add himenobench-2004.08.16-gcc42-opt.tbz
+echo gfortran42opt
+himenobmtxp_m
+echo gcc42opt
+himenobmtxps_m
+pkg_delete himenobench-2004.08.16 ; pkg_add himenobench-2004.08.16-gcc42.tbz
+echo gfortran42
+himenobmtxp_m
+echo gcc42
+himenobmtxps_m
diff --git a/benchmarks/himenobench/pkg-plist b/benchmarks/himenobench/pkg-plist
index 3a7362beaf0a..2cc20e123aa5 100644
--- a/benchmarks/himenobench/pkg-plist
+++ b/benchmarks/himenobench/pkg-plist
@@ -1,3 +1,5 @@
+%%WITH_GFORTRAN%%bin/himenobmtxp
+bin/himenobmtxp_l
bin/himenobmtxp_m
bin/himenobmtxp_s
bin/himenobmtxpa