I have just published my first public project on GitHub, named ForClust. The project is developed using Fortran 2003 and 2008 and aims to develop classes for controlling various components such as CPU on Linux systems.
I have developed this project in my spare time as a hobby. Could it be interesting? I am looking forward to your feedback.
3 Likes
I have encountered such errors after typing fpm test
:
test_set done.
test_get_base_freq done.
[100%] Project compiled successfully.
ERROR STOP file not found: /sys/devices/system/node/node0/cpu0/cpufreq/base_frequency
Error termination. Backtrace:
#0 0x7f5f90a23ad0 in ???
#1 0x7f5f90a24649 in ???
#2 0x7f5f90a25cb7 in ???
#3 0x5564f74534d8 in __forclust_MOD_select_node
at ./src/forclust.f90:171
#4 0x5564f7449440 in test
at test/test_set_cpu_debug_on.f90:11
#5 0x5564f7449761 in main
at test/test_set_cpu_debug_on.f90:4
ERROR STOP file not found: /sys/devices/system/node/node0/cpu0/cpufreq/base_frequency
Error termination. Backtrace:
The /sys/devices/system/node/node0/cpu0/cpufreq/
directory is present on my system, but there is no base_frequency
file inside.
In my Ubuntu 22.10 system, the files in that directory are:
$ ls
affected_cpus cpuinfo_min_freq related_cpus scaling_cur_freq scaling_governor scaling_min_freq
cpuinfo_max_freq cpuinfo_transition_latency scaling_available_governors scaling_driver scaling_max_freq scaling_setspeed
1 Like
Thanks for your report.
I removed “error stop” and added a default value for when a file is not found.
1 Like
Thanks, it runs now:
test_get_base_freq done.
[100%] Project compiled successfully.
cpuinfo min frequency: 1600000
NODE: 1
==============================
intel turbo: off
------------------------------
CPU: 1
online: 1
base frequency: 0
cpuinfo max frequency: 3300000
cpuinfo min frequency: 1600000
scaling cur frequency: 3292699
scaling max frequency: 3300000
scaling min frequency: 1600000
scaling governor: schedutil
energy perf preference: not found
------------------------------
CPU: 2
...
Only 4 cores on my old PC, not 16!
2 Likes