gchen98 / mendel-gpu

Automatically exported from code.google.com/p/mendel-gpu
0 stars 0 forks source link

both use_gpu and use_cpu could be set to 0 or 1 #9

Closed mcol closed 9 years ago

mcol commented 9 years ago

I'm not sure why we need both flags: I would have thought that if we set use_gpu=1 it should imply that use_cpu=0. Why is that not the case?

In any case, if both are set to 0, the code runs apparently correctly, but the result files are empty.

gchen98 commented 9 years ago

Yes, you might have a better way of doing it. i.e. if both set to zero we should just exit early and notify the user at least one has to be set. My intention of having this as an OR instead of XOR was so that output from both calculations can be compared in a single run. It saves debugging effort.

mcol commented 9 years ago

That's interesting and it could be useful. But how do you make it work? There's only one set of outputs that I can see.

gchen98 commented 9 years ago

For example, check out lines 82 to lines 86 of src/imputation/guide.cpp. You'll see that both imputations can run if the respective flags are set. I might have just commented out debugging output, but those output should be enabled if debug=1.

mcol commented 9 years ago

Thanks! Since this makes the program stop after one iteration I've added a message to explain what's going on in 7447db0421fec2b9497d30e16f9cc9f2914e746b.

gchen98 commented 9 years ago

That's fine.