2020-10-01 11:01:08 +02:00
from concho . dell import DellMatinfoCsvConfigurator
from concho . dell import DellMatinfoConfigurator
2021-04-07 23:07:11 +02:00
from concho . dell import DellConfiguratorParser2020
from concho . dell import DellConfiguratorParser2021
2020-10-01 19:18:53 +02:00
from concho . procs_chooser import plot_configurators
from concho . procs_chooser import ConfigPrice
from concho . procs_chooser import ConfigFlops
from concho . procs_chooser import ConfigFlopsPerEuro
2020-09-25 16:35:13 +02:00
2020-10-01 11:01:08 +02:00
def test_all_matinfo_2020_configs ( ) :
2020-09-25 16:35:13 +02:00
# configurator = DellMatinfoConfigurator('rcrc1406676-4834664 - Cat2 Conf4 PowerEdge R640 - Dell.html')
# print(configurator)
2020-10-01 11:01:08 +02:00
configurators = [
DellMatinfoCsvConfigurator ( ' c6420-20200716-price.tsv ' ) ,
2021-04-07 23:07:11 +02:00
DellMatinfoConfigurator ( ' rcrc1406676-4834664 - Cat2 Conf4 PowerEdge R640 - Dell.html ' , DellConfiguratorParser2020 ( ) ) ,
DellMatinfoConfigurator ( ' rcrc1406676-4824727 - Cat 2 Conf 7 PowerEdge R940 - Dell.html ' , DellConfiguratorParser2020 ( ) ) ,
2020-10-01 11:01:08 +02:00
# dell.DellPowerEdgeR940(),
]
2020-10-01 19:18:53 +02:00
plot_configurators ( configurators = configurators , ram_per_core = 4.0e9 , xaxis_def = ConfigPrice ( ) , yaxis_def = ConfigFlopsPerEuro ( ) , plot_title = ' total cost including electricity ' )
2020-10-01 11:01:08 +02:00
def test_credits_2020_configs ( ) :
# configurator = DellMatinfoConfigurator('rcrc1406676-4834664 - Cat2 Conf4 PowerEdge R640 - Dell.html')
# print(configurator)
configurators = [
DellMatinfoCsvConfigurator ( ' c6420-20200716-price.tsv ' ) ,
2021-04-07 23:07:11 +02:00
DellMatinfoConfigurator ( ' rcrc1406676-4834664 - Cat2 Conf4 PowerEdge R640 - Dell.html ' , DellConfiguratorParser2020 ( ) ) ,
DellMatinfoConfigurator ( ' rcrc1406676-4824727 - Cat 2 Conf 7 PowerEdge R940 - Dell.html ' , DellConfiguratorParser2020 ( ) ) ,
2020-10-01 11:01:08 +02:00
# dell.DellPowerEdgeR940(),
]
2020-10-01 19:18:53 +02:00
# config_filter = lambda config : config.cpu.uid in [
# 'intel-xeon-gold-5222',
# 'intel-xeon-gold-6226r',
# 'intel-xeon-gold-6230r',
# 'intel-xeon-gold-6234r',
# 'intel-xeon-gold-6240r',
# 'intel-xeon-gold-6248r',
# 'intel-xeon-gold-6230',
# 'intel-xeon-gold-6240',
# ]
2021-04-07 23:07:11 +02:00
config_filter = lambda config : config . get_price ( ) < 40000.0
plot_configurators ( configurators = configurators , ram_per_core = 4.0e9 , xaxis_def = ConfigPrice ( ) , yaxis_def = ConfigFlopsPerEuro ( ) , plot_title = ' physmol/ts credit 2020 configs ' , config_filter = config_filter )
def test_credits_2021_configs ( ) :
configurators = [
DellMatinfoConfigurator ( ' 20210407 - Cat2 Conf4 PowerEdge R640 - Dell.html ' , DellConfiguratorParser2021 ( ) ) ,
2021-04-08 10:18:32 +02:00
DellMatinfoConfigurator ( ' 20210407 - Cat2 Conf7 PowerEdge R940 - Dell.html ' , DellConfiguratorParser2021 ( ) ) ,
2021-04-08 15:29:34 +02:00
DellMatinfoConfigurator ( ' 20210407 - Cat2 Conf8 PowerEdge R7525 - Dell.html ' , DellConfiguratorParser2021 ( ) ) ,
2021-04-08 10:18:32 +02:00
DellMatinfoConfigurator ( ' 20210407 - Cat2 Conf10 PowerEdge R6525 - Dell.html ' , DellConfiguratorParser2021 ( ) ) ,
2021-04-07 23:07:11 +02:00
]
# config_filter = lambda config : config.cpu.uid in [
# 'intel-xeon-gold-5222',
# 'intel-xeon-gold-6226r',
# 'intel-xeon-gold-6230r',
# 'intel-xeon-gold-6234r',
# 'intel-xeon-gold-6240r',
# 'intel-xeon-gold-6248r',
# 'intel-xeon-gold-6230',
# 'intel-xeon-gold-6240',
# ]
2021-04-08 10:18:32 +02:00
config_filter = lambda config : config . get_price ( ) < 20000.0
2020-10-01 11:01:08 +02:00
2021-04-08 10:18:32 +02:00
plot_configurators ( configurators = configurators , ram_per_core = 4.0e9 , xaxis_def = ConfigPrice ( ) , yaxis_def = ConfigFlopsPerEuro ( ) , plot_title = ' physmol/ts credit 2021 configs ' , config_filter = config_filter )
2020-10-01 11:01:08 +02:00
2020-09-25 16:35:13 +02:00
if __name__ == ' __main__ ' :
2021-04-07 23:07:11 +02:00
test_credits_2021_configs ( )