Matthew Guthaus
01/22/2025, 11:48 PMsh: line 1: pmap: command not found
ERROR: In /home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/../lvs/sky130.lvs: undefined method `strip' for nil:NilClass
ERROR: /home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/run_lvs.lym:135: RuntimeError: NoMethodError: undefined method `strip' for nil:NilClass in Executable::execute
/home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/../lvs/sky130.lvs:27:in `block in execute'
/nix/store/c4bdx4dja3h06xg1ksv3f51alp5a44li-ruby-3.1.5/lib/ruby/3.1.0/logger.rb:586:in `format_message'
/nix/store/c4bdx4dja3h06xg1ksv3f51alp5a44li-ruby-3.1.5/lib/ruby/3.1.0/logger.rb:476:in `add'
/nix/store/c4bdx4dja3h06xg1ksv3f51alp5a44li-ruby-3.1.5/lib/ruby/3.1.0/logger.rb:529:in `info'
/home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/../lvs/sky130.lvs:34:in `execute'
:/built-in-macros/lvs_interpreters.lym:31:in `instance_eval'
:/built-in-macros/lvs_interpreters.lym:31:in `execute' in Macro.run
/home/mrg/class/chip-tutorials/klayout/tech/sky130/pymacros/run_lvs.lym:135
As far as I can tell, it does this depending on the version of Ruby. Older ones (2.7) work but newer ones (3.1) don't?
This demo has a sky130 inv_1 gds and spice as well as the PDK scriptsMatthew Guthaus
01/22/2025, 11:58 PMMitch Bailey
01/23/2025, 12:17 AMsky130.lvs
file has this line
logger.formatter = proc do |severity, datetime, progname, msg|
"#{datetime}: Memory Usage (" + `pmap #{Process.pid} | tail -1`[10,40].strip + ") : #{msg}\n"
If the pmap
command is not available, it appears to return a nil
object that results in a failure because there is no script
strip
method. Can you verify that pmap
is available on the platforms that work and not available on platforms that do not work?
This is just a log header formatter to show memory usage. I think this will allow lvs to run but not show memory usage.
logger.formatter = proc do |severity, datetime, progname, msg|
"#{datetime}: Memory Usage (unavailable) : #{msg}\n"
Matthew Guthaus
01/23/2025, 3:05 PMMatthew Guthaus
01/24/2025, 2:31 AMMatthew Guthaus
01/24/2025, 4:19 AM