Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8099131
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T22:18:17+00:00 2026-06-05T22:18:17+00:00

After installing gcc and mpich library in my linux I can compile my codes

  • 0

After installing gcc and mpich library in my linux I can compile my codes with mpicxx compiler. Is it possible to use c++11 with mpi library with just upgrading gcc compiler?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T22:18:19+00:00Added an answer on June 5, 2026 at 10:18 pm

    Changing the compiler with a newer version should work in general unless some strong code generation changes are observed (e.g. different data alignment or different ABIs). MPI is a library and as such it doesn’t care what language constructs you are using as long as those constructs don’t mess up with its internals. Since you are going to use C++11 for the threading it provides, there are some things that you should be aware of.

    First, multithreading doesn’t always play nice with MPI. Most MPI implementations are internally threaded themselves but are not thread safe by default.

    Second, MPI defines four levels of threading support:

    • MPI_THREAD_SINGLE: no threading support – MPI would function safely only when used by a single-threaded application;
    • MPI_THREAD_FUNNELED: partial threading support – MPI can be used in a multithreaded application but only the main thread may call to MPI;
    • MPI_THREAD_SERIALIZED: partial threading support – MPI can be used in a multithreaded application but no concurrent calls in different threads are allowed. That is, each thread can call into MPI but a serialisation mechanism has to be in place;
    • MPI_THREAD_MULTIPLE: full threading support – MPI can be called freely from many threads.

    Truth is most MPI implementations support out of the box MPI_THREAD_FUNNELED at max with most of them supporting only MPI_THERAD_SINGLE. Open MPI for example has to be compiled with a non-default option in order to get the full threading support.

    Multithreaded applications should initialise the MPI library using MPI_Init_thread() instead of MPI_Init() and the thread that makes the initialisation call becomes the main thread – the very same main thread that is only allowed to call into MPI when the supported level is MPI_THREAD_FUNNELED. One gives MPI_Thread_init() the desired level of threading support and the function returns the supported level which might be lower than desired. In the latter case correct and portable programs are supposed to act accordingly and either switch to non-threaded operation or abort with the respective error message to the user.

    More information about how MPI works together with threads can be found in the MPI Standard v2.2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using the Boost library in Linux, GCC. After installing and building the
After checking the posts: Install gcc on linux with no root privilege https://stackoverflow.com/questions/9316118/installing-gcc-as-non-root My
After installing rails3, I'm experiencing problems when trying to use haml with it. I
after installing XAMPP on linux i have seen the folder htdocs belongs to nobody.
After installing VS2010 yesterday - (both VS2005 and VS2010 installed), I can't find the
I tried installing ruby 1.9.3 on Snow Leopard using: rvm install 1.9.3 --with-gcc=clang After
After installing VS Sp1, the build breaks as it can't find LC.exe (to run
After upgrading to Lion, and installing XCode 4.3 I can't get Hello, World to
After installing export plugin i can not run grails application and get this java.lang.LinkageError:
After installing Lion, Aptana has stopped working -- I can no longer run any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.