<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — OpenMP in Simply Fortran]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=496</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=496&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in OpenMP in Simply Fortran.]]></description>
		<lastBuildDate>Wed, 07 Oct 2015 17:38:29 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: OpenMP in Simply Fortran]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2232#p2232</link>
			<description><![CDATA[<p>Hi Jeff,</p><p>&nbsp; &nbsp; Thanks for your thoughts, and that sounds something might happen along the way. However, what i‘m seeing might be related to the stack size limit issue, since the code can be compiled and ran if I reduce dimension of array to a large extent. Unfortunately, my project involves large array dimension in nature...</p><p>&nbsp; &nbsp; Although I&#039;m not familiar with computer science, I guess the stack size is memory alike. Google suggests to change the stack size of additional threads (other than the main thread) through </p><div class="codebox"><pre><code> GOMP_stacksize </code></pre></div><p> <em> environment variable </em>. How would one change that in SF under windows system? Most examples on the Internet either applies to C, or to Linux system and sounds elusive...</p><p>&nbsp; &nbsp; Thanks a lot again for your input! I&#039;m really benefiting greatly from this forum!</p><p>Wenya</p>]]></description>
			<author><![CDATA[null@example.com (wwang328)]]></author>
			<pubDate>Wed, 07 Oct 2015 17:38:29 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2232#p2232</guid>
		</item>
		<item>
			<title><![CDATA[Re: OpenMP in Simply Fortran]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2230#p2230</link>
			<description><![CDATA[<p>There is currently a known problem with Simply Fortran&#039;s OpenMP in Windows 10, which you can read about <a href="http://forums.approximatrix.com/viewtopic.php?id=492">here</a>.&nbsp; Hopefully you&#039;re seeing this same problem, and it is related to initializing the pthreads library. The next version of Simply Fortran, currently in testing, eliminates the pthreads library entirely.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 07 Oct 2015 14:25:41 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2230#p2230</guid>
		</item>
		<item>
			<title><![CDATA[Re: OpenMP in Simply Fortran]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2229#p2229</link>
			<description><![CDATA[<p>Hi Jeff,</p><p>&nbsp; &nbsp; I think I didn&#039;t put the <em> -fopenmp </em> flag in Linker. After having the flag, my test code <a href="http://jblevins.org/log/openmp"> of this example </a> works. But my original code stopped working with the warning sign from Windows (PS: the code runs smoothly without paralleling) </p><p>&nbsp; &nbsp;</p><div class="codebox"><pre><code> Project.exe has stopped working. A problem caused the program to stop working correctly. Windows will close the program and notify you if a solution is available </code></pre></div><p> </p><p>&nbsp; &nbsp;This sounds sophisticated. Is it relate to the fact I&#039;m in Win 10? Thanks a lot!</p><p>Best,<br />Wenya</p>]]></description>
			<author><![CDATA[null@example.com (wwang328)]]></author>
			<pubDate>Tue, 06 Oct 2015 15:31:25 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2229#p2229</guid>
		</item>
		<item>
			<title><![CDATA[OpenMP in Simply Fortran]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=2227#p2227</link>
			<description><![CDATA[<p>Hi Jeff,</p><p>&nbsp; &nbsp; I&#039;m learning OpenMP to parallel my project, mainly in large loops. I&#039;ve learnt some basics of it and it seems straightforward. But I got problems. </p><p>&nbsp; &nbsp;So here&#039;s what my code looks like (simplified): </p><p>&nbsp; &nbsp;</p><div class="codebox"><pre><code> integer:: nz=1000,nb=1000,i,j
             real(8):: a(nz,nb),b(nz,nb) 

             !$OMP PARALLEL DO 
              
                 do j=1,nb
                     do i=1,nz
                        a(i,j)=b(i,j)^2+b(i,j)
                    end do 
                 end do 

              !$OMP END PRALLEL DO </code></pre></div><p>&nbsp; &nbsp; &nbsp;With <em> -fopenmp </em> flag under project-fortran compiler, I get the following errors: <br />&nbsp; &nbsp; &nbsp;</p><div class="codebox"><pre><code> D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:171: undefined reference to `GOMP_parallel_start&#039;
D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:171: undefined reference to `GOMP_parallel_end&#039;
D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:216: undefined reference to `GOMP_parallel_start&#039;
D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:216: undefined reference to `GOMP_parallel_end&#039;
build\valuef_prOct4.o:D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:171: undefined reference to `omp_get_num_threads&#039;
build\valuef_prOct4.o:D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:171: undefined reference to `omp_get_thread_num&#039;
build\valuef_prOct4.o:D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:216: undefined reference to `omp_get_num_threads&#039;
build\valuef_prOct4.o:D:\SkyDrive\CIES 1995-2007\simulate_fortran/./valuef_prOct4.f90:216: undefined reference to `omp_get_thread_num&#039;
collect2.exe: error: ld returned 1 exit status
Error(E42): Last command making (Project.exe) returned a bad status
Error(E02): Make execution terminated </code></pre></div><p> </p><p>&nbsp; &nbsp; It seems I need to specify number of threads? But <a href="http://jblevins.org/log/openmp"> this example </a> neither specifies that. What could be wrong? Thanks a lot!</p><p>Best,<br />Wenya</p>]]></description>
			<author><![CDATA[null@example.com (wwang328)]]></author>
			<pubDate>Tue, 06 Oct 2015 01:07:53 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=2227#p2227</guid>
		</item>
	</channel>
</rss>
