{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"import matplotlib\n",
"import matplotlib.pyplot as plt"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import numpy"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"from result.ldc_2d_benchmark_P100 import ldc_2d_p100\n",
"from result.ldc_2d_benchmark_K2200 import ldc_2d_k2200\n",
"from result.ldc_3d_benchmark_P100 import ldc_3d_p100\n",
"from result.ldc_3d_benchmark_K2200 import ldc_3d_k2200"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((32, (32, 1), 'double', False, True), [15, 16, 15, 16, 16])"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ldc_2d_k2200[0]"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"((64, (64, 1, 1), 'symbolic.D3Q19', 'single', True, True),\n",
" [421, 422, 421, 421, 421])"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"ldc_3d_k2200[1]"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
"p100_max_bandwidth = 512.6*1024**3\n",
"k2200_max_bandwidth = 63.2*1024**3"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
"def max_mlups(b, q, precision):\n",
" return b / ((2*q*precision+4)*10**6)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"308.45674216727275"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"max_mlups(k2200_max_bandwidth, 27, 4)"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
"def descriptor_subset(data, descriptor):\n",
" return list(\n",
" map(lambda m: (m[0][0:2] + m[0][3:], m[1]),\n",
" filter(lambda m: m[0][2] == descriptor, data)))"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
"ldc_3d_D3Q19_p100 = descriptor_subset(ldc_3d_p100, 'symbolic.D3Q19')\n",
"ldc_3d_D3Q27_p100 = descriptor_subset(ldc_3d_p100, 'symbolic.D3Q27')\n",
"ldc_3d_D3Q19_k2200 = descriptor_subset(ldc_3d_k2200, 'symbolic.D3Q19')\n",
"ldc_3d_D3Q27_k2200 = descriptor_subset(ldc_3d_k2200, 'symbolic.D3Q27')"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
"def values(data, index):\n",
" return set(map(lambda m: m[0][index], data))"
]
},
{
&