c***@gmail.com
2009-05-06 10:48:25 UTC
folks i am trying to call MPI_Group_Incl using JNI.
this is the JNI Code snippet
.... (JNIEnv *env, jobject jthis, jintArray ranks).......
int n;
jint *rks;
jboolean isCopy=JNI_TRUE;
MPI_Group newgroup;
n=(*env)->GetArrayLength(env,ranks);
rks=(*env)->GetIntArrayElements(env,ranks,&isCopy);
MPI_Group existing = (MPI_Group)(*env)->GetLongField
(env,jthis,GrouphandleID);
MPI_Group_incl(existing,n,(int*)rks,&newgroup);
(*env)->ReleaseIntArrayElements(env,ranks,rks,0);
return (jlong)newgroup;
One thing i want to tell is that the rks pointer points to an array
that contains {0,1} as i am running it on 2 processors.. And existing
group is not erroneous...
This is the error
[cli_1]: aborting job:
Fatal error in MPI_Group_incl: Invalid rank, error stack:
MPI_Group_incl(143)..............: MPI_Group_incl(group=0x48000000,
n=1, ranks=0x9081a904, new_group=0xb7e0efb0) failed
MPIR_Group_check_valid_ranks(229): Invalid rank in rank array at index
0; value is 0 but must be in the range 0 to -1
rank 1 in job 113 chenab1_50502 caused collective abort of all
ranks
exit status of rank 1: return code 1
rank 0 in job 113 chenab1_50502 caused collective abort of all
ranks
Plz helpout...
this is the JNI Code snippet
.... (JNIEnv *env, jobject jthis, jintArray ranks).......
int n;
jint *rks;
jboolean isCopy=JNI_TRUE;
MPI_Group newgroup;
n=(*env)->GetArrayLength(env,ranks);
rks=(*env)->GetIntArrayElements(env,ranks,&isCopy);
MPI_Group existing = (MPI_Group)(*env)->GetLongField
(env,jthis,GrouphandleID);
MPI_Group_incl(existing,n,(int*)rks,&newgroup);
(*env)->ReleaseIntArrayElements(env,ranks,rks,0);
return (jlong)newgroup;
One thing i want to tell is that the rks pointer points to an array
that contains {0,1} as i am running it on 2 processors.. And existing
group is not erroneous...
This is the error
[cli_1]: aborting job:
Fatal error in MPI_Group_incl: Invalid rank, error stack:
MPI_Group_incl(143)..............: MPI_Group_incl(group=0x48000000,
n=1, ranks=0x9081a904, new_group=0xb7e0efb0) failed
MPIR_Group_check_valid_ranks(229): Invalid rank in rank array at index
0; value is 0 but must be in the range 0 to -1
rank 1 in job 113 chenab1_50502 caused collective abort of all
ranks
exit status of rank 1: return code 1
rank 0 in job 113 chenab1_50502 caused collective abort of all
ranks
Plz helpout...