gchen98 / pimsa

Automatically exported from code.google.com/p/pimsa
0 stars 1 forks source link

implement it in Mac ox #1

Closed TinaShi closed 7 years ago

TinaShi commented 7 years ago

Hello, I am trying to implement it in Mac. I am not sure how to do it, can you help me with it? Thanks.

TinaShi commented 7 years ago

Hello, I have dependencies on Mac. Now I am trying to compile the code, since I am very new to C++, I have some trouble to change the values for CFLAGS and LINKFLAGS. Would you like to offer some help with that?

TinaShi commented 7 years ago

You mentioned "You may have to change the first few lines in makefile that declare the variables CFLAGS and LINKFLAGS if your installation of MySQL and GSL are not in standard locations." My question is what are standard locations? MySQL location: /usr/local/bin/mysql GSL location: /usr/local/Cellar/gsl/2.3 How should I change the values if their locations are as above on my computer. Thanks.

gchen98 commented 7 years ago

ok lemme test on my laptop right now

gchen98 commented 7 years ago

Tina,

I have just tested it on Mac OS and it seems to compile and run OK now. I made a few small bug fixes. Here is what to do

1) go to the project directory and run "git pull" 2) open the makefile. you'll see a path in there with "cellar" which is similar to your path. change that path to match your path. I also disabled mysql access to simplify things. 3) "make clean" then "make" 4) go to either samples/endophenotypes or samples/annotations directory and run "./run.sh"

You should be able to see the program run now.

TinaShi commented 7 years ago

Thanks a lot for your help. It indeed shows "succeeded". With your help in this way, I feel much more confident to spend more time on coding with this algorithm. I will try to catch up with C++ myself in order to understand your code better.

gchen98 commented 7 years ago

yeah the *.out files should show the output for the posterior realizations at each iteration. You could then generate trace plots out of them.

TinaShi commented 7 years ago

Hi, I got the empty files since there are some setting issues on my side. I think I am very close. My gcc version: 4.8.5, Mac version: macOS Sierra version 10.12.5. I changed some small things, for example, in utility.cpp, uint gives me errors, I changed them into uint64_t. I did not know where to set the path of boost, I moved it to gsl directory. After "make", I saw the path of boost is "-I/usr/include/boost141", which is different from mine, would you mind to tell me where to set the new path? The last issue I had was as below: "yld: lazy symbol binding failed: Symbol not found: ZNSt8detail15_List_node_base7_MhookEPS0 Referenced from: /Users/tinashi/Documents/pimsa-master/samples/endophenotype/../../analyzer (which was built for Mac OS X 10.12) Expected in: /usr/lib/libstdc++.6.dylib

dyld: Symbol not found: ZNSt8detail15_List_node_base7_MhookEPS0 Referenced from: /Users/tinashi/Documents/pimsa-master/samples/endophenotype/../../analyzer (which was built for Mac OS X 10.12) Expected in: /usr/lib/libstdc++.6.dylib

./run.sh: line 1: 13226 Abort trap: 6 ../../analyzer pimsa" I know our computer settings are different, but if you can help with the last issue, I think I am pretty close to getting the output. Thanks.

gchen98 commented 7 years ago

i am not sure. that message is very cryptic. did you install boost development headers properly already? the -I should point to the base directory where you see the boost header files.

TinaShi commented 7 years ago

Yes, the location I have is installed boost is "/usr/local/Cellar/boost/1.64.0_1", I want to change the -I information, but I did not find the line of code that needs to be changed. The other one I am working on it now based on this link https://stackoverflow.com/questions/15541706/handling-dyld-lazy-symbol-binding-failed-symbol-not-found-error-when-nm-does. Hopefully I can get some luck.

TinaShi commented 7 years ago

I located the place to change boost location, but it is not the main issue. The other thing that causes trouble was I had another gcc in anaconda, and I accidentally placed it in front of the standard gcc in bashfile. Now it is fixed and running on my side. I will dig into the code and results. Thanks a lot for your help.