'OpenMP parallelizaiton in Linux using Makefile

I am new to the openmp parallelization, and will be thankful if someone can provide advice.

My target is to enable openmp parallelization and reduce the simulation timing by increasing the number of threads.

I am using intel compiler in linux to proceed with openmp parallelization by using a makefile.

The makefile is as following.

# for ifort
ifeq (${FC},ifort)
    MKLROOT = /opt/intel/mkl/lib/intel64
        FFLAGS += -I${MKLROOT}/include/intel64 -I${MKLROOT}/include
        LDFLAGS += -L${MKLROOT}/lib/intel64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -qopenmp -liomp5 -lpthread -lm -ldl 
endif

While I run this script, if I increase the number of threads, then there is no particular effect on the parallelization timing. I was wondering if there is any problem in the script.

Can someone guide please? Thank you very much.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source