Skip to content

Commit

Permalink
[wiki] Ajout d'une mention ARM ou Power dans les pages hardware (bug …
Browse files Browse the repository at this point in the history
…13364)
  • Loading branch information
Patrice RINGOT committed Sep 24, 2021
1 parent 5e06b97 commit 7510fe1
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion lib/refrepo/gen/wiki/generators/site_hardware.rb
Expand Up @@ -274,7 +274,8 @@ def get_hardware(sites)
hard['cpus_per_node_str'] = hard['cpus_per_node'].to_s + ' ' + G5K.pluralize(hard['cpus_per_node'], 'CPU') + '/node'
hard['cores_per_cpu'] = node_hash['architecture']['nb_cores'] / hard['cpus_per_node']
hard['cores_per_cpu_str'] = hard['cores_per_cpu'].to_s + ' ' + G5K.pluralize(hard['cores_per_cpu'], 'core') + '/CPU'
hard['num_processor_model'] = (hard['cpus_per_node'] == 1 ? '' : "#{hard['cpus_per_node']} x ") + hard['processor_model'].gsub(' ', ' ')
exotic_archname = get_exotic_archname(node_hash['architecture']['platform_type'])
hard['num_processor_model'] = (hard['cpus_per_node'] == 1 ? '' : "#{hard['cpus_per_node']} x ") + (exotic_archname ? "#{exotic_archname} " : '') + hard['processor_model'].gsub(' ', ' ')
hard['processor_description'] = "#{hard['processor_model']} (#{hard['microarchitecture']}#{hard['processor_freq'] ? ', ' + hard['processor_freq'] : ''}, #{hard['cpus_per_node_str']}, #{hard['cores_per_cpu_str']})"
hard['ram_size'] = G5K.get_size(node_hash['main_memory']['ram_size'])
hard['pmem_size'] = G5K.get_size(node_hash['main_memory']['pmem_size']) unless node_hash['main_memory']['pmem_size'].nil?
Expand Down Expand Up @@ -437,6 +438,18 @@ def get_hardware(sites)
hardware
end

# This method returns a processor family if the architecture/platform_stream is not mainstream
def get_exotic_archname(platform_type)
case platform_type
when /aarch64/
"ARM"
when /ppc64le/
"Power"
else
nil
end
end

# This methods adds the array hard to the hash
# hardware. If nodes 2,3,7 have the same hard, they
# will be gathered in the same key and we will have
Expand Down

0 comments on commit 7510fe1

Please sign in to comment.