First of all, I think you are not initialising correctly. Init should be
called as:
MPI::Init(&argc,&argv);
Anyway, what you are echoing is the key, not the value of the key. To
get the value of the key you should use the MPI::Comm_get_attr method.
For instance with this simple C program:
#include "mpi.h"
#include <stdio.h>
int main( int argc, char **argv)
{
void *v;
int flag;
int vval;
int rank, size;
MPI_Init( &argc, &argv );
MPI_Comm_size( MPI_COMM_WORLD, &size );
MPI_Comm_rank( MPI_COMM_WORLD, &rank );
MPI_Comm_get_attr( MPI_COMM_WORLD, MPI_TAG_UB, &v, &flag );
if (!flag) {
fprintf( stderr, "Could not get TAG_UB\n" );fflush(stderr);
}
else {
vval = *(int*)v;
if (vval < 32767) {
fprintf( stderr, "Got too-small value (%d) for TAG_UB\n", vval
);fflush(stderr);
}
else {
fprintf( stdout, "TAG_UB is (%d)\n", vval );fflush(stdout);
}
}
MPI_Finalize( );
return 0;
}
You get:
[EMAIL PROTECTED]:/root# mpicc -o env env.c
[EMAIL PROTECTED]:/root# ./env
[norsetto:06633] mca: base: components_open: component timer / linux open
function failed
libibverbs: Fatal: couldn't read uverbs ABI version.
--------------------------------------------------------------------------
[0,0,0]: OpenIB on host norsetto was unable to find any HCAs.
Another transport will be used instead, although this may result in
lower performance.
--------------------------------------------------------------------------
TAG_UB is (2147483647)
** Changed in: openmpi (Ubuntu)
Status: New => Invalid
--
MPI::TAG_UB has a value not allowed by the standard
https://bugs.launchpad.net/bugs/225269
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs