diff --git a/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/TDP_cpu.v2.2.updated.csv b/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/TDP_cpu.v2.2.updated.csv index f4412c3..2b71629 100644 --- a/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/TDP_cpu.v2.2.updated.csv +++ b/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/TDP_cpu.v2.2.updated.csv @@ -2,7 +2,7 @@ model,TDP,n_cores,TDP_per_core,source,manufacturer,threads A8-7680,45.0,4.0,11.3,https://www.techpowerup.com/cpu-specs/,AMD,4 A9-9425 SoC,15.0,2.0,7.5,https://www.techpowerup.com/cpu-specs/,AMD,2 7552,200.0,48.0,4.2,https://www.amd.com/system/files/documents/AMD-EPYC-7002-Series-Datasheet.pdf,AMD,96 -EPYC 7251,120.0,8.0,15.0,https://www.amd.com/en/products/cpu/amd-epyc-7251,AMD,16 +AMD EPYC 7251,120.0,8.0,15.0,https://www.amd.com/en/products/cpu/amd-epyc-7251,AMD,16 Athlon 3000G,35.0,2.0,17.5,https://www.techpowerup.com/cpu-specs/,AMD,4 Core 2 Quad Q6600,95.0,4.0,23.8,https://www.techpowerup.com/cpu-specs/,Intel,4 Core i3-10100,65.0,4.0,16.3,https://www.techpowerup.com/cpu-specs/,Intel,8 diff --git a/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/pre_process.py b/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/pre_process.py index 2dc991b..e03c592 100644 --- a/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/pre_process.py +++ b/plugins/nf-co2footprint/src/resources/tdp-cpu/GreenAlgorithms/pre_process.py @@ -13,7 +13,7 @@ "A8-7680": 4, "A9-9425 SoC": 2, "7552": 96, - "EPYC 7251": 16, + "AMD EPYC 7251": 16, "Athlon 3000G": 4, "FX-6300": 6, "FX-8350": 8, @@ -94,7 +94,6 @@ } all_cpus_threads = amd_cpus_threads | intel_cpus_threads -df['model'] = df['model'].apply(lambda x: x.replace("AMD","").strip()) df['threads'] = df['model'].apply(lambda x: all_cpus_threads[x]) # Save the updated dataset or print it diff --git a/plugins/nf-co2footprint/src/resources/tdp-cpu/merge.py b/plugins/nf-co2footprint/src/resources/tdp-cpu/merge.py index 56073e0..33ca174 100644 --- a/plugins/nf-co2footprint/src/resources/tdp-cpu/merge.py +++ b/plugins/nf-co2footprint/src/resources/tdp-cpu/merge.py @@ -18,7 +18,7 @@ def read_and_process_amd(processors, file_path): # Process each row in the CSV for row in csv_reader: try: - processor_model = row["Name"].replace("AMD", "").replace("™","").strip() + processor_model = row["Name"].replace("™","").strip() tdp = row["Default TDP"].strip().replace("W", "").replace("+", "") n_cores = row["# of CPU Cores"].strip() @@ -185,7 +185,7 @@ def read_and_process_intel(processors, root_dir): if tdp == "": continue - processor_model = processor_name.replace("Intel", "").replace("®","").strip() + processor_model = processor_name.replace("®","").strip() tdp = float(tdp) n_cores = int(details["Total Cores"].strip()) n_threads = int(details["Total Threads"].strip()) # Thread count equals core count diff --git a/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintFactoryTest.groovy b/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintFactoryTest.groovy index 672652d..7321820 100644 --- a/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintFactoryTest.groovy +++ b/plugins/nf-co2footprint/src/test/nextflow/co2footprint/CO2FootprintFactoryTest.groovy @@ -80,7 +80,7 @@ class CO2FootprintFactoryTest extends Specification { def traceRecord = new TraceRecord() traceRecord.realtime = (1 as Long) * (3600000 as Long) traceRecord.cpus = 1 - traceRecord.cpu_model = "AMD EPYC 7251" + traceRecord.cpu_model = "EPYC 7251" traceRecord.'%cpu' = 100.0 traceRecord.memory = (7 as Long) * (1000000000 as Long)