Fix Java related warnings
This commit fixes java related warnings. Fixes #881 Signed-off-by: Nathaniel Graham <ngraham@lanl.gov>
Этот коммит содержится в:
родитель
a3ba62dcb9
Коммит
c4d70ab425
@ -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)
|
||||
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
@ -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;
|
||||
|
@ -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
|
||||
{
|
||||
@ -41,6 +42,7 @@ private native ByteBuffer malloc(int size);
|
||||
* <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
|
||||
{
|
||||
@ -54,6 +56,7 @@ private native ByteBuffer memalign(int align, int size);
|
||||
* 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
|
||||
{
|
||||
|
@ -10,6 +10,7 @@ private long handle;
|
||||
/**
|
||||
* Allocates a symmetric work array.
|
||||
* @param size Number of elements in the work array.
|
||||
* @throws ShMemException Allocation error.
|
||||
*/
|
||||
public PSync(int size) throws ShMemException
|
||||
{
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user