How can fixed this problem related with GEM5 , benchmark Parsec - gem5

sudo scons FULL_SYSTEM=1 build/ALPHA/gem5.opt RUBY=true PROTOCOL=MOESI_CMP_directory
build/ALPHA/gem5.opt configs/example/fs.py --cpu-type=timing \ --script=run_scripts/blackscholes_4c_simsmall.rcS \ --num-cpus=4 --ruby --mesh-rows=2 --garnet=fixed --topology=Mesh \ --caches --l2cache --l2_size=512kB --num-dirs=4 --num-l2=4 \ --l1d_size=32kB --l1i_size=32kB --l1d_assoc=2 --l1i_assoc=2 \ --kernel=/home/fur/gem5/full_system_images_ALPHA/binaries/vmlinux_2.6.27-gcc_4.3.4 \ --disk-image=/home/fur/gem5/full_system_images_ALPHA/disks/linux-parsec-2-1-m5-withtest-inputs.img
it gave my error: 'fixed' invalid value !!!
please how can fixed that?
GEM5, Parsec benchmark, ruby network

Related

Which API can I use to add my own logs to QEMU for debugging purpose

I tried to add my own logs to qemu by using fprintf(stdout, "my own log") and qemu_log("my own log"), and then compiled the qemu from source code and started a VM by the following command:
/usr/bin/qemu-system-x86_64 \
-D /home/VM1-qemu-log.txt \
-d cpu_reset \
-enable-kvm \
-m 4096 \
-nic user,model=virtio \
-drive file=/var/lib/libvirt/images/VM1.qcow2,media=disk,if=virtio \
-nographic
There are CPU-related logs in VM1-qemu-log.txt, however, I cannot find where "my own log" is. Can anyone advise? Thanks!
qemu_log("my own log") works, I added it to the wrong place(i.e., beginning of the 'main()' in 'qemu/vl.c', where the logging has not been setup yet). By adding it to another place(e.g. in virtio_blk_get_request() under qemu/hw/block/virtio-blk.c), I will be able to see "my own log" in /home/VM1-qemu-log.txt. The VM is created by:
/usr/bin/qemu-system-x86_64 \
-D /home/VM1-qemu-log.txt \
-enable-kvm \
-m 4096 \
-nic user,model=virtio \
-drive file=/var/lib/libvirt/images/VM1.qcow2,media=disk,if=virtio \
-nographic

RuntimeError: `RunConfig` instance is expected to be used by the `Estimator` inside the `Experiment`

Trying to run this tutorial experiment:
https://cloud.google.com/ml-engine/docs/how-tos/getting-started-training-prediction#local-train-single
Running locally, in virtualenv, Python v2.7, TensorFlow v1.2
When executing this command:
gcloud ml-engine local train \
--module-name trainer.task \
--package-path trainer/ \
-- \
--train-files $TRAIN_DATA \
--eval-files $EVAL_DATA \
--train-steps 1000 \
--job-dir $MODEL_DIR \
--eval-steps 100
I get the following error:
RuntimeError: `RunConfig` instance is expected to be used by the `Estimator` inside the `Experiment`.
expected
_cluster_spec={},
_environment=u'cloud',
_evaluation_master='',
_is_chief=True,
_master='',
_model_dir='output',
_num_ps_replicas=0,
_num_worker_replicas=0,
_task_id=0,
_task_type=None,
_tf_config=<tensorflow.core.protobuf.config_pb2.ConfigProto object at 0x111833938>,
but got
_cluster_spec={},
_environment=u'cloud',
_evaluation_master='',
_is_chief=True,
_master='',
_model_dir='output',
_num_ps_replicas=0,
_num_worker_replicas=0,
_task_id=0,
_task_type=None,
_tf_config=<tensorflow.core.protobuf.config_pb2.ConfigProto object at 0x111833c80>
So, it appears it is not finding the _tf_config at the right address. Have not been able to find documentation on how to set that up. Thanks.
UPDATE:
Appears to have something to do with my virtualenv setup. Works fine when I install tensorflow natively.

Compiling tensorflow: undefined reference to `clSetUserEventStatus#OPENCL_1.1'

PS: Question is at the end, the following is just background information that might help.
I'm trying to compile tensorflow, but getting this error:
bazel-out/host/bin/_solib_local/_U#local_Uconfig_Usycl_S_Ssycl_Csyclrt___Uexternal_Slocal_Uconfig_Usycl_Ssycl_Slib/libComputeCpp.so:
undefined reference to `clSetUserEventStatus#OPENCL_1.1'
By using "strace" tool, i've isolated the exact statement that's failing to be:
(
cd /home/rh/.cache/bazel/_bazel_rh/81919f16ea125cb9f08993f06569f022/execroot/tensorflow && \
exec env - PATH=/home/rh/.nvm/versions/node/v6.9.5/bin:/home/rh/perl5/bin:/home/rh/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/rh/bin:/usr/local/java/jdk1.8.0_74/bin:/home/rh/.local/bin:/home/rh/myscripts \
/usr/bin/clang++-3.6 \
-o \
bazel-out/host/bin/tensorflow/python/gen_functional_ops_py_wrappers_cc \
-Lbazel-out/host/bin/_solib_local/_U#local_Uconfig_Usycl_S_Ssycl_Csyclrt___Uexternal_Slocal_Uconfig_Usycl_Ssycl_Slib \
-Wl,-rpath,$ORIGIN/../../_solib_local/_U#local_Uconfig_Usycl_S_Ssycl_Csyclrt___Uexternal_Slocal_Uconfig_Usycl_Ssycl_Slib \
-pthread \
-Wl,-no-as-needed \
-B/usr/bin/ \
-Wl,-no-as-needed \
-Wl,--build-id=md5 \
-Wl,--hash-style=gnu \
-Wl,-S \
-Wl,#bazel-out/host/bin/tensorflow/python/gen_functional_ops_py_wrappers_cc-2.params \
-Wl,--no-undefined
)
strace also confirms that this command IS reading /usr/local/computecpp/lib/libComputeCpp.so, which contains the aforementioned clSetUserEventStatus symbol.
I verified that libComputeCpp.so contains clSetUserEventStatus by checking the output of the nm command:
nm /usr/local/computecpp/lib/libComputeCpp.so | grep clSetUserEventStatus
>> U clSetUserEventStatus##OPENCL_1.1
So here is my question: clang (and/or its linker) is reading the file that contains the symbol that it's complaining about... why is it "missing something" and complaining that it's undefined?
How can I get this compile to work?

multiple KVM guests script using virt-install

I would like install 3 KVM guests automatically using kickstart.
I have no problem installing it manually using virt-install command.
virt-install \
-n dal \
-r 2048 \
--vcpus=1 \
--os-variant=rhel6 \
--accelerate \
--network bridge:br1,model=virtio \
--disk path=/home/dal_internal,size=128 --force \
--location="/home/kvm.iso" \
--nographics \
--extra-args="ks=file:/dal_kick.cfg console=tty0 console=ttyS0,115200n8 serial" \
--initrd-inject=/opt/dal_kick.cfg \
--virt-type kvm
I have 3 scripts like the one above - i would like to install all 3 at the same time, how can i disable the console? or running it in the background?
Based on virt-install man page:
http://www.tin.org/bin/man.cgi?section=1&topic=virt-install
--noautoconsole
Don't automatically try to connect to the guest console. The
default behaviour is to launch virt-viewer(1) to display the
graphical console, or to run the "virsh" "console" command to
display the text console. Use of this parameter will disable this
behaviour.
virt-install will connect console automatically. If you don't want,
just simply add --noautoconsole in your cmd like
virt-install \
-n dal \
-r 2048 \
--vcpus=1 \
--quiet \
--noautoconsole \
...... other options
We faced the same problem and at the end the only way we found was to create new threads with the &.
We also include the quiet option, not mandatory.
---quiet option (Only print fatal error messages).
virt-install \
-n dal \
-r 2048 \
--vcpus=1 \
--quiet \
--os-variant=rhel6 \
--accelerate \
--network bridge:br1,model=virtio \
--disk path=/home/dal_internal,size=128 --force \
--location="/home/kvm.iso" \
--nographics \
--extra-args="ks=file:/dal_kick.cfg console=tty0 console=ttyS0,115200n8 serial" \
--initrd-inject=/opt/dal_kick.cfg \
--virt-type kvm &
I know this is kind of old, but I wanted to share my thoughts.
I ran into the same problem, but due to the environment we work in, we need to use sudo with a password (compliance reasons). The solution I came up with was to use timeout instead of &. When we fork it right away, it would hang due to the sudo prompt never appearing. So using timeout with your example above: (we obviously did timeout 10 sudo virt-instal...)
timeout 15 virt-install \
-n dal \
-r 2048 \
--vcpus=1 \
--quiet \
--os-variant=rhel6 \
--accelerate \
--network bridge:br1,model=virtio \
--disk path=/home/dal_internal,size=128 --force \
--location="/home/kvm.iso" \
--nographics \
--extra-args="ks=file:/dal_kick.cfg console=tty0 console=ttyS0,115200n8 serial" \
--initrd-inject=/opt/dal_kick.cfg \
--virt-type kvm
This allowed us to interact with our sudo prompt and send the password over, and then start the build. The timeout doesnt kill the process, it will continue on and so can your script.

yum stopped working with error No module named transactioninfo

Removed the following files by mistake and as a result yum stopped working.
Any idea what rpms exactly we need to re-install?
./abrt_exception_handler.pyo
./abrt_exception_handler.pyc
./abrt.pth
./abrt_exception_handler.py
./yum/sqlitesack.pyo
./yum/rpmsack.pyo
./yum/packages.pyo
./yum/misc.pyo
./yum/metalink.pyo
./yum/__init__.pyo
./yum/history.pyo
./yum/depsolve.pyo
./rpmUtils/miscutils.pyo
./yum/yumRepo.pyo
./yum/yumRepo.pyc
./yum/yumRepo.py
./yum/update_md.pyo
./yum/update_md.pyc
./yum/update_md.py
./yum/transactioninfo.pyo
./yum/transactioninfo.pyc
./yum/transactioninfo.py
./yum/sqlutils.pyo
./yum/sqlutils.pyc
./yum/sqlutils.py
Ok, found the solution. Since I don't know exactly which python modules belongs to which rpm, I did a re-install of most of the dependent rpms. Here it goes.
#!/bin/bash
for file in \
elfutils-0.152-1.el6.x86_64.rpm \
elfutils-libs-0.152-1.el6.x86_64.rpm \
expat-2.0.1-11.el6_2.x86_64.rpm \
gmp-4.3.1-7.el6_2.2.x86_64.rpm \
libxml2-2.7.6-8.el6_3.4.x86_64.rpm \
libxml2-python-2.7.6-8.el6_3.4.x86_64.rpm \
m2crypto-0.20.2-9.el6.x86_64.rpm \
python-2.6.6-36.el6.x86_64.rpm \
python-iniparse-0.3.1-2.1.el6.noarch.rpm \
python-urlgrabber-3.9.1-8.el6.noarch.rpm \
readline-6.0-4.el6.x86_64.rpm \
rpm-4.8.0-32.el6.x86_64.rpm \
rpm-libs-4.8.0-32.el6.x86_64.rpm \
rpm-python-4.8.0-32.el6.x86_64.rpm \
sqlite-3.6.20-1.el6.x86_64.rpm \
yum-3.2.29-40.el6.centos.noarch.rpm \
yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
do wget http://mirror.centos.org/centos-6/6/os/x86_64/Packages/$file;
done
rpm -Uvh *.rpm --force