A brief note about how to setup ide for openmp.
Windows:
Visual studio: In solution configuration c++ language setting, there is a "openmp enable" setting.
Dev C++: In 5.3.0.0, they add support of openmp. In compiler option, choose TDM-GCC, add " -fopenmp" flag to the linker command.
Mac:
xCode: It seems that only 4.* xcode has g++ that support openMP. If you already updated to xcode 5, download old version xcode here. You may need an apple developer account to enter the webpage. You can have multiple versions of xcode as long as you put them in different folders.
In target setting, change compiler to gcc,
then search "openMp" and enable the flag.