Compiling openmp with Intel openmpi

User 287 | 5/7/2014, 11:10:39 PM

Hi,

I want to compile a graphlab toolkit on a system which only supports Intel openmpi (openmpi/1.6.5-intel). I know for compiling openmp I need to use -openmp instead of -fopenmp for Intel compilers. Is there any way to change -fopenmp to -openmp in all makefiles?

I compiled my toolkit program without loading openmpi module (only with g++) and the openmp worked well in a single node. However, when I load the openmpi, configure graphlab, and compile my toolkit, openmp doesn't work.

Thanks

Comments

User 6 | 5/8/2014, 4:57:48 AM

Not sure I understand your question. openmp is a parallel threading library which works inside a single multicore machine. openmpi is a message passing library which handles communication in a cluster. GraphLab is configured to work with both - openmp is used to internally parallel computation and openmpi is used for parallelizing computation among machines.

Is the problem that you want to compile using icc instead of gcc? https://software.intel.com/sites/products/documentation/studio/composer/en-us/2011Update/compilerc/optaps/common/optapsparcompatlibs_using.htm In this case you will need to edit CMakeLists.txt : https://github.com/graphlab-code/graphlab/blob/master/CMakeLists.txt#L42 and use the icc flag.


User 287 | 5/8/2014, 10:06:20 PM

Hi

Thanks for your response. What do you mean by "use the icc flag"? Is there any flag in graphlab ./configure or make files that I can change default compiler?

Thanks


User 6 | 5/9/2014, 3:57:20 AM

You can change it here: https://github.com/graphlab-code/graphlab/blob/master/configure#L206 and reconfigure, or define CC=icc in your environment, or pass -D CC=icc when calling configure.


User 316 | 5/28/2014, 9:48:57 PM

Apparently when you use the -D option whatever you specify is ignored...as this is what you get from the configure script -> "Manually-specified variables were not used by the project: CC CXX". Then, if you decide to change the configure script to use icpc and icc instead of g++ and gcc...as you build...you can see a bunch of calls to g++ and gcc when you expect none.