Index: test-suite/trunk/MultiSource/Benchmarks/Rodinia/CMakeLists.txt =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/Rodinia/CMakeLists.txt +++ test-suite/trunk/MultiSource/Benchmarks/Rodinia/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(hotspot) Index: test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/CMakeLists.txt =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/CMakeLists.txt +++ test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/CMakeLists.txt @@ -0,0 +1,7 @@ +set(PROG hotspot) +set(FP_ABSTOLERANCE 0.00001) +list(APPEND CFLAGS -I${CMAKE_CURRENT_SOURCE_DIR}/../Common) +set(Source hotspotKernel.c main.c ../Common/glibc_compat_rand.c) +set(WORKDIR ${CMAKE_CURRENT_BINARY_DIR}) + +llvm_multisource() Index: test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/Makefile =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/Makefile +++ test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/Makefile @@ -0,0 +1,8 @@ +LEVEL = ../../../.. +LIBS += -lm +LDFLAGS += -lm +PROG = hotspot + +FP_ABSTOLERANCE := 0.00001 + +include ../../Makefile.multisrc Index: test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspot.h =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspot.h +++ test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspot.h @@ -0,0 +1,23 @@ +#ifndef __HOTSPOT_H_ +#define __HOTSPOT_H_ + +#define STR_SIZE 256 + +/* maximum power density possible (say 300W for a 10mm x 10mm chip) */ +#define MAX_PD (3.0e6) +/* required precision in degrees */ +#define PRECISION 0.001 +#define SPEC_HEAT_SI 1.75e6 +#define K_SI 100 +/* capacitance fitting factor */ +#define FACTOR_CHIP 0.5 + +// Run Options +#define grid_rows 512 +#define grid_cols 512 +#define num_iterations 200 // sim_time in original hotspot + +// seed for random number generator +#define SEED 7 + +#endif /* __HOTSPOT_H_ */ \ No newline at end of file Index: test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspot.reference_output =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspot.reference_output +++ test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspot.reference_output @@ -0,0 +1,2623 @@ +311.556 +311.558 +311.545 +311.559 +311.557 +311.557 +306.415 +306.416 +306.414 +306.412 +306.415 +296.949 +296.951 +296.947 +296.953 +296.95 +284.475 +284.473 +284.475 +284.471 +284.483 +270.366 +270.369 +270.371 +270.369 +270.368 +255.743 +255.739 +255.742 +255.74 +255.74 +241.374 +241.375 +241.376 +241.374 +241.372 +227.871 +227.869 +227.869 +227.867 +227.871 +215.827 +215.827 +215.826 +215.83 +215.828 +215.828 +205.924 +205.92 +205.919 +205.92 +205.923 +198.767 +198.766 +198.765 +198.769 +198.771 +194.723 +194.724 +194.728 +194.726 +194.729 +193.69 +193.688 +193.686 +193.69 +193.69 +195.082 +195.081 +195.083 +195.082 +195.086 +198.015 +198.009 +198.008 +198.011 +198.01 +201.54 +201.532 +201.538 +201.538 +201.541 +205.092 +205.097 +205.098 +205.102 +205.097 +205.102 +208.769 +208.766 +208.768 +208.766 +208.774 +213.339 +213.335 +213.338 +213.335 +213.341 +220.044 +220.036 +220.042 +220.04 +220.042 +230.009 +230.012 +230.012 +230.014 +230.012 +243.696 +243.701 +243.69 +243.699 +243.695 +260.478 +260.481 +260.474 +260.478 +260.477 +278.642 +278.635 +278.641 +278.637 +278.637 +295.756 +295.75 +295.75 +295.755 +295.755 +309.283 +309.274 +309.276 +309.276 +309.276 +309.277 +317.153 +317.154 +317.149 +317.153 +317.149 +318.228 +318.221 +318.231 +318.225 +318.227 +312.427 +312.429 +312.429 +312.432 +312.423 +300.712 +300.711 +300.711 +300.716 +300.713 +284.811 +284.814 +284.812 +284.815 +284.813 +266.95 +266.945 +266.945 +266.944 +266.943 +249.439 +249.433 +249.436 +249.432 +249.437 +234.389 +234.385 +234.385 +234.379 +234.392 +234.386 +223.366 +223.373 +223.366 +223.362 +223.366 +217.195 +217.201 +217.196 +217.197 +217.194 +215.823 +215.821 +215.822 +215.824 +215.822 +218.404 +218.41 +218.403 +218.407 +218.407 +223.58 +223.584 +223.58 +223.578 +223.577 +229.94 +229.935 +229.934 +229.931 +229.939 +236.513 +236.514 +236.519 +236.513 +236.517 +243.107 +243.103 +243.103 +243.104 +243.106 +243.109 +250.131 +250.138 +250.13 +250.133 +250.135 +258.163 +258.172 +258.168 +258.165 +258.168 +267.291 +267.289 +267.29 +267.289 +267.294 +276.686 +276.682 +276.689 +276.689 +276.686 +284.786 +284.788 +284.788 +284.789 +284.788 +289.86 +289.863 +289.863 +289.859 +289.865 +290.787 +290.784 +290.784 +290.781 +290.783 +287.6 +287.596 +287.607 +287.602 +287.597 +281.598 +281.597 +281.598 +281.594 +281.594 +281.6 +274.881 +274.885 +274.879 +274.886 +274.886 +269.681 +269.686 +269.686 +269.682 +269.686 +267.592 +267.594 +267.596 +267.599 +267.596 +269.1 +269.102 +269.097 +269.1 +269.104 +273.481 +273.479 +273.481 +273.477 +273.482 +279.114 +279.112 +279.11 +279.111 +279.112 +284.068 +284.07 +284.076 +284.071 +284.075 +286.826 +286.825 +286.828 +286.83 +286.824 +286.825 +286.717 +286.72 +286.717 +286.72 +286.721 +284.145 +284.144 +284.148 +284.143 +284.149 +280.373 +280.377 +280.374 +280.371 +280.375 +277.078 +277.077 +277.077 +277.084 +277.08 +275.796 +275.803 +275.796 +275.802 +275.792 +277.41 +277.415 +277.409 +277.414 +277.413 +281.872 +281.878 +281.872 +281.876 +281.877 +288.225 +288.23 +288.226 +288.228 +288.225 +288.224 +294.907 +294.91 +294.913 +294.91 +294.911 +300.256 +300.259 +300.262 +300.26 +300.261 +303.042 +303.038 +303.032 +303.036 +303.035 +302.748 +302.748 +302.748 +302.751 +302.75 +299.689 +299.695 +299.693 +299.699 +299.693 +294.727 +294.731 +294.726 +294.729 +294.728 +288.92 +288.927 +288.92 +288.923 +288.927 +283.254 +283.25 +283.256 +283.256 +283.253 +278.402 +278.401 +278.404 +278.405 +278.405 +278.408 +274.731 +274.731 +274.732 +274.731 +274.731 +272.292 +272.294 +272.296 +272.298 +272.294 +270.854 +270.855 +270.858 +270.86 +270.857 +269.905 +269.913 +269.912 +269.912 +269.913 +268.738 +268.737 +268.731 +268.734 +268.737 +266.587 +266.588 +266.588 +266.588 +266.589 +262.981 +262.976 +262.986 +262.977 +262.98 +257.912 +257.908 +257.908 +257.909 +257.911 +257.913 +251.938 +251.937 +251.933 +251.936 +251.937 +246.025 +246.03 +246.031 +246.03 +246.028 +241.226 +241.223 +241.223 +241.222 +241.225 +238.26 +238.263 +238.265 +238.258 +238.255 +237.393 +237.391 +237.391 +237.388 +237.391 +238.411 +238.406 +238.412 +238.409 +238.408 +240.849 +240.853 +240.856 +240.853 +240.851 +244.195 +244.194 +244.197 +244.196 +244.193 +244.194 +247.947 +247.948 +247.949 +247.947 +247.953 +251.606 +251.596 +251.595 +251.601 +251.6 +254.483 +254.488 +254.485 +254.488 +254.487 +255.769 +255.765 +255.769 +255.773 +255.77 +254.573 +254.581 +254.578 +254.572 +254.577 +250.263 +250.262 +250.266 +250.269 +250.255 +242.769 +242.766 +242.769 +242.769 +242.769 +232.78 +232.782 +232.786 +232.789 +232.781 +221.74 +221.74 +221.743 +221.745 +221.745 +221.745 +211.526 +211.528 +211.529 +211.53 +211.527 +203.993 +203.994 +203.996 +204 +203.993 +200.471 +200.469 +200.475 +200.474 +200.473 +201.399 +201.395 +201.406 +201.4 +201.403 +206.222 +206.226 +206.228 +206.226 +206.225 +213.582 +213.578 +213.584 +213.586 +213.584 +221.705 +221.7 +221.707 +221.702 +221.703 +228.972 +228.969 +228.972 +228.978 +228.971 +228.976 +234.432 +234.438 +234.431 +234.43 +234.44 +238.081 +238.087 +238.086 +238.086 +238.086 +240.829 +240.823 +240.817 +240.823 +240.824 +244.073 +244.076 +244.079 +244.076 +244.075 +249.154 +249.161 +249.163 +249.152 +249.157 +256.693 +256.691 +256.691 +256.689 +256.697 +266.289 +266.291 +266.289 +266.288 +266.287 +276.661 +276.657 +276.658 +276.662 +276.662 +276.659 +286.101 +286.099 +286.101 +286.101 +286.105 +293.132 +293.131 +293.136 +293.133 +293.133 +297.021 +297.021 +297.023 +297.016 +297.017 +297.954 +297.957 +297.951 +297.954 +297.953 +296.853 +296.86 +296.859 +296.855 +296.858 +294.91 +294.917 +294.912 +294.909 +294.909 +293.091 +293.096 +293.097 +293.09 +293.09 +291.824 +291.828 +291.829 +291.83 +291.828 +290.997 +291.001 +290.997 +290.997 +290.993 +290.998 +290.212 +290.21 +290.213 +290.208 +290.208 +289.141 +289.139 +289.142 +289.135 +289.139 +287.743 +287.741 +287.74 +287.741 +287.738 +286.184 +286.188 +286.187 +286.189 +286.187 +284.588 +284.593 +284.598 +284.586 +284.592 +282.768 +282.765 +282.766 +282.763 +282.764 +280.198 +280.198 +280.195 +280.196 +280.197 +276.352 +276.352 +276.347 +276.345 +276.352 +276.351 +271.067 +271.064 +271.064 +271.07 +271.058 +264.868 +264.873 +264.87 +264.87 +264.874 +258.922 +258.918 +258.919 +258.923 +258.925 +254.596 +254.599 +254.597 +254.599 +254.593 +253.028 +253.037 +253.035 +253.03 +253.034 +254.741 +254.737 +254.739 +254.728 +254.739 +259.571 +259.574 +259.566 +259.569 +259.566 +266.922 +266.929 +266.921 +266.925 +266.924 +266.923 +275.917 +275.908 +275.913 +275.91 +275.908 +285.561 +285.557 +285.557 +285.559 +285.559 +294.901 +294.902 +294.898 +294.9 +294.9 +303.083 +303.085 +303.087 +303.083 +303.084 +309.527 +309.528 +309.526 +309.531 +309.529 +314.002 +314.004 +314.005 +313.997 +314.003 +316.677 +316.676 +316.677 +316.67 +316.673 +317.995 +317.996 +317.992 +317.994 +317.996 +318.504 +318.5 +318.504 +318.503 +318.506 +318.505 +318.6 +318.594 +318.593 +318.596 +318.602 +318.283 +318.285 +318.282 +318.283 +318.282 +317.044 +317.052 +317.047 +317.038 +317.047 +313.916 +313.919 +313.923 +313.919 +313.921 +307.828 +307.83 +307.837 +307.834 +307.837 +298.143 +298.145 +298.147 +298.142 +298.142 +285.123 +285.122 +285.13 +285.124 +285.125 +270.13 +270.139 +270.136 +270.133 +270.142 +270.132 +255.386 +255.386 +255.381 +255.39 +255.392 +243.333 +243.34 +243.338 +243.336 +243.337 +235.956 +235.955 +235.961 +235.951 +235.954 +234.18 +234.176 +234.181 +234.177 +234.183 +237.699 +237.694 +237.699 +237.698 +237.7 +245.049 +245.054 +245.055 +245.059 +245.057 +254.061 +254.057 +254.054 +254.066 +254.065 +262.308 +262.312 +262.311 +262.307 +262.311 +262.308 +267.83 +267.832 +267.83 +267.831 +267.831 +269.618 +269.619 +269.621 +269.617 +269.619 +267.961 +267.955 +267.961 +267.955 +267.954 +264.26 +264.255 +264.261 +264.262 +264.256 +260.47 +260.469 +260.473 +260.469 +260.475 +258.17 +258.171 +258.171 +258.167 +258.173 +257.86 +257.855 +257.86 +257.858 +257.863 +258.74 +258.735 +258.735 +258.741 +258.742 +259.068 +259.076 +259.075 +259.071 +259.073 +259.07 +256.969 +256.965 +256.965 +256.97 +256.965 +251.125 +251.122 +251.126 +251.125 +251.124 +241.335 +241.334 +241.332 +241.333 +241.333 +228.496 +228.49 +228.499 +228.5 +228.498 +214.366 +214.371 +214.371 +214.37 +214.368 +201.076 +201.078 +201.084 +201.076 +201.078 +190.596 +190.592 +190.593 +190.597 +190.595 +184.236 +184.239 +184.234 +184.241 +184.232 +184.236 +182.36 +182.364 +182.354 +182.36 +182.361 +184.269 +184.275 +184.276 +184.277 +184.271 +188.438 +188.431 +188.435 +188.443 +188.44 +192.925 +192.925 +192.927 +192.931 +192.928 +195.944 +195.942 +195.94 +195.941 +195.947 +196.264 +196.27 +196.266 +196.266 +196.271 +193.445 +193.448 +193.449 +193.444 +193.448 +187.712 +187.717 +187.711 +187.718 +187.716 +187.71 +179.79 +179.792 +179.787 +179.788 +179.785 +170.674 +170.676 +170.675 +170.674 +170.673 +161.562 +161.56 +161.557 +161.566 +161.558 +153.798 +153.786 +153.793 +153.794 +153.793 +148.75 +148.748 +148.741 +148.747 +148.747 +147.622 +147.62 +147.617 +147.62 +147.625 +151.079 +151.086 +151.085 +151.08 +151.081 +159.029 +159.021 +159.027 +159.025 +159.028 +170.496 +170.493 +170.496 +170.494 +170.491 +170.493 +183.833 +183.829 +183.836 +183.83 +183.83 +197.059 +197.052 +197.054 +197.061 +197.059 +208.307 +208.301 +208.309 +208.302 +208.309 +216.233 +216.231 +216.227 +216.229 +216.23 +220.364 +220.368 +220.361 +220.365 +220.366 +221.23 +221.238 +221.235 +221.233 +221.238 +220.224 +220.226 +220.225 +220.23 +220.228 +219.166 +219.163 +219.163 +219.16 +219.159 +219.16 +219.693 +219.692 +219.695 +219.696 +219.691 +222.816 +222.812 +222.815 +222.817 +222.819 +228.664 +228.653 +228.66 +228.657 +228.663 +236.675 +236.671 +236.668 +236.671 +236.671 +246.039 +246.039 +246.038 +246.039 +246.039 +256.051 +256.053 +256.054 +256.054 +256.055 +266.279 +266.281 +266.276 +266.275 +266.276 +276.43 +276.434 +276.43 +276.427 +276.428 +276.435 +286.156 +286.156 +286.153 +286.159 +286.152 +294.96 +294.959 +294.955 +294.964 +294.959 +302.31 +302.307 +302.31 +302.308 +302.31 +307.901 +307.895 +307.893 +307.894 +307.898 +311.825 +311.827 +311.822 +311.824 +311.824 +314.607 +314.598 +314.606 +314.603 +314.6 +316.892 +316.898 +316.9 +316.892 +316.892 +319.151 +319.15 +319.155 +319.149 +319.147 +321.321 +321.328 +321.328 +321.329 +321.325 +321.327 +322.845 +322.844 +322.844 +322.843 +322.845 +322.81 +322.813 +322.808 +322.814 +322.813 +320.456 +320.466 +320.455 +320.459 +320.464 +315.559 +315.559 +315.557 +315.556 +315.555 +308.68 +308.679 +308.68 +308.68 +308.678 +301.148 +301.147 +301.149 +301.145 +301.149 +294.604 +294.608 +294.604 +294.597 +294.595 +290.485 +290.481 +290.489 +290.489 +290.488 +290.484 +289.571 +289.571 +289.573 +289.572 +289.571 +291.771 +291.771 +291.778 +291.774 +291.767 +296.302 +296.307 +296.296 +296.299 +296.298 +302.001 +301.998 +301.996 +301.999 +302.003 +307.759 +307.76 +307.763 +307.762 +307.757 +312.761 +312.753 +312.754 +312.753 +312.761 +316.54 +316.534 +316.535 +316.533 +316.538 +318.983 +318.983 +318.985 +318.984 +318.983 +318.981 +320.235 +320.239 +320.239 +320.237 +320.238 +320.639 +320.641 +320.643 +320.643 +320.641 +320.714 +320.722 +320.714 +320.712 +320.714 +321.086 +321.088 +321.085 +321.086 +321.078 +322.373 +322.373 +322.371 +322.377 +322.371 +324.998 +324.999 +324.995 +324.994 +324.997 +328.954 +328.946 +328.955 +328.95 +328.952 +333.668 +333.666 +333.669 +333.666 +333.662 +338.067 +338.057 +338.059 +338.058 +338.057 +338.064 +340.801 +340.799 +340.799 +340.799 +340.802 +340.737 +340.732 +340.733 +340.729 +340.732 +337.287 +337.288 +337.289 +337.293 +337.281 +330.662 +330.668 +330.668 +330.666 +330.671 +321.736 +321.738 +321.736 +321.739 +321.735 +311.691 +311.684 +311.69 +311.697 +311.69 +301.664 +301.66 +301.66 +301.664 +301.662 +292.454 +292.446 +292.447 +292.445 +292.448 +292.449 +284.464 +284.472 +284.465 +284.461 +284.467 +277.818 +277.825 +277.818 +277.816 +277.818 +272.433 +272.434 +272.429 +272.433 +272.433 +268.083 +268.085 +268.086 +268.083 +268.083 +264.392 +264.399 +264.396 +264.401 +264.394 +260.848 +260.852 +260.849 +260.847 +260.852 +256.87 +256.875 +256.873 +256.88 +256.876 +251.995 +251.989 +251.99 +251.99 +251.994 +251.997 +246.03 +246.036 +246.034 +246.029 +246.036 +239.245 +239.243 +239.244 +239.242 +239.249 +232.308 +232.305 +232.31 +232.31 +232.307 +226.16 +226.152 +226.159 +226.155 +226.157 +221.58 +221.585 +221.586 +221.588 +221.581 +218.908 +218.909 +218.908 +218.903 +218.906 +217.729 +217.733 +217.729 +217.733 +217.731 +217.038 +217.043 +217.04 +217.042 +217.041 +215.596 +215.603 +215.603 +215.605 +215.598 +215.604 +212.501 +212.498 +212.495 +212.495 +212.503 +207.541 +207.535 +207.531 +207.537 +207.537 +201.349 +201.344 +201.349 +201.355 +201.346 +195.124 +195.119 +195.128 +195.129 +195.128 +190.136 +190.138 +190.139 +190.141 +190.135 +187.209 +187.212 +187.206 +187.212 +187.211 +186.457 +186.456 +186.454 +186.46 +186.453 +187.342 +187.344 +187.344 +187.35 +187.345 +187.348 +189.093 +189.09 +189.093 +189.09 +189.084 +191.062 +191.062 +191.057 +191.063 +191.062 +193.06 +193.06 +193.058 +193.063 +193.065 +195.226 +195.222 +195.216 +195.222 +195.222 +197.747 +197.749 +197.743 +197.743 +197.746 +200.567 +200.574 +200.566 +200.565 +200.563 +203.261 +203.258 +203.25 +203.258 +203.259 +205.172 +205.178 +205.174 +205.181 +205.177 +205.17 +205.786 +205.783 +205.788 +205.783 +205.784 +204.914 +204.909 +204.905 +204.91 +204.907 +202.792 +202.795 +202.788 +202.789 +202.792 +199.932 +199.935 +199.928 +199.933 +199.932 +196.907 +196.906 +196.902 +196.906 +196.906 +194.166 +194.173 +194.167 +194.171 +194.168 +192.084 +192.087 +192.088 +192.091 +192.089 +191.024 +191.027 +191.018 +191.026 +191.028 +191.407 +191.41 +191.407 +191.408 +191.404 +191.408 +193.672 +193.672 +193.678 +193.679 +193.678 +198.122 +198.118 +198.117 +198.11 +198.115 +204.642 +204.646 +204.639 +204.644 +204.644 +212.779 +212.78 +212.775 +212.781 +212.776 +221.771 +221.775 +221.771 +221.774 +221.773 +230.881 +230.887 +230.882 +230.886 +230.882 +239.588 +239.582 +239.584 +239.584 +239.587 +247.595 +247.594 +247.595 +247.594 +247.593 +247.596 +254.729 +254.728 +254.73 +254.734 +254.732 +260.767 +260.77 +260.771 +260.775 +260.769 +265.381 +265.385 +265.378 +265.381 +265.378 +268.25 +268.246 +268.244 +268.247 +268.246 +269.237 +269.237 +269.232 +269.236 +269.233 +268.47 +268.465 +268.464 +268.472 +268.464 +266.285 +266.283 +266.283 +266.287 +266.285 +263.082 +263.086 +263.078 +263.08 +263.085 +263.093 +259.262 +259.251 +259.259 +259.255 +259.26 +255.227 +255.229 +255.229 +255.23 +255.232 +251.554 +251.554 +251.557 +251.555 +251.552 +249.023 +249.027 +249.032 +249.032 +249.021 +248.593 +248.593 +248.597 +248.597 +248.595 +251.057 +251.057 +251.054 +251.053 +251.053 +256.712 +256.71 +256.712 +256.712 +256.707 +265.098 +265.095 +265.1 +265.097 +265.098 +275.013 +275.012 +275.01 +275.01 +275.011 +275.015 +284.763 +284.763 +284.765 +284.769 +284.765 +292.634 +292.634 +292.642 +292.639 +292.639 +297.312 +297.315 +297.312 +297.316 +297.312 +298.206 +298.208 +298.209 +298.205 +298.21 +295.608 +295.604 +295.608 +295.603 +295.603 +290.549 +290.544 +290.553 +290.546 +290.541 +284.519 +284.515 +284.518 +284.517 +284.513 +278.955 +278.957 +278.953 +278.95 +278.949 +278.957 +274.745 +274.744 +274.744 +274.746 +274.743 +271.931 +271.929 +271.93 +271.936 +271.925 +269.737 +269.733 +269.738 +269.738 +269.736 +267.037 +267.032 +267.035 +267.03 +267.033 +262.938 +262.938 +262.936 +262.94 +262.942 +257.294 +257.295 +257.296 +257.291 +257.294 +250.743 +250.736 +250.739 +250.741 +250.741 +244.363 +244.361 +244.367 +244.365 +244.362 +244.368 +239.11 +239.107 +239.102 +239.108 +239.108 +235.303 +235.3 +235.302 +235.304 +235.303 +232.583 +232.583 +232.581 +232.583 +232.579 +230.158 +230.153 +230.156 +230.158 +230.151 +227.342 +227.339 +227.341 +227.348 +227.348 +223.986 +223.983 +223.99 +223.98 +223.984 +220.598 +220.591 +220.596 +220.593 +220.6 +218.199 +218.195 +218.2 +218.201 +218.198 +217.854 +217.848 +217.853 +217.852 +217.853 +217.854 +220.184 +220.191 +220.188 +220.19 +220.187 +225.088 +225.093 +225.087 +225.092 +225.091 +231.701 +231.698 +231.703 +231.696 +231.698 +238.711 +238.71 +238.707 +238.715 +238.708 +244.81 +244.806 +244.807 +244.814 +244.809 +249.042 +249.041 +249.05 +249.044 +249.05 +251.015 +251.011 +251.017 +251.01 +251.019 +250.884 +250.883 +250.882 +250.878 +250.883 +250.879 +249.254 +249.256 +249.264 +249.259 +249.258 +247.108 +247.111 +247.106 +247.108 +247.107 +245.572 +245.574 +245.577 +245.571 +245.571 +245.773 +245.766 +245.765 +245.772 +245.764 +248.521 +248.529 +248.524 +248.526 +248.523 +254.132 +254.128 +254.137 +254.133 +254.13 +262.32 +262.316 +262.321 +262.322 +262.32 +272.402 +272.402 +272.402 +272.404 +272.403 +272.401 +283.547 +283.549 +283.548 +283.54 +283.542 +294.965 +294.964 +294.966 +294.964 +294.96 +305.96 +305.963 +305.965 +305.963 +305.961 +315.857 +315.852 +315.851 +315.851 +315.854 +323.88 +323.881 +323.88 +323.878 +323.88 +329.256 +329.259 +329.255 +329.259 +329.255 +331.318 +331.315 +331.321 +331.316 +331.325 +329.804 +329.806 +329.807 +329.81 +329.815 +325.009 +325.01 +325.011 +325.011 +325.011 +325.012 +317.815 +317.817 +317.81 +317.814 +317.813 +309.484 +309.486 +309.493 +309.491 +309.484 +301.36 +301.363 +301.365 +301.365 +301.36 +294.452 +294.451 +294.447 +294.451 +294.451 +289.208 +289.216 +289.209 +289.205 +289.208 +285.541 +285.54 +285.541 +285.538 +285.538 +283.013 +283.014 +283.015 +283.013 +283.014 +281.193 +281.197 +281.195 +281.198 +281.198 +281.193 +279.86 +279.85 +279.848 +279.853 +279.848 +278.954 +278.954 +278.956 +278.958 +278.95 +278.452 +278.446 +278.454 +278.455 +278.453 +278.038 +278.037 +278.034 +278.037 +278.043 +277.095 +277.092 +277.097 +277.094 +277.09 +274.926 +274.924 +274.922 +274.92 +274.923 +271.155 +271.154 +271.157 +271.153 +271.151 +266.051 +266.054 +266.053 +266.052 +266.054 +266.048 +260.574 +260.573 +260.573 +260.567 +260.571 +256.076 +256.075 +256.079 +256.081 +256.077 +253.916 +253.914 +253.915 +253.921 +253.917 +254.941 +254.938 +254.936 +254.94 +254.944 +259.267 +259.269 +259.272 +259.272 +259.271 +266.278 +266.269 +266.27 +266.27 +266.272 +274.78 +274.776 +274.771 +274.775 +274.776 +283.404 +283.406 +283.41 +283.406 +283.403 +290.927 +290.927 +290.929 +290.934 +290.929 +290.928 +296.499 +296.498 +296.505 +296.502 +296.504 +299.753 +299.753 +299.752 +299.754 +299.757 +300.713 +300.715 +300.712 +300.715 +300.714 +299.601 +299.606 +299.6 +299.602 +299.605 +296.659 +296.661 +296.654 +296.656 +296.657 +292.011 +292.007 +292.009 +292.006 +292.005 +285.686 +285.683 +285.683 +285.686 +285.684 +277.738 +277.746 +277.742 +277.743 +277.739 +277.739 +268.417 +268.414 +268.422 +268.415 +268.412 +258.227 +258.23 +258.224 +258.23 +258.231 +247.924 +247.926 +247.925 +247.925 +247.925 +238.329 +238.332 +238.327 +238.327 +238.328 +230.128 +230.124 +230.127 +230.129 +230.13 +223.774 +223.773 +223.768 +223.779 +223.776 +219.482 +219.483 +219.486 +219.487 +219.486 +217.382 +217.387 +217.385 +217.386 +217.386 +217.388 +217.572 +217.574 +217.577 +217.58 +217.573 +220.184 +220.18 +220.178 +220.179 +220.178 +225.247 +225.245 +225.244 +225.247 +225.244 +232.673 +232.663 +232.667 +232.667 +232.667 +242.059 +242.056 +242.06 +242.061 +242.054 +252.723 +252.722 +252.724 +252.727 +252.726 +263.672 +263.675 +263.672 +263.677 +263.68 +273.713 +273.712 +273.71 +273.715 +273.717 +281.561 +281.561 +281.562 +281.562 +281.568 +281.563 +286.115 +286.112 +286.111 +286.108 +286.116 +286.676 +286.678 +286.674 +286.678 +286.672 +283.263 +283.266 +283.263 +283.264 +283.265 +276.669 +276.669 +276.671 +276.673 +276.672 +268.316 +268.314 +268.316 +268.319 +268.315 +259.767 +259.769 +259.769 +259.773 +259.766 +252.174 +252.179 +252.173 +252.17 +252.176 +245.812 +245.808 +245.818 +245.81 +245.809 +245.813 +240.036 +240.035 +240.042 +240.032 +240.042 +233.624 +233.622 +233.623 +233.62 +233.622 +225.352 +225.359 +225.355 +225.356 +225.353 +214.603 +214.599 +214.608 +214.603 +214.605 +201.615 +201.613 +201.62 +201.617 +201.612 +187.519 +187.521 +187.521 +187.518 +187.523 +174.043 +174.047 +174.042 +174.042 +174.045 +163.134 +163.133 +163.134 +163.132 +163.13 +163.133 +156.591 +156.59 +156.586 +156.583 +156.588 +155.756 +155.753 +155.758 +155.756 +155.759 +161.298 +161.301 +161.297 +161.296 +161.301 +173.075 +173.075 +173.074 +173.076 +173.075 +190.071 +190.068 +190.068 +190.069 +190.069 +210.423 +210.426 +210.422 +210.43 +210.427 +231.624 +231.623 +231.62 +231.624 +231.62 +250.86 +250.863 +250.86 +250.86 +250.858 +265.59 +265.595 +265.594 +265.587 +265.591 +265.591 +274.125 +274.123 +274.127 +274.118 +274.124 +276.02 +276.019 +276.017 +276.019 +276.02 +272.192 +272.189 +272.184 +272.192 +272.193 +264.634 +264.64 +264.629 +264.638 +264.637 +255.862 +255.864 +255.858 +255.864 +255.864 +248.216 +248.222 +248.214 +248.22 +248.212 +243.351 +243.355 +243.348 +243.351 +243.35 +241.917 +241.914 +241.911 +241.91 +241.919 +241.913 +243.551 +243.545 +243.553 +243.545 +243.545 +247.171 +247.17 +247.17 +247.169 +247.17 +251.426 +251.425 +251.425 +251.427 +251.424 +255.184 +255.186 +255.184 +255.182 +255.186 +257.873 +257.88 +257.874 +257.876 +257.875 +259.615 +259.62 +259.615 +259.614 +259.616 +261.027 +261.032 +261.029 +261.024 +261.021 +262.912 +262.911 +262.907 +262.908 +262.911 +262.911 +265.944 +265.94 +265.944 +265.934 +265.936 +270.481 +270.479 +270.477 +270.481 +270.48 +276.551 +276.559 +276.557 +276.553 +276.553 +283.882 +283.889 +283.887 +283.891 +283.889 +291.88 +291.879 +291.876 +291.879 +291.882 +299.622 +299.621 +299.618 +299.617 +299.62 +305.924 +305.919 +305.925 +305.921 +305.92 +309.554 +309.55 +309.55 +309.549 +309.553 +309.522 +309.519 +309.52 +309.523 +309.521 +309.52 +305.46 +305.461 +305.454 +305.46 +305.46 +297.81 +297.814 +297.808 +297.808 +297.809 +287.767 +287.777 +287.772 +287.772 +287.77 +277.037 +277.041 +277.039 +277.036 +277.037 +267.299 +267.304 +267.299 +267.298 +267.307 +259.789 +259.781 +259.788 +259.784 +259.789 +254.877 +254.877 +254.877 +254.876 +254.878 +252.063 +252.07 +252.064 +252.062 +252.07 +252.072 +250.189 +250.189 +250.188 +250.193 +250.191 +247.909 +247.917 +247.909 +247.911 +247.908 +244.276 +244.283 +244.28 +244.277 +244.281 +239.074 +239.07 +239.069 +239.069 +239.073 +232.755 +232.753 +232.75 +232.752 +232.756 +226.177 +226.175 +226.183 +226.176 +226.183 +220.176 +220.172 +220.174 +220.173 +220.172 +215.308 +215.31 +215.308 +215.305 +215.31 +215.302 +211.921 +211.922 +211.926 +211.923 +211.925 +210.269 +210.267 +210.264 +210.267 +210.258 +210.63 +210.636 +210.633 +210.634 +210.634 +213.353 +213.361 +213.355 +213.358 +213.355 +218.668 +218.66 +218.659 +218.66 +218.663 +226.562 +226.554 +226.558 +226.556 +226.557 +236.774 +236.776 +236.775 +236.778 +236.776 +248.75 +248.749 +248.748 +248.753 +248.753 +261.657 +261.657 +261.656 +261.649 +261.655 +261.655 +274.41 +274.413 +274.411 +274.408 +274.411 +285.826 +285.834 +285.828 +285.829 +285.835 +294.787 +294.792 +294.796 +294.789 +294.796 +300.513 +300.507 +300.509 +300.514 +300.506 +302.762 +302.762 +302.764 +302.766 +302.766 +301.939 +301.938 +301.938 +301.942 +301.942 +298.927 +298.924 +298.927 +298.924 +298.929 +294.848 +294.849 +294.849 +294.844 +294.843 +294.849 +290.799 +290.801 +290.796 +290.802 +290.793 +287.643 +287.648 +287.652 +287.643 +287.644 +285.946 +285.935 +285.947 +285.93 +285.945 +exit 0 Index: test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspotKernel.c =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspotKernel.c +++ test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/hotspotKernel.c @@ -0,0 +1,101 @@ +#include "hotspot.h" + +void hotspotKernel(double result[grid_rows][grid_cols], + double temp[grid_rows][grid_cols], + double power[grid_rows][grid_cols], double Cap, double Rx, + double Ry, double Rz, double step, double ambTemp) { + for (int i = 0; i < num_iterations; i++) { + double delta; + int r, c; + for (r = 1; r < grid_rows - 1; r++) { + for (c = 1; c < grid_cols - 1; c++) { + delta = (step / Cap) * + (power[r][c] + + (temp[(r + 1)][c] + temp[(r - 1)][c] - 2.0 * temp[r][c]) / Ry + + (temp[r][c + 1] + temp[r][c - 1] - 2.0 * temp[r][c]) / Rx + + (ambTemp - temp[r][c]) / Rz); + + /* Update Temperatures */ + result[r][c] = temp[r][c] + delta; + } + } + + /* Corner 1 */ + delta = (step / Cap) * + (power[0][0] + (temp[0][1] - temp[0][0]) / Rx + + (temp[1][0] - temp[0][0]) / Ry + (ambTemp - temp[0][0]) / Rz); + result[0][0] = temp[0][0] + delta; + + /* Corner 2 */ + delta = + (step / Cap) * (power[0][grid_cols - 1] + + (temp[0][c - 1] - temp[0][grid_cols - 1]) / Rx + + (temp[1][grid_cols - 1] - temp[0][grid_cols - 1]) / Ry + + (ambTemp - temp[0][grid_cols - 1]) / Rz); + result[0][grid_cols - 1] = temp[0][grid_cols - 1] + delta; + + /* Corner 3 */ + delta = + (step / Cap) * (power[grid_rows - 1][grid_cols - 1] + + (temp[grid_rows - 1][grid_cols - 1 - 1] - + temp[grid_rows - 1][grid_cols - 1]) / + Rx + + (temp[(grid_rows - 2)][grid_cols - 1] - + temp[grid_rows - 1][grid_cols - 1]) / + Ry + + (ambTemp - temp[grid_rows - 1][grid_cols - 1]) / Rz); + result[grid_rows - 1][grid_cols - 1] = + temp[grid_rows - 1][grid_cols - 1] + delta; + + /* Corner 4 */ + delta = (step / Cap) * + (power[grid_rows - 1][0] + + (temp[grid_rows - 1][1] - temp[grid_rows - 1][0]) / Rx + + (temp[(grid_rows - 2)][0] - temp[grid_rows - 1][0]) / Ry + + (ambTemp - temp[grid_rows - 1][0]) / Rz); + result[grid_rows - 1][0] = temp[grid_rows - 1][0] + delta; + + // Top and Bottom Edge + for (c = 1; c < grid_cols - 1; c++) { + + delta = (step / Cap) * + (power[0][c] + + (temp[0][c + 1] + temp[0][c - 1] - 2.0 * temp[0][c]) / Rx + + (temp[1][c] - temp[0][c]) / Ry + (ambTemp - temp[0][c]) / Rz); + result[0][c] = temp[0][c] + delta; + + delta = (step / Cap) * + (power[grid_rows - 1][c] + + (temp[grid_rows - 1][c + 1] + temp[grid_rows - 1][c - 1] - + 2.0 * temp[grid_rows - 1][c]) / + Rx + + (temp[(grid_rows - 2)][c] - temp[grid_rows - 1][c]) / Ry + + (ambTemp - temp[grid_rows - 1][c]) / Rz); + result[grid_rows - 1][c] = temp[grid_rows - 1][c] + delta; + } + + // Left and right Edge + for (r = 1; r < grid_rows - 1; r++) { + delta = (step / Cap) * + (power[r][grid_cols - 1] + + (temp[(r + 1)][grid_cols - 1] + temp[(r - 1)][grid_cols - 1] - + 2.0 * temp[r][grid_cols - 1]) / + Ry + + (temp[r][grid_cols - 1 - 1] - temp[r][grid_cols - 1]) / Rx + + (ambTemp - temp[r][grid_cols - 1]) / Rz); + result[r][grid_cols - 1] = temp[r][grid_cols - 1] + delta; + + delta = (step / Cap) * + (power[r][0] + + (temp[(r + 1)][0] + temp[(r - 1)][0] - 2.0 * temp[r][0]) / Ry + + (temp[r][1] - temp[r][0]) / Rx + (ambTemp - temp[r][0]) / Rz); + result[r][0] = temp[r][0] + delta; + } + + for (r = 0; r < grid_rows; r++) { + for (c = 0; c < grid_cols; c++) { + temp[r][c] = result[r][c]; + } + } + } +} Index: test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/main.c =================================================================== --- test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/main.c +++ test-suite/trunk/MultiSource/Benchmarks/Rodinia/hotspot/main.c @@ -0,0 +1,83 @@ +#include "hotspot.h" +#include +#include +#include + +/* instead of printing all the values, we only print a part of array (every + 100th value) */ +#define PRINT_GAP 100 + +/* chip parameters */ +double t_chip = 0.0005; +double chip_height = 0.016; +double chip_width = 0.016; +double amb_temp = 80.0; + +void hotspotKernel(double result[grid_rows][grid_cols], + double temp[grid_rows][grid_cols], + double power[grid_rows][grid_cols], double Cap, double Rx, + double Ry, double Rz, double step, double ambTemp); + +/* Transient solver driver routine: simply converts the heat + * transfer differential equations to difference equations + * and solves the difference equations by iterating + */ +void compute_tran_temp(double result[grid_rows][grid_cols], + double temp[grid_rows][grid_cols], + double power[grid_rows][grid_cols]) { + + double grid_height = chip_height / grid_rows; + double grid_width = chip_width / grid_cols; + + double Cap = FACTOR_CHIP * SPEC_HEAT_SI * t_chip * grid_width * grid_height; + double Rx = grid_width / (2.0 * K_SI * t_chip * grid_height); + double Ry = grid_height / (2.0 * K_SI * t_chip * grid_width); + double Rz = t_chip / (K_SI * grid_height * grid_width); + + double max_slope = MAX_PD / (FACTOR_CHIP * t_chip * SPEC_HEAT_SI); + double step = PRECISION / max_slope; + + hotspotKernel(result, temp, power, Cap, Rx, Ry, Rz, step, amb_temp); +} + +int main(int argc, char **argv) { + + /* allocate memory for the temperature and power array */ + double(*temp)[grid_rows][grid_cols] = + malloc(grid_rows * grid_cols * sizeof(double)); + double(*power)[grid_rows][grid_cols] = + malloc(grid_rows * grid_cols * sizeof(double)); + double(*result)[grid_rows][grid_cols] = + malloc(grid_rows * grid_cols * sizeof(double)); + + if (!temp || !power || !result) + fprintf(stderr, "Unable to allocate memory"); + + glibc_compat_srand(SEED); + + /* read initial temperatures and input power */ + for (int i = 0; i < grid_rows; i++) { + double x = ((glibc_compat_rand()) % 512); + double y = ((glibc_compat_rand()) % 128) * 1e-6; + for (int j = 0; j < grid_cols; j++) { + (*temp)[i][j] = x + ((glibc_compat_rand()) % 128) * 1e-3; + (*power)[i][j] = y; + (*result)[i][j] = 0.0; + } + } + + compute_tran_temp(*result, *temp, *power); + + /* output results */ + for (int i = 0; i < grid_rows; i++) { + for (int j = 0; j < grid_cols; j++) { + if ((i * grid_cols + j) % PRINT_GAP == 0) { + fprintf(stdout, "%g\n", (*result)[i][j]); + } + } + } + + free(temp); + free(power); + return 0; +}