import numpy as np def speedup_model(point): nproc = point['nproc'] parallel_portion = point['parallel_portion'] speedup = 1.0 / ((1.0 - parallel_portion) + parallel_portion/nproc) return speedup
https://en.wikipedia.org/wiki/Amdahl%27s_law
{'_id': ObjectId('608761b4a5abb3c91566882f'), 'accessibility': {'type': 'public'}, 'id': 0, 'model_data': {'model_code_python': 'import numpy as np\r\n' '\r\n' 'def speedup_model(point):\r\n' '\r\n' " nproc = point['nproc']\r\n" ' parallel_portion = ' "point['parallel_portion']\r\n" '\r\n' ' speedup = 1.0 / ((1.0 - ' 'parallel_portion) + ' 'parallel_portion/nproc)\r\n' '\r\n' ' return speedup', 'model_description': 'A speedup analytical function (speedup ' 'over the number of processors) based on ' "Amdahl's Law.", 'model_name': "Speedup Function - Amdahl's Law", 'model_pointer': 'https://en.wikipedia.org/wiki/Amdahl%27s_law', 'update_required': 'no'}, 'model_name': "Speedup Function - Amdahl's Law", 'uid': 'ad836988-a6f3-11eb-bd28-1ec62b556ef0', 'unique_name': "Speedup Function _ Amdahl's " 'Law_ad836988_a6f3_11eb_bd28_1ec62b556ef0', 'update_time': {'tm_hour': 0, 'tm_isdst': 0, 'tm_mday': 27, 'tm_min': 58, 'tm_mon': 4, 'tm_sec': 28, 'tm_wday': 1, 'tm_yday': 117, 'tm_year': 2021}, 'upload_time': {'tm_hour': 0, 'tm_isdst': 0, 'tm_mday': 27, 'tm_min': 58, 'tm_mon': 4, 'tm_sec': 28, 'tm_wday': 1, 'tm_yday': 117, 'tm_year': 2021}, 'user_info': {'affiliation': 'UC Berkeley', 'user_email': 'younghyun@berkeley.edu', 'user_name': 'ycho'}}