processor = RandomGenerator()
board = TestBoard(
clk_freq="3GHz",
processor=processor,
memory=memory,
cache_hierarchy=cache_hierarchy,
)
root = Root(full_system=False, system=board)
m5.instantiate()
exit_event = (
m5.simulate()
)
I want to compare Memory, so I configure this code. but I got an error.
Command line: build/NULL/gem5.opt Proj/ver2/Proj_v2.py
ImportError: cannot import name 'BaseCPU' from 'm5.objects' (unknown location)
Why does this error happen?
Related
I am having some trouble running the simulation in gem5. I keep getting
no workload specified
# Set the workload and benchmark
process = Process()
process.cmd = ['gzip', '-k', 'test.txt']
system.cpu.workload = process
system.cpu.createThreads()
# Set the workload
print("set workload")
m5.command_line.set_workload('mcf')
print("workload Set")
I tried to print the workload portion but received the same error
# Set the workload
print("set workload")
m5.command_line.set_workload('mcf')
print("workload Set")
If none of the below code works with you, leave a comment and I will share more a complete gem5 project to run SPEC17 and SEC06 besides executable bins.
Here is an example to run one of the SEC17 benchmarks:
bwaves_s = Process()
bwaves_s_dir = '603.bwaves_s/'
bwaves_s_run_dir = bwaves_s_dir + refspeed_run_dir
bwaves_s.executable = bench_dir + bwaves_s_run_dir + 'speed_bwaves' +
exe_suffix
bwaves_s_data = 'bwaves_1.in'
bwaves_s.cmd = [bwaves_s.executable]
bwaves_s.output = 'bwaves_s.out'
bwaves_s.input = bench_dir + bwaves_s_run_dir + bwaves_s_data
system.cpu[0].workload = spec_process "OR" system.cpu.workload =
spec_process
Another example to run a binary
from gem5.components.boards.simple_board import SimpleBoard
from gem5.components.memory.single_channel import SingleChannelDDR3_1600
from gem5.components.processors.simple_processor import SimpleProcessor
from gem5.components.processors.cpu_types import CPUTypes
from gem5.resources.resource import CustomResource
from gem5.simulate.simulator import Simulator
from unique_cache_hierarchy.unique_cache_hierarchy_complete import UniqueCacheHierarchy
Obtain the components.
cache_hierarchy = UniqueCacheHierarchy()
memory = SingleChannelDDR3_1600("1GiB")
processor = SimpleProcessor(cpu_type=CPUTypes.ATOMIC, num_cores=1)
Add them to the board.
board = SimpleBoard(
clk_freq="3GHz", processor=processor, memory=memory, cache_hierarchy=cache_hierarchy
)
Set the workload.
binary = CustomResource(
"materials/using-gem5/02-stdlib/m5-exit-example/m5-exit-example"
)
board.set_se_binary_workload(binary)
Setup the Simulator and run the simulation.
simulator = Simulator(board=board)
simulator.run()
I'm trying to query an MQ server running on IBM i from a python script on a linux box. I'm getting this error back from pymqi and I don't know what it means.
The stacktrace is as follows:
[{"message": "Unpack for type ((67108864,)) not implemented", "traceback":
"Traceback (most recent call last):\n
response = pcf.MQCMD_INQUIRE_CHANNEL(args)
File \"../python3.8/site-packages/pymqi/__init__.py\",
line 2770, in __call__\n
res, mqcfh_response = self.__pcf.unpack(message)
This is the snippet of code that generates the error
cd = pymqi.CD()
cd.ChannelName = pymqi.ensure_bytes(channel)
cd.ConnectionName = pymqi.ensure_bytes("{}({})".format(host, port))
cd.ChannelType = pymqi.CMQC.MQCHT_CLNTCONN
cd.TransportType = pymqi.CMQC.MQXPT_TCP
cd.Version = 9
queue_manager = pymqi.QueueManager(None)
queue_manager.connect_with_options(queue_manager_name, cd)
args = {pymqi.CMQCFC.MQCACH_CHANNEL_NAME: pymqi.ensure_bytes('*')}
pcf = pymqi.PCFExecute(queue_manager, response_wait_interval=5, convert=False)
response = pcf.MQCMD_INQUIRE_CHANNEL(args)
What is type 67108864?
I know there are limitations with this library and connecting to a z/OS, are there similar limitations with IBM i?
Turns out IBM i along with AIX have a different endinaness so one must pass convert=True to the pymqi.PCFExecute commands
queue_manager = pymqi.QueueManager(None)
queue_manager.connect_with_options(queue_manager_name, cd)
args = {pymqi.CMQCFC.MQCACH_CHANNEL_NAME: pymqi.ensure_bytes('*')}
pcf = pymqi.PCFExecute(queue_manager, response_wait_interval=5, convert=True)
response = pcf.MQCMD_INQUIRE_CHANNEL(args)
(in PyQt5)
I am trying to get the name of the selected font from QFontComboBox to "showInfo" and an error occurs (detail after the code).
The code below is not part of a class.
Thanks!
def additional_menu_styled_font(editor):
projCombo = QFontComboBox
objectTest = QObject()
ShapeLayerList = QWidgetAction(objectTest)
ShapeLayerList.setDefaultWidget(projCombo())
popupMenu2A = QMenu()
popupMenu2A.setTitle("Shape Data")
popupMenu2A.addAction(ShapeLayerList)
popupMenu2A.exec_(QCursor.pos())
#fixme!!!
projCombo().activated.connect(changed)
Editor.additional_menu_styled_font = additional_menu_styled_font
def changed(projCombo):
showInfo(str(projCombo().currentFont().family()))
And the error:
...in additional_menu_styled_font
projCombo().activated.connect(changed)
TypeError: connect() failed between activated(int) and unislot()
I m using flume1.4.0 with hbase0.94.10 and hadoop1.1.2....I m new to flume.while i m running an flume agent, i got following error..
Error occurred during initialization of VM The size of the object heap + VM data exceeds the maximum representable size org.apache.flume.node.Application --conf-file=/usr/local/flume/conf/flume.conf --name agent
Exception in thread "main" java.lang.NoClassDefFoundError: occurred
Caused by: java.lang.ClassNotFoundException: occurred
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: occurred. Program will exit.
my agent configuration is as follows:
agent1.sources = tail
agent1.channels = memoryChannel
agent1.sinks = sink1
agent1.sources.tail.type = exec
agent1.sources.tail.command = tail -f /usr/local/jarsfortest/LogsForTest/generatingLogs-app.logs
agent1.sources.tail.channels = memoryChannel
agent1.sinks.sink1.type = org.apache.flume.sink.hbase.HBaseSink
agent1.sinks.sink1.channel = memoryChannel
agent1.sinks.sink1.table = testFlume
agent1.sinks.sink1.columnFamily = log
agent1.sinks.sink1.serializer = org.apache.flume.sink.hbase.RegexHbaseEventSerializer
agent1.sinks.sink1.serializer.regex = [a-zA-Zo-9]*[^C][a-zA-Z0-9]*[^C][a-zA-Z0-9]*
agent1.sinks.sink1.serializer.regexIgnoreCase = true
agent1.sinks.sink1.serializer.colNames = id, no_fill_reason, bid
agent1.sinks.sink1.channel = memoryChannel
agent1.sinks.sink1.type = logger
agent1.channels.memoryChannel.type = memory
agent1.channels.memoryChannel.capacity = 100
Please Help me..
Thanks in advance
This looks like you have a JVM problem rather than a Flume problem. I'd check that the JAR files are not corrupt, that you haven't set max heap size too small, etc.
Whatever is on the end of this truncated message is probably a clue, the size of the object heap + VM data
Update
agent1.channels.memoryChannel.capacity = 100
That capacity looks very small. I'd remove that line and let it use the default.
I'm using getForm to repeatedly pull data from an api. Sometimes the program finishes, and other times after some amount of iterations, I get the following error message:
Error in curlPerform(url = url, curl = curl, .opts = .opts) :
attempt to apply non-function
In addition: There were more than 50 warnings (use warnings() to see the first 50)
> traceback()
5: .Call("R_curl_easy_perform", curl, .opts, isProtected, .encoding,
PACKAGE = "RCurl")
4: curlPerform(url = url, curl = curl, .opts = .opts)
3: getURLContent(uri, .opts = .opts, .encoding = .encoding, binary = binary,
curl = curl)
2: getForm("https://xx", .params = parval)
1: fromJSON(getForm("https://xx",
.params = parval)) at #32
the warnings are:
In RCurlIconv(str, from = "C99", to = encoding) :
UTF-8 not supported iconv entries
Thanks for your help!
It's just a download error, sometimes the download fails. I just put in a provision to try the download again in that case.