<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Approximatrix Forums — Using OpenMPI]]></title>
	<link rel="self" href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=753&amp;type=atom" />
	<updated>2020-06-07T14:25:05Z</updated>
	<generator>PunBB</generator>
	<id>https://forums.approximatrix.com/viewtopic.php?id=753</id>
		<entry>
			<title type="html"><![CDATA[Re: Using OpenMPI]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3498#p3498" />
			<content type="html"><![CDATA[<p>If your Linux distribution supports Open MPI, then yes, you could use it from Simply Fortran.&nbsp; The Linux version of Simply Fortran will use the system&#039;s Fortran compiler and libraries, so it would depend on the distribution.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2020-06-07T14:25:05Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3498#p3498</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Using OpenMPI]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3496#p3496" />
			<content type="html"><![CDATA[<p>Thank you for the feedback, Jeff.</p><p>If I had a Linux version of Simple Fortran would I then be able to use OpenMPI?</p>]]></content>
			<author>
				<name><![CDATA[GS76]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3865</uri>
			</author>
			<updated>2020-06-06T14:26:30Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3496#p3496</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Using OpenMPI]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3495#p3495" />
			<content type="html"><![CDATA[<p>It is possible to use <a href="http://packages.simplyfortran.com/package/69.html">Microsoft MPI</a> with Simply Fortran, but we don&#039;t include it with Simply Fortran&#039;s installer due to licensing issues.&nbsp; Additionally, Microsoft MPI is somewhat lagging in terms of the standard.&nbsp; </p><p>So yes, that program should work, but you would need MS MPI set up first to work with Simply Fortran.&nbsp; OpenMP or using Fortran Coarrays directly on Windows is definitely preferable.</p>]]></content>
			<author>
				<name><![CDATA[jeff]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=2</uri>
			</author>
			<updated>2020-06-06T14:11:38Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3495#p3495</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Using OpenMPI]]></title>
			<link rel="alternate" href="https://forums.approximatrix.com/viewtopic.php?pid=3493#p3493" />
			<content type="html"><![CDATA[<p>Hi all,</p><p>Is it possible to use Openmpi on Windows and within Simple Fortran:</p><p>Please see the code below. It is from &quot;Modern Fortran&quot; by Milan Curcic (Listing 1.2).</p><p>Or should this be implemented with OpenMP and how?</p><div class="codebox"><pre><code>program array_copy_mpi

  use mpi
  implicit none

  integer :: ierr, nproc, procsize, request
  integer :: stat(mpi_status_size)

  integer :: array(5) = 0
  integer, parameter :: sender = 0, receiver = 1

  call mpi_init(ierr)
  call mpi_comm_rank(mpi_comm_world, nproc, ierr)
  call mpi_comm_size(mpi_comm_world, procsize, ierr)

  if (procsize /= 2) then
    call mpi_finalize(ierr)
    stop &#039;Error: This program must be run on 2 parallel processes&#039;
  end if

  if (nproc == sender) array = [1, 2, 3, 4, 5]

  print &#039;(a,i1,a,5(4x,i2))&#039;, &#039;array on proc &#039;, nproc, &amp;
    &#039; before copy:&#039;, array

  call mpi_barrier(mpi_comm_world, ierr)

  if (nproc == sender) then
    call mpi_isend(array, size(array), mpi_int, receiver, 1, &amp;
                   mpi_comm_world, request, ierr)
  else if (nproc == receiver) then
    call mpi_irecv(array, size(array), mpi_int, sender, 1, &amp;
                   mpi_comm_world, request, ierr)
    call mpi_wait(request, stat, ierr)
  end if

  print &#039;(a,i1,a,5(4x,i2))&#039;, &#039;array on proc &#039;, nproc, &amp;
    &#039; after copy: &#039;, array

  call mpi_finalize(ierr)

end program array_copy_mpi</code></pre></div>]]></content>
			<author>
				<name><![CDATA[GS76]]></name>
				<uri>https://forums.approximatrix.com/profile.php?id=3865</uri>
			</author>
			<updated>2020-06-06T05:57:38Z</updated>
			<id>https://forums.approximatrix.com/viewtopic.php?pid=3493#p3493</id>
		</entry>
</feed>
