Error running Fast RCNN on CPU: Cannot use GPU - cpu

I am trying to run Fast RCNN on CPU. I am working with the code I cloned as follows:
git clone --recursive https://github.com/rbgirshick/py-faster-rcnn.git
When running py-faster-rcnn/tools/demo.py, I am getting following error:
Warning: Logging before InitGoogleLogging() is written to STDERR
F0625 01:37:25.908700 24397 common.cpp:66] Cannot use GPU in CPU-only Caffe: check mode.
* Check failure stack trace: *
Aborted
I have modified the Makefile to use CPU. Have set CPU_ONLY:= 1.
What I am missing here or doing wrong?

Are you passing --cpu flag to command line itself i.e. are you running demo.py as follows:
py-faster-rcnn/tools/demo.py --cpu?
If not so, run it with the flag. This error should be resolved with this.

Related

Weird Haskell 'stack' error: "can't load .so/.DLL" "not a writable segment"

I am trying to install ghc-mod so that I can use ide-haskell in Atom.
The instructions say to use stack build ghc-mod. It seems that GHC 8.2+ is not supported by ghc-mod, so I set my resolver to lts-9.21.
When running stack build ghc-mod, I keep getting this error (emphasis mine; not using code formatting because line wrap helps readability):
aeson > : can't load .so/.DLL for: /Users/timoffex/.stack/snapshots/x86_64-osx/db354248ca37308313a93487c93190e1d5b819629b60b38b68871c9a691e52b9/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib (dlopen(/Users/timoffex/.stack/snapshots/x86_64-osx/db354248ca37308313a93487c93190e1d5b819629b60b38b68871c9a691e52b9/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib, 5): REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 2 which is not a writable segment (__LINKEDIT) in /Users/timoffex/.stack/snapshots/x86_64-osx/db354248ca37308313a93487c93190e1d5b819629b60b38b68871c9a691e52b9/8.0.2/lib/x86_64-osx-ghc-8.0.2/libHStime-locale-compat-0.1.1.3-KZ1jqNx8uhlHjmuPPj6V1Y-ghc8.0.2.dylib)
... (later)
-- While building package aeson-1.1.2.0 using:
/Users/timoffex/.stack/setup-exe-cache/x86_64-osx/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-osx/Cabal-1.24.2.0 build --ghc-options ""
Process exited with code: ExitFailure 1
Progress 1/4
Here's a snippet from the above that looks weird to me:
REBASE_OPCODE_SET_SEGMENT_AND_OFFSET_ULEB has segment 2 which is not a writable segment
I am running macOS Catalina 10.15.3.
I can't find any mention of this online except for this open GitHub issue: https://github.com/facebook/duckling/issues/446
I also tried lts-7.24. I get the exact same error, except it happens while building profunctors.
What could be the problem? Where can I file a bug?
I had the same error in a project using resolver: lts-9.17.
What fixed it for me is to update stack.yaml and use this line:
resolver: lts-10.9

MPI failed for some reason on macOS Mojave

I installed MPI on macOS Mojave following this tutorial on Stack Overflow. I installed openmpi-2.0.4.tar.gz.
But when I tried to run that hello world program I get error:
[My-MacBook-Pro.local:40731] [[30181,0],0] ORTE_ERROR_LOG: Bad parameter in file orted/pmix/pmix_server.c at line 262
[My-MacBook-Pro.local:40731] [[30181,0],0] ORTE_ERROR_LOG: Bad parameter in file ess_hnp_module.c at line 667
--------------------------------------------------------------------------
It looks like orte_init failed for some reason; your parallel process is
likely to abort. There are many reasons that a parallel process can
fail during orte_init; some of which are due to configuration or
environment problems. This failure appears to be an internal failure;
here's some additional information (which may only be relevant to an
Open MPI developer):
pmix server init failed
--> Returned value Bad parameter (-5) instead of ORTE_SUCCESS
Does anyone know how to fix this?
export TMPDIR=/tmp
(or some other temp directory, where the directory name is not too long)

Install Logstash error Errno::ENOMEM Duplicate

i am trying to install elasticsearch with logstash for every mysql action.
i stuck when trying to install logstash .
heres my command.
[root#centos-elasticsearch tampung]# rpm -ivh logstash-6.5.2.rpm
Preparing... ################################# [100%]
Updating / installing...
1:logstash-1:6.5.2-1 ################################# [100%]
Using provided startup.options file: /etc/logstash/startup.options
OpenJDK 64-Bit Server VM warning: If the number of processors is expected to increase from one, then you should configure the number of parallel GC threads appropriately using -XX:ParallelGCThreads=N
Errno::ENOMEM: Cannot allocate memory - systemctl
spawn at org/jruby/RubyProcess.java:1566
spawn at org/jruby/RubyKernel.java:1511
popen_run at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/open3.rb:206
popen3 at /usr/share/logstash/vendor/jruby/lib/ruby/stdlib/open3.rb:102
execute at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:74
detect_systemd at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:29
detect_platform at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:24
detect at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/detector.rb:18
setup_defaults at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:153
execute at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:119
run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67
run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:114
run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132
<main> at /usr/share/logstash/lib/systeminstall/pleasewrap.rb:12
Unable to install system startup script for Logstash.
anyone know what must i do?
i tried to remove logstash,and reinstall.
but still not success.
i tried to upgrade memory..
after that i tried to reinstall again
and i get this.
Updating / installing...
1:logstash-1:6.5.2-1 ################################# [100%]
Using provided startup.options file: /etc/logstash/startup.options
Errno::EISDIR: Is a directory - /etc/default/logstash
write at org/jruby/RubyIO.java:3622
write at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/installer.rb:32
block in install_files at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/installer.rb:23
yield at org/jruby/RubyYielder.java:102
block in files at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/platform/systemd.rb:24
each at org/jruby/RubyGenerator.java:99
install_files at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/installer.rb:18
run_human at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:185
execute at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:141
run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:67
run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/pleaserun-0.0.30/lib/pleaserun/cli.rb:114
run at /usr/share/logstash/vendor/bundle/jruby/2.3.0/gems/clamp-0.6.5/lib/clamp/command.rb:132
<main> at /usr/share/logstash/lib/systeminstall/pleasewrap.rb:12
{:timestamp=>"2018-12-07T07:44:13.341202+0000", :message=>"No platform selected. Autodetecting...", :platform=>"systemd", :version=>"219", :level=>:warn}
{:timestamp=>"2018-12-07T07:44:13.411454+0000", :message=>"Writing file", :destination=>"/etc/default/logstash"}
Unable to install system startup script for Logstash.
As I already wrote in my previous comment, the first error
Errno::ENOMEM: Cannot allocate memory
means that your system is low of phisical memory.
The second one
Errno::EISDIR: Is a directory
means that the file is a directory; and that you cannot open a directory for writing, or create or remove hard links to it.

Class "Veins::ObstacleControl" not found

I have followed step by step the tutorial to install Veins, but when I tried running the example scenario (final step) I ended up with the above error.
The whole error was:
Error in module (cModule) RSUExampleScenario (id=1) during network
setup: Class "Veins::ObstacleControl" not found -- perhaps its code
was not linked in, or the class wasn't registered with
Register_Class(), or in the case of modules and channels, with
Define_Module()/Define_Channel().
TRAPPING on the exception above, due to a debug-on-errors=true
configuration option. Is your debugger ready?
Simulation terminated with exit code: -2147483645 Working directory:
C:/Users/user/src/veins-4.3/examples/veins Command line:
../../../omnetpp-4.6/bin/opp_run.exe -r 0 -n .;../../src/veins
--tkenv-image-path=../../images -l ../../src/veins omnetpp.ini
I don't think I have missed a step during the tutorial as I have tried it two times. I did not make any change in anything, I've just strictly followed the tutorial like a robot, so I cannot provide an MCVE with more details than the tutorial.
Here is what I'm using:
- Windows 7 Pro 64 bits
- SUMO 0.25.0 64 bits
All other steps of the tutorial successfully worked until the final step.
I assume this error occurs when running Veins via the OMNeT++ IDE. Or, if you have compiled it with GCC (The error does not happen if you use CLANG)
There are two ways to bypass this error:
Use the .run as executable from your examples directory, which calls veins/run and includes all the required libraries:
Use opp_run as executable and set dynamic libraries to the directory where libveins.so is located (usually src/veins)
PS: to answer #ChristopSommer questions: Veins::ObstacleControl appears in opp_run -l src/veins -h classes
This could be a solution too, but I never tested it: Compiler flags in Eclipse

Using the valgrind massif tool, Result file not created

I have been following this tutorial for reference:
http://valgrind.org/docs/manual/ms-manual.html
When I am using it to profile my Application Using the command:
valgrind --tool=massif --time-unit=B ./run.o
It finishes but does not produce any output file.
Here is the log while running it using the mentioned command.
https://www.dropbox.com/s/yae78rm9wmdbph1/ValGring_massif_Log?dl=0
Kindly suggest why it won't produce a massif.out.xxxxx file ?
If you look in your log file you will see that Valgrind has
crashed, and it explains why, and what you should do to fix it.
valgrind: m_mallocfree.c:304 (get_bszB_as_is): Assertion 'bszB_lo == bszB_hi' failed.
valgrind: Heap block lo/hi size mismatch: lo = 91849568, hi = 1425748016.
This is probably caused by your program erroneously writing past the
end of a heap block and corrupting heap metadata. If you fix any
invalid writes reported by Memcheck, this assertion failure will
probably go away. Please try that before reporting this as a bug.
Use Valgrind's memcheck to fix
your program and try again.

Resources