[mpich-discuss] Nemesis engine query by Viswanath

Balaji, Pavan balaji at anl.gov
Mon Aug 3 10:48:20 CDT 2015


I first tried your program after removing the boost declarations, and it worked correctly:

#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<vector>
#include<pthread.h>
#include<mpi.h>

using namespace std;

#define MASTER 0

int main(int argc, char *argv[])
{
    int rankID, numprocessors,provided;
    int returnvalue = MPI_Init_thread(&argc,&argv,MPI_THREAD_MULTIPLE,&provided);

    printf("\n VALUE OF PROVIDED IS %d",provided);
    printf("\n VALUE OF MPI_THREAD_MULTIPLE IS %d",MPI_THREAD_MULTIPLE);
    if(provided < MPI_THREAD_MULTIPLE)
    {
        printf("\n THREAD LIBRARY DOESN'T HAVE MULTITHREADING SUPPORT:");
    }

    MPI_Finalize();

    return 0;
}

With respect to Boost, yes, MPICH works correctly with Boost.  But it is possible that something is not setup correctly in your installation of Boost.  Did you make sure you are linking with the correct MPI library?

  -- Pavan

From: Viswanath Krishnamurthy
Reply-To: "discuss at mpich.org<mailto:discuss at mpich.org>"
Date: Monday, August 3, 2015 at 8:28 AM
To: "discuss at mpich.org<mailto:discuss at mpich.org>"
Subject: Re: [mpich-discuss] Nemesis engine query by Viswanath

Hi,

Thanks for the previous post on MPI_Init_thread. Here is the sample program which failed


#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<iostream>
#include<vector>
#include<pthread.h>
#include<mpi.h>
#include <boost/mpi/environment.hpp>
#include <boost/mpi/communicator.hpp>
#include <boost/serialization/vector.hpp>
#include <boost/mpi.hpp>
using namespace std;
using namespace boost::serialization;
using namespace boost::archive;
namespace mpi = boost::mpi; // using mpi library under boost namespace
mpi::environment env;
mpi::communicator world;
#define MASTER 0
// Aim of this program is to print the Rank of each process and size of number of MPI Run
int main(int argc, char *argv[])
{
// Declarations and prototypes
int rankID, numprocessors,provided;
// Any serial code goes in here
// Initialize the MPI Environment over here
//MPI_Init(&argc,&argv);
int returnvalue = MPI_Init_thread(&argc,&argv,MPI_THREAD_MULTIPLE,&provided);
       printf("\n VALUE OF PROVIDED IS %d",provided);
printf("\n VALUE OF MPI_THREAD_MULTIPLE IS %d",MPI_THREAD_MULTIPLE);
if(provided < MPI_THREAD_MULTIPLE)
        {
                printf("\n THREAD LIBRARY DOESN'T HAVE MULTITHREADING SUPPORT:");
                //exit(1);
        }

// Terminate the MPI Environment
MPI_Finalize();

}

Error got:

Assertion failed in file /home/viswa/libraries/mpich-3.1.4/src/include/mpiimplthreadpost.h at line 163: depth > 0 && depth < 10
internal ABORT - process 1
internal ABORT - process 0

I tried to use boost library in my MPI Code. Is MPI_Init_thread
designed to work with Boost libraries?. If not, please suggest an alternative to
send vectors(STL types) using MPI.

MPI version - 3.1.4

CPU Info:

Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                8
On-line CPU(s) list:   0-7
Thread(s) per core:    1
Core(s) per socket:    4
Socket(s):             2
NUMA node(s):          1
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 44
Stepping:              2
CPU MHz:               3458.000
BogoMIPS:              6916.00
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              12288K
NUMA node0 CPU(s):     0-7


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mpich.org/pipermail/discuss/attachments/20150803/43b31c11/attachment.html>
-------------- next part --------------
_______________________________________________
discuss mailing list     discuss at mpich.org
To manage subscription options or unsubscribe:
https://lists.mpich.org/mailman/listinfo/discuss


More information about the discuss mailing list