This command produces a binary file a.out. We’re going to take all those flags and put them after the Apple C compiler like so:Ĭ++ -g config.cpp main.cpp mtrand.cpp -I/usr/local/include -L/usr/local/lib -lmpiĭon’t forget to add the debugging flag -g. G++ config.cpp main.cpp mtrand.cpp -I/usr/local/include -L/usr/local/lib -lmpi This doesn’t actually compile the code, it just tells you the command that would have actually been executed with the C compiler. To start, we use the -show-me:compile flag with our usual compilation command Mpic++ is just a wrapper for the system C++ compiler, but on my system is defaults to g++ and we want to switch to c++ (the Apple C compiler). I’m not sure how useful this guide is to others, but honestly I’m writing it to remember how to do this in the future. This seems to be pretty buggy, but it does work. It turns out it’s possible to get it to play well with MPI code (although it may not work for actually multithreaded processes). The Xcode visual debugger is really nice and easy to use.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |