public MPI_Op Op_c2f(byte[] C_MPI_Op) { IntPtr _c_op = OPENMPI_Converter.ByteArray2IntPtr(C_MPI_Op); MPI_Op ret; ret.m1 = m_conv.MPI_Op_c2f(_c_op); return(ret); }
public MPI_Comm Comm_c2f(byte[] C_MPI_Comm) { IntPtr _c_MPI_Comm = OPENMPI_Converter.ByteArray2IntPtr(C_MPI_Comm); MPI_Comm ret; ret.m1 = m_conv.MPI_Comm_c2f(_c_MPI_Comm); return(ret); }
/// <summary> /// ctor /// </summary> internal FortranMPIdriver() : base( new string[] { "msmpi.dll", "libmpi_f77.so", "libfmpich.so", "libmpi_mpifh.so", "openmpi/libmpi_mpifh.so", "/usr/local/opt/open-mpi/lib/libmpi_mpifh.dylib" }, new string[6][][], new GetNameMangling[] { Utils.DynLibLoader.Identity, Utils.DynLibLoader.Identity, Utils.DynLibLoader.Identity, Utils.DynLibLoader.Identity, Utils.DynLibLoader.Identity, MacOsMangling }, //new PlatformID[] {PlatformID.Win32NT, PlatformID.Unix, PlatformID.Unix }, Helper(), new int[] { -1, -1, -1, -1, -1, -1 }) { // depending on the MPI flavor, we define the Datatype // --------------------------------------------------- if (base.CurrentLibraryName.ToLowerInvariant().Contains("msmpi") || base.CurrentLibraryName.ToLowerInvariant().Contains("mpich")) { m_MPI_Comm = new MPICH_MPI_Comm(); m_MiscConstants = new MPICH_MiscConstants(); m_Flavour = MPI_Flavour.MPICH; m_MPI_OP = new MPICH_MPI_op(); m_MPI_Datatype = new MPICH_MPI_Datatype(); } else if (base.CurrentLibraryName.ToLowerInvariant().Contains("libmpi")) { OPENMPI_Converter conv = new OPENMPI_Converter(); m_MPI_Comm = new OpenMPI_MPI_Comm(conv); if (base.CurrentLibraryName.ToLowerInvariant().Contains("mpi_f77")) { dirrtyMpiInitHack = 1; } else if (base.CurrentLibraryName.ToLowerInvariant().Contains("mpi_mpifh")) { dirrtyMpiInitHack = 2; } //throw new NotImplementedException(); m_MiscConstants = new OPENMPI_MiscConstants(conv); m_Flavour = MPI_Flavour.OpenMPI; m_MPI_OP = new OpenMPI_MPI_Op(conv); m_MPI_Datatype = new OpenMPI_MPI_Datatype(conv); } else { throw new NotImplementedException("Unknown MPI;"); } }
public OPENMPI_MiscConstants(OPENMPI_Converter conv) { m_conv = conv; }
public OpenMPI_MPI_Datatype(OPENMPI_Converter conv) { m_conv = conv; }
public byte[] Op_f2c(MPI_Op F_Op) { IntPtr c_op = m_conv.MPI_Op_f2c(F_Op); return(OPENMPI_Converter.IntPtr2ByteArray(c_op)); }
public OpenMPI_MPI_Op(OPENMPI_Converter conv) { m_conv = conv; }
public byte[] Comm_f2c(MPI_Comm F_Comm) { IntPtr ret = m_conv.MPI_Comm_f2c(F_Comm); return(OPENMPI_Converter.IntPtr2ByteArray(ret)); }