Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I solved this issue by upgrading my GCC compiler on centOS, Initially, I had GCC version 4.8.0 and when I upgraded it to GCC 7.3.0. this problem of sequential running had gone.

I also added in my CMakeLists.txt file this :

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")

I solved this issue by upgrading my GCC compiler on centOS, Initially, I had GCC version 4.8.0 and when I upgraded it to GCC 7.3.0. this problem of sequential running had gone.

upgrading GCC 7.3 on CentOS 7

1 - update installed packages

sudo yum -y update

2 - Install GCC from the official CentOS repositories

sudo yum -y install gcc

3 - also install gcc-c++

sudo yum -y install gcc-c++

4 - install gcc from source, in fact, it is recommended to start a screen session before starting.

screen -U -S gcc

5 - get the tarball of the GCC

wget http://ftp.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-7.3.0/gcc-7.3.0.tar.gz

6 - Unpack the archive and get in the current working directory

sudo tar zxf gcc-7.3.0.tar.gz
cd gcc-7.3.0

7 - setup bzip2 and run the ‘download_prerequisites’ script. You have to run this from the top level of the GCC source tree.

sudo yum -y install bzip2
./contrib/download_prerequisites

8 - Once you get downloaded prerequisites, run this command to start configuring the GCC build environment

./configure --disable-multilib --enable-languages=c,c++

9 - Once it finishes, you've to compile the source code. It may take a few hours to complete, so be patient.

sudo make -j 4
sudo make install

I also added in my CMakeLists.txt file this :

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -pthread")