jcjohnson / neural-style

Torch implementation of neural style algorithm
MIT License
18.31k stars 2.7k forks source link

Bus error: 10 [OS X 10.10] #232

Open carlodelpizzo opened 8 years ago

carlodelpizzo commented 8 years ago

Im on a Hackintosh, if that makes a difference?

fc0czcl

th neural_style.lua -gpu 0 -print_iter 1

Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Bus error: 10

3DTOPO commented 8 years ago

I am able to run neural-style on Hackintosh. I just never got the CUDA stuff working. How much memory does your system have?

carlodelpizzo commented 8 years ago

16 GB RAM. I get the same bus error if i try with CUDA or not.

I cant really tell, but the CUDA backend seems to be fine. I do have my home directory on a different hard disk than my OS, but i dont think that would cause bus error?

screen shot 2016-05-27 at 17 49 28

3DTOPO commented 8 years ago

As long as you are using -gpu 0 I think the CUDA stuff shouldn't matter. I was just mentioning for completeness.

3DTOPO commented 8 years ago

Oops - I meant -gpu -1 to not use the GPU.

carlodelpizzo commented 8 years ago

Gotcha.. any idea where i can start troubleshooting this bus error? im at a total loss

3DTOPO commented 8 years ago

I would say first try it with -gpu -1. Does that work? If it does, it likely has something to do with CUDA which I abandoned trying to get working and switched to Ubuntu instead. Here the thread my thread on it: https://github.com/jcjohnson/neural-style/issues/91

carlodelpizzo commented 8 years ago

No it doesnt work that way either. I have tried "th neural_style.lua -gpu 0 -print_iter 50" "th neural_style.lua -style_image -content_image " "th neural_style.lua -gpu -1 -style_image -content_image -save_iter 50"

If i try with sudo, it doesnt give me bus error. but doesnt do anything else either: screen shot 2016-05-27 at 18 10 07

3DTOPO commented 8 years ago

That means it worked without the GPU. The fact that you had to do it as su means you probably have some permission errors. It should have written an output file. Do a command in that directory:

ls -l *.png

carlodelpizzo commented 8 years ago

screen shot 2016-05-28 at 00 31 37

3DTOPO commented 8 years ago

Hmm - or maybe not. How long does it take before returning to the command prompt? Try to add this flag:

-print_iter 10

Does it print out any messages then?

carlodelpizzo commented 8 years ago

Its pretty quick. I took a screen-cap, and i got a Segmentation fault once. lol

Screen-cap: https://www.youtube.com/watch?v=11m5K-6JtE8

Log:

Last login: Sat May 28 00:39:22 on ttys000 Carlos-Pro-2:~ carlodelpizzo$ cd neural-style Carlos-Pro-2:neural-style carlodelpizzo$ th neural_style.lua -gpu 0 -print_iter 10 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192 Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Bus error: 10 Carlos-Pro-2:neural-style carlodelpizzo$ th neural_style.lua -gpu -1 -print_iter 10 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192 Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Segmentation fault: 11 Carlos-Pro-2:neural-style carlodelpizzo$ sudo !! sudo th neural_style.lua -gpu -1 -print_iter 10 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192 Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Carlos-Pro-2:neural-style carlodelpizzo$ th neural_style.lua -gpu -1 -print_iter 10 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192 Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Bus error: 10 Carlos-Pro-2:neural-style carlodelpizzo$ th neural_style.lua -gpu 0 -print_iter 10 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192 Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Bus error: 10 Carlos-Pro-2:neural-style carlodelpizzo$

3DTOPO commented 8 years ago

You mentioned you have to run it as sudo to not get the bus error. Try that with the -print_iter flag.

carlodelpizzo commented 8 years ago

i did that during the screen-cap. It does nothing?

Carlos-Pro-2:neural-style carlodelpizzo$ sudo !! sudo th neural_style.lua -gpu -1 -print_iter 10 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192 Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Carlos-Pro-2:neural-style carlodelpizzo$

3DTOPO commented 8 years ago

Hmm - yeah I don't know then sorry. Did you follow the guide to install it? Did you get any errors when you did?

carlodelpizzo commented 8 years ago

yeah i followed the guide. I ran into some problems. i dont remember exactly where. but i sorted through them and verified everything was installed correctly. Im not able to update xcode. I guess im just stuck :( I REALLY appreciate the help though!

3DTOPO commented 8 years ago

I would try wiping everything out, try again, and report what problems you ran into. Perhaps something wasn't done correctly to get past them.

slessie commented 8 years ago

Im getting the same error

Moes-Mac-Pro:neural-style CBattleship$ th neural_style.lua -gpu -1 -print_iter 1 [libprotobuf WARNING google/protobuf/io/coded_stream.cc:537] Reading dangerously large protocol message. If the message turns out to be larger than 1073741824 bytes, parsing will be halted for security reasons. To increase the limit (or to disable these warnings), see CodedInputStream::SetTotalBytesLimit() in google/protobuf/io/coded_stream.h. [libprotobuf WARNING google/protobuf/io/coded_stream.cc:78] The total number of bytes read was 574671192 Successfully loaded models/VGG_ILSVRC_19_layers.caffemodel Bus error: 10

sudo removes the bus error but it still stops. Anyone have any luck?

carlodelpizzo commented 8 years ago

No luck.. :( I tried deleting everything and starting over. Maybe i didnt do it correctly. I didnt get any errors during reinstallation, but still same bus error.

nderkach commented 7 years ago

Getting the same error using Torch with Lua 5.2.

Fixed it by using LuaJIT in Torch.

Hazarapet commented 6 years ago

The same thing on MacOS (ram is 16gm). Is there a way to solve this? I'm using Lua 5.1