/*
* Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2005 The University of Tennessee and The University
* of Tennessee Research Foundation. All rights
* reserved.
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
* University of Stuttgart. All rights reserved.
* Copyright (c) 2004-2005 The Regents of the University of California.
* All rights reserved.
* Copyright (c) 2015 Research Organization for Information Science
* and Technology (RIST). All rights reserved.
* Copyright (c) 2015 Los Alamos National Security, LLC. All rights
* reserved.
* Copyright (c) 2017-2018 FUJITSU LIMITED. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*
* This file is almost a complete re-write for Open MPI compared to the
* original mpiJava package. Its license and copyright are listed below.
* See <path to ompi/mpi/java/README> for more information.
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*
* File : Comm.java
* Author : Sang Lim, Sung-Hoon Ko, Xinying Li, Bryan Carpenter
* Created : Thu Apr 9 12:22:15 1998
* Revision : $Revision: 1.20 $
* Updated : $Date: 2001/08/07 16:36:25 $
* Copyright: Northeast Parallel Architectures Center
* at Syracuse University 1998
*
*
*
* IMPLEMENTATION DETAILS
*
* All methods with buffers that can be direct or non direct have
* a companion argument 'db' which is true if the buffer is direct.
* For example, if the buffer argument is recvBuf, the companion
* argument will be 'rdb', meaning if the receive buffer is direct.
*
* Checking if a buffer is direct is faster in Java than C.
*/
package mpi;
import java.nio.*;
import static mpi.MPI.assertDirectBuffer;
/**
* The {@code Comm} class represents communicators.
*/
public class Comm implements Freeable, Cloneable
{
public final static int TYPE_SHARED = 0;
protected final static int SELF = 1;
protected final static int WORLD = 2;
protected long handle;
private Request request;
private static long nullHandle;
static
{
init();
}
private static native void init();
protected Comm()
{
}
protected Comm(long handle)
{
this.handle = handle;
}
protected Comm(long[] commRequest)
{
handle = commRequest[0];
request = new Request(commRequest[1]);
}
protected final void setType(int type)
{
getComm(type);
}
private native void getComm(int type);
/**
* Duplicates this communicator.
* <p>Java binding of {@code MPI_COMM_DUP}.
* <p>It is recommended to use {@link #dup} instead of {@link #clone}
* because the last can't throw an {@link mpi.MPIException}.
* @return copy of this communicator
*/
@Override public Comm clone()
{
try
{
return dup();
}
catch(MPIException e)
{
throw new RuntimeException(e.getMessage());
}
}
/**
* Duplicates this communicator.
* <p>Java binding of {@code MPI_COMM_DUP}.
* @return copy of this communicator
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
public Comm dup() throws MPIException
{
MPI.check();
return new Comm(dup(handle));
}
protected final native long dup(long comm) throws MPIException;
/**
* Duplicates this communicator.
* <p>Java binding of {@code MPI_COMM_IDUP}.
* <p>The new communicator can't be used before the operation completes.
* The request object must be obtained calling {@link #getRequest}.
* @return copy of this communicator
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
public Comm iDup() throws MPIException
{
MPI.check();
return new Comm(iDup(handle));
}
protected final native long[] iDup(long comm) throws MPIException;
/**
* Duplicates this communicator with the info object used in the call.
* <p>Java binding of {@code MPI_COMM_DUP_WITH_INFO}.
* @param info info object to associate with the new communicator
* @return copy of this communicator
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
public Comm dupWithInfo(Info info) throws MPIException
{
MPI.check();
return new Comm(dupWithInfo(handle, info.handle));
}
protected final native long dupWithInfo(long comm, long info) throws MPIException;
/**
* Returns the associated request to this communicator if it was
* created using {@link #iDup}.
* @return associated request if this communicator was created
* using {@link #iDup}, or null otherwise.
*/
public final Request getRequest()
{
return request;
}
/**
* Size of group of this communicator.
* <p>Java binding of the MPI operation {@code MPI_COMM_SIZE}.
* @return number of processors in the group of this communicator
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
public final int getSize() throws MPIException
{
MPI.check();
return getSize(handle);
}
private native int getSize(long comm) throws MPIException;
/**
* Rank of this process in group of this communicator.
* <p>Java binding of the MPI operation {@code MPI_COMM_RANK}.
* @return rank of the calling process in the group of this communicator
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
public final int getRank() throws MPIException
{
MPI.check();
return getRank(handle);
}
private native int getRank(long comm) throws MPIException;
/**
* Compare two communicators.
* <p>Java binding of the MPI operation {@code MPI_COMM_COMPARE}.
* @param comm1 first communicator
* @param comm2 second communicator
* @return
* {@code MPI.IDENT} results if the {@code comm1} and {@code comm2}
* are references to the same object (ie, if {@code comm1 == comm2}).<br>
* {@code MPI.CONGRUENT} results if the underlying groups are identical
* but the communicators differ by context.<br>
* {@code MPI.SIMILAR} results if the underlying groups are similar
* but the communicators differ by context.<br>
* {@code MPI.UNEQUAL} results otherwise.
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
public static int compare(Comm comm1, Comm comm2) throws MPIException
{
MPI.check();
return compare(comm1.handle, comm2.handle);
}
private static native int compare(long comm1, long comm2) throws MPIException;
/**
* Java binding of the MPI operation {@code MPI_COMM_FREE}.
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
@Override final public void free() throws MPIException
{
MPI.check();
handle = free(handle);
}
private native long free(long comm) throws MPIException;
/**
* Test if communicator object is null (has been freed).
* Java binding of {@code MPI_COMM_NULL}.
* @return true if the comm object is null, false otherwise
*/
public final boolean isNull()
{
return handle == nullHandle;
}
/**
* Java binding of {@code MPI_COMM_SET_INFO}.
* @param info info object
* @throws MPIException Signals that an MPI exception of some sort has occurred.
*/
public final void setInfo(Info info) throws MPIException
{
MPI.check();
setInfo(handle, info.ha
没有合适的资源?快使用搜索试试~ 我知道了~
ubuntu openmpi下载
需积分: 0 1 下载量 19 浏览量
2022-12-04
11:58:50
上传
评论
收藏 16.37MB GZ 举报
温馨提示
共7645个文件
c:3149个
h:1162个
f90:767个
ubuntu openmpi下载
资源推荐
资源详情
资源评论
收起资源包目录
ubuntu openmpi下载 (7645个子文件)
orterun.1in 57KB
generic_wrapper.1in 8KB
ompi_info.1in 8KB
mpijavac.1in 5KB
oshmem_info.1in 5KB
orte-info.1in 4KB
opal-restart.1in 4KB
orte-clean.1in 3KB
opal-checkpoint.1in 3KB
orte-server.1in 2KB
opal_wrapper.1in 2KB
orted.1in 1KB
mpisync.1in 1KB
mpif77.1in 1KB
MPIX_Barrier_init.3in 27KB
MPI_Reduce.3in 18KB
intro_shmem.3in 17KB
MPI_Gatherv.3in 15KB
MPI_Comm_spawn.3in 14KB
MPI_Comm_spawn_multiple.3in 14KB
MPI_Reduce_local.3in 11KB
shmem_short_sum_to_all.3in 10KB
shmem_short_prod_to_all.3in 10KB
MPI_Scatterv.3in 10KB
MPI.3in 9KB
shmem_short_max_to_all.3in 9KB
MPI_Grequest_start.3in 9KB
shmem_short_min_to_all.3in 9KB
MPI_Gather.3in 9KB
MPI_Get_accumulate.3in 9KB
MPI_Neighbor_alltoallv.3in 9KB
MPI_Put.3in 8KB
shmem_alltoall32.3in 8KB
MPI_Alltoallw.3in 8KB
MPI_Alltoallv.3in 8KB
shmem_short_xor_to_all.3in 8KB
MPI_Neighbor_alltoallw.3in 8KB
MPI_Neighbor_alltoall.3in 8KB
MPI_Op_create.3in 8KB
MPI_Accumulate.3in 8KB
shmem_short_and_to_all.3in 8KB
MPI_Scatter.3in 8KB
shmem_short_or_to_all.3in 8KB
MPI_Allgather.3in 7KB
MPI_Allgatherv.3in 7KB
shmem_collect32.3in 7KB
MPI_T_pvar_get_info.3in 7KB
MPI_File_open.3in 7KB
MPI_Pack_external.3in 7KB
MPI_Scan.3in 7KB
MPI_Alltoall.3in 7KB
MPI_Unpack_external.3in 7KB
MPI_Type_create_darray.3in 7KB
shmem_broadcast32.3in 7KB
MPI_File_set_view.3in 7KB
MPI_Dist_graph_create.3in 7KB
MPI_Unpack.3in 6KB
MPI_Neighbor_allgatherv.3in 6KB
MPI_Waitsome.3in 6KB
MPI_Allreduce.3in 6KB
MPI_Publish_name.3in 6KB
MPI_Type_get_contents.3in 6KB
MPI_Type_create_subarray.3in 6KB
shmem_short_iget.3in 6KB
MPI_Win_create.3in 6KB
shmem_short_iput.3in 6KB
MPI_Exscan.3in 6KB
MPI_Recv.3in 6KB
MPI_Type_indexed.3in 6KB
MPI_Dist_graph_create_adjacent.3in 6KB
MPI_Keyval_create.3in 6KB
MPI_Testsome.3in 6KB
MPI_Get.3in 6KB
MPI_Reduce_scatter.3in 6KB
MPI_Neighbor_allgather.3in 6KB
OMPI_Affinity_str.3in 6KB
MPI_Init_thread.3in 6KB
shmem_char_put.3in 6KB
MPI_Reduce_scatter_block.3in 5KB
shmem_wait.3in 5KB
MPI_Comm_create_keyval.3in 5KB
MPI_Sendrecv.3in 5KB
MPI_Register_datarep.3in 5KB
MPI_Type_create_keyval.3in 5KB
MPI_Probe.3in 5KB
shmem_char_get.3in 5KB
MPI_Comm_split.3in 5KB
MPI_Win_allocate_shared.3in 5KB
MPI_Bcast.3in 5KB
MPI_Get_elements.3in 5KB
MPI_Waitall.3in 5KB
MPI_T_cvar_get_info.3in 5KB
MPI_Win_create_keyval.3in 5KB
MPI_Graph_create.3in 5KB
MPI_Testany.3in 5KB
MPI_Waitany.3in 5KB
MPI_Comm_split_type.3in 5KB
MPI_Type_create_f90_complex.3in 5KB
MPI_File_get_info.3in 5KB
MPI_Type_create_f90_real.3in 5KB
共 7645 条
- 1
- 2
- 3
- 4
- 5
- 6
- 77
资源评论
爱学习的广东仔
- 粉丝: 1w+
- 资源: 130
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功