1
1
that commit fixes :
- open-mpi/ompi@224f97b009
- open-mpi/ompi@ade7de549c
- open-mpi/ompi@0836344673
- open-mpi/ompi@7e0581c853
- open-mpi/ompi@d948a43993
Этот коммит содержится в:
Gilles Gouaillardet 2015-06-29 09:50:37 +09:00
родитель 6e19505028
Коммит e0dd9bd2e7
4 изменённых файлов: 16 добавлений и 28 удалений

Просмотреть файл

@ -78,7 +78,7 @@
ompi_java_globals_t ompi_java = {0};
int ompi_mpi_java_eager = 65536;
opal_free_list_t ompi_java_buffers = {0};
opal_free_list_t ompi_java_buffers = {{0}};
static void *libmpi = NULL;
static void bufferConstructor(ompi_java_buffer_t *item)

Просмотреть файл

@ -43,7 +43,8 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_createWin(
return (jlong)win;
}
JNIEXPORT jlong JNICALL Java_mpi_Win_create_dynamicWin(
JNIEXPORT jlong JNICALL Java_mpi_Win_createDynamicWin(
JNIEnv *env, jobject jthis,
jlong info, jlong comm)
{
MPI_Win win;
@ -56,24 +57,22 @@ JNIEXPORT jlong JNICALL Java_mpi_Win_create_dynamicWin(
}
JNIEXPORT void JNICALL Java_mpi_Win_attach(
JNIEnv *env, jobject jthis, jobject jBase,
JNIEnv *env, jobject jthis, jlong win, jobject jBase,
jint size)
{
void *base = (*env)->GetDirectBufferAddress(env, jBase);
MPI_Win win;
int rc = MPI_Win_attach(win, base, (MPI_Aint)size);
int rc = MPI_Win_attach((MPI_Win)win, base, (MPI_Aint)size);
ompi_java_exceptionCheck(env, rc);
}
JNIEXPORT void JNICALL Java_mpi_Win_detach(
JNIEnv *env, jobject jthis, jobject jBase)
JNIEnv *env, jobject jthis, jlong win, jobject jBase)
{
void *base = (*env)->GetDirectBufferAddress(env, jBase);
MPI_Win win;
int rc = MPI_Win_detach(win, base);
int rc = MPI_Win_detach((MPI_Win)win, base);
ompi_java_exceptionCheck(env, rc);
}

Просмотреть файл

@ -233,18 +233,6 @@ public final boolean isNull()
return handle == nullHandle;
}
/**
* Java binding of {@code MPI_COMM_GET_INFO}.
* @throws MPIException
*/
public final Info getInfo() throws MPIException
{
MPI.check();
return getInfo(handle);
}
private native void getInfo(long handle, long info) throws MPIException;
/**
* Java binding of {@code MPI_COMM_SET_INFO}.
* @param info info object

Просмотреть файл

@ -76,10 +76,10 @@ private native long createWin(
public Win(Info info, Comm comm)
throws MPIException
{
handle = createWinDynamic(info.handle, comm.handle);
handle = createDynamicWin(info.handle, comm.handle);
}
private native long createWinDynamic(
private native long createDynamicWin(
long info, long comm)
throws MPIException;
@ -99,7 +99,8 @@ private int getBaseType(Datatype orgType, Datatype targetType)
/**
* Java binding of {@code MPI_WIN_ATTACH}.
* @param assertion program assertion
* @param base initial address of window
* @param size size of window (buffer elements)
*/
public void attach(Buffer base, int size) throws MPIException
{
@ -129,7 +130,7 @@ private native void attach(long win, Buffer base, int size) throws MPIException;
/**
* Java binding of {@code MPI_WIN_DETACH}.
* @param assertion program assertion
* @param base initial address of window
*/
public void detach(Buffer base) throws MPIException
{
@ -475,10 +476,10 @@ private native long free(long win) throws MPIException;
public Info getInfo() throws MPIException
{
MPI.check();
return getInfo(handle);
return new Info(getInfo(handle));
}
private native Info getInfo(long win)
private native long getInfo(long win)
throws MPIException;
/**
@ -489,10 +490,10 @@ private native Info getInfo(long win)
public void setInfo(Info info) throws MPIException
{
MPI.check();
setInfo(handle, info);
setInfo(handle, info.handle);
}
private native void setInfo(long win, Info info)
private native void setInfo(long win, long info)
throws MPIException;
} // Win