Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ompi/mpi/java/c/mpi_MPI.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -1021,7 +1021,7 @@ void ompi_java_getDatatypeArray(JNIEnv *env, jlongArray array,
void ompi_java_forgetDatatypeArray(JNIEnv *env, jlongArray array,
jlong *jptr, MPI_Datatype *cptr)
{
if(jptr != cptr)
if((long)jptr != (long)cptr)
free(cptr);

(*env)->ReleaseLongArrayElements(env, array, jptr, JNI_ABORT);
Expand Down
10 changes: 6 additions & 4 deletions ompi/mpi/java/c/mpi_Win.c
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,8 @@ JNIEXPORT void JNICALL Java_mpi_Win_compareAndSwap (JNIEnv *env, jobject jthis,
void *compPtr = (*env)->GetDirectBufferAddress(env, compareAddr);
void *resultPtr = (*env)->GetDirectBufferAddress(env, resultAddr);

int rc = MPI_Compare_and_swap(orgPtr, compPtr, resultPtr, dataType, targetRank, targetDisp, (MPI_Win)win);
int rc = MPI_Compare_and_swap(orgPtr, compPtr, resultPtr, (MPI_Datatype)dataType,
targetRank, targetDisp, (MPI_Win)win);
ompi_java_exceptionCheck(env, rc);
}

Expand All @@ -457,7 +458,8 @@ JNIEXPORT void JNICALL Java_mpi_Win_fetchAndOp(JNIEnv *env, jobject jthis, jlong
void *resultPtr = (*env)->GetDirectBufferAddress(env, resultAddr);
MPI_Op op = ompi_java_op_getHandle(env, jOp, hOp, baseType);

int rc = MPI_Fetch_and_op(orgPtr, resultPtr, dataType, targetRank, targetDisp, op, (MPI_Win)win);
int rc = MPI_Fetch_and_op(orgPtr, resultPtr, (MPI_Datatype)dataType, targetRank,
targetDisp, op, (MPI_Win)win);
ompi_java_exceptionCheck(env, rc);
}

Expand All @@ -477,7 +479,7 @@ JNIEXPORT void JNICALL Java_mpi_Win_setName(
JNIEnv *env, jobject jthis, jlong handle, jstring jname)
{
const char *name = (*env)->GetStringUTFChars(env, jname, NULL);
int rc = MPI_Win_set_name((MPI_Comm)handle, (char*)name);
int rc = MPI_Win_set_name((MPI_Win)handle, (char*)name);
ompi_java_exceptionCheck(env, rc);
(*env)->ReleaseStringUTFChars(env, jname, name);
}
Expand All @@ -487,7 +489,7 @@ JNIEXPORT jstring JNICALL Java_mpi_Win_getName(
{
char name[MPI_MAX_OBJECT_NAME];
int len;
int rc = MPI_Win_get_name((MPI_Comm)handle, name, &len);
int rc = MPI_Win_get_name((MPI_Win)handle, name, &len);

if(ompi_java_exceptionCheck(env, rc))
return NULL;
Expand Down
3 changes: 3 additions & 0 deletions oshmem/shmem/java/java/Addr.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ private Addr()
* Allocates a block of memory in the symmetric heap of the calling PE.
* <p>Java binding of {@code shmalloc}.
* @param size Size of the requested memory block, in bytes.
* @throws ShMemException Allocation error.
*/
public Addr(int size) throws ShMemException
{
Expand All @@ -41,6 +42,7 @@ public Addr(int size) throws ShMemException
* <p>Java binding of {@code shmemalign}.
* @param align Size of the alignment block, in bytes.
* @param size Size for the memory block, in bytes.
* @throws ShMemException Allocation error.
*/
public Addr(int align, int size) throws ShMemException
{
Expand All @@ -54,6 +56,7 @@ public Addr(int align, int size) throws ShMemException
* Expands or reduces the size of the block.
* <p>Java binding of {@code shrealloc}.
* @param size New size for the memory block, in bytes.
* @throws ShMemException Allocation error.
*/
public void realloc(int size) throws ShMemException
{
Expand Down
1 change: 1 addition & 0 deletions oshmem/shmem/java/java/PSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public final class PSync
/**
* Allocates a symmetric work array.
* @param size Number of elements in the work array.
* @throws ShMemException Allocation error.
*/
public PSync(int size) throws ShMemException
{
Expand Down