#! /bin/bash

# Processor: Intel Core 2 Quad Q6600, 2.4 GHz, 2*4MB L2 Cache
# Board / Chipset: Intel DP956LTCK / 956P
# Memory: 2 GB DDR2-400 in two 1 GB DIMMs 

#uname -a gives
# Linux kriecher 2.6.18.8-0.1-default #1 SMP Fri Mar 2 13:51:59 UTC 2007 i686 i686 i386 GNU/Linux

# icc -V gives
#Intel(R) C Compiler for 32-bit applications, Version 9.1    Build 20070109Z Package ID: l_cc_c_9.1.046
#Copyright (C) 1985-2007 Intel Corporation.  All rights reserved.

# -fast results in processor specific optimizations
icc -fast stream.c -o stream-single
icc -fast -openmp stream.c -o stream-openmp

./stream-single >stream-single.txt 2>&1

for OMP_NUM_THREADS in 1 2 3 4 ; do
    export OMP_NUM_THREADS
    ./stream-openmp >stream-openmp-${OMP_NUM_THREADS}.txt 2>&1
done
