<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — Fortran Version error]]></title>
		<link>http://forums.approximatrix.com/viewtopic.php?id=356</link>
		<atom:link href="http://forums.approximatrix.com/extern.php?action=feed&amp;tid=356&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Fortran Version error.]]></description>
		<lastBuildDate>Thu, 03 Jul 2014 17:39:40 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Fortran Version error]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1452#p1452</link>
			<description><![CDATA[<p>To enable OpenMP, you only need to either add the <em>-fopenmp</em> flag or, alternatively, check &quot;Enable OpenMP&quot; under the Fortran tab in Project Options (accessible from the Options menu).&nbsp; </p><p>Using OpenMP in your code is rather easy.&nbsp; Basically, you just specify OpenMP directives in specially formatted comments&nbsp; that instruct the compiler and runtime how to handle certain portions of your code.&nbsp; Simply Fortran does provide an example project&nbsp; by default that shows a simple example of executing multiple threads.&nbsp; If you&#039;re looking for some examples, <a href="https://computing.llnl.gov/tutorials/openMP/exercise.html">this site</a> has a nice set of examples in fixed-format Fortran.</p><p>OpenMP is not a drop-in replacement for MPI.&nbsp; If your code was designed to implement MPI, you&#039;ll have some work to do to port it to OpenMP.&nbsp; The <em>-dparallel</em> flag would be specific to your code only; it doesn&#039;t have any special meaning outside that context.&nbsp; &nbsp;</p><p>I&#039;m glad Simply Fortran is meeting your needs, though.&nbsp; &nbsp;If you have any questions, feel free to post them here!</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Thu, 03 Jul 2014 17:39:40 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1452#p1452</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fortran Version error]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1449#p1449</link>
			<description><![CDATA[<p>Thanks for your patient replys Jeff.<br />What&#039;s involved in employing openmp?&nbsp; I assume that if I simply set the -fopenmp flag will it won&#039;t make any difference.&nbsp; There are sections of code that are dependant on the -dparallel flag, and apart from &quot; use mpi&quot; it has compiled. Is it likely that these sections of code will apply to openmp too, or do they need to be recoded for open mp?&nbsp; I tried &quot;use openmp&quot; and it compiled, but I don&#039;t know how it will affect the program.<br />Really enjoying the SF by the way.&nbsp; I&#039;ve struggled with compiling this on Linux for some time and SF has made it seem a breeze by comparison.</p>]]></description>
			<author><![CDATA[null@example.com (bmod)]]></author>
			<pubDate>Wed, 02 Jul 2014 23:13:35 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1449#p1449</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fortran Version error]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1445#p1445</link>
			<description><![CDATA[<p>Simply Fortran cannot use an existing makefile. When you build using Simply Fortran, it creates its own makefile, but it wouldn&#039;t be able to use a different one (generally speaking, at least).&nbsp; In your case, the makefile really isn&#039;t doing anything complicated.&nbsp; I would suggest adding the flags that aren&#039;t commented to the Fortran compiler flags for your project in Simply Fortran:</p><div class="codebox"><pre><code>-DPARALLEL -DSAMPLES -DCARTESIAN -DMIXING</code></pre></div><p>Simply Fortran doesn&#039;t support the MPI form of parallel coding that the compiler command <em>mpif90</em> implies.&nbsp; Instead, it does support <a href="http://en.wikipedia.org/wiki/OpenMP">OpenMP</a>, which is generally finer-grained, single-system parallel processing.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 02 Jul 2014 11:31:33 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1445#p1445</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fortran Version error]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1444#p1444</link>
			<description><![CDATA[<p>Cancel that last one, there is this before the routines that are missing:<br /># if defined (SAMPLES)<br />And so added the flag -DSAMPLES and it has worked.</p><p>As a more general question, there is a make file included with the source files:&nbsp; What is the best way to handle the details in this file?&nbsp; Can that make file be run from SF?&nbsp; Or should I copy the flags into the project options?</p><p>Also, it would be nice to be able to run this in parallel - the original makefile is looking for mpif90.&nbsp; What do I need to do to be able to enable this?</p><br /><p>Here is the supplied make file if that helps at all:</p><p>#-----------BEGIN MAKEFILE-------------------------------------------------<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SHELL&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= /bin/sh<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEF_FLAGS&nbsp; &nbsp; &nbsp;= -P -C -traditional<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; EXEC&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = mytvd<br />#==========================================================================<br />#--------------------------------------------------------------------------<br />#&nbsp; &nbsp; &nbsp; &nbsp; PRECISION&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; DEFAULT PRECISION: SINGLE<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UNCOMMENT TO SELECT DOUBLE PRECISION<br />#--------------------------------------------------------------------------</p><p>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FLAG_1 = -DDOUBLE_PRECISION<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FLAG_2 = -DPARALLEL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FLAG_3 = -DSAMPLES<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FLAG_4 = -DCARTESIAN<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; FLAG_6 = -DINTEL<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FLAG_7 = -DMIXING<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FLAG_8 = -DCOUPLING<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FLAG_9 = -DZALPHA<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FLAG_10 = -DMANNING</p><p>#--------------------------------------------------------------------------<br />#&nbsp; mpi defs<br />#--------------------------------------------------------------------------<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CPP&nbsp; &nbsp; &nbsp; = /usr/bin/cpp<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CPPFLAGS = $(DEF_FLAGS)<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FC&nbsp; &nbsp; &nbsp; &nbsp;= gfortran<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FC&nbsp; &nbsp; &nbsp; &nbsp; = mpif90<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DEBFLGS&nbsp; =<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;OPT&nbsp; &nbsp; &nbsp; =<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CLIB&nbsp; &nbsp; &nbsp;=<br />#==========================================================================</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;FFLAGS = $(DEBFLGS) $(OPT)<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;MDEPFLAGS = --cpp --fext=f90 --file=-<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;RANLIB = ranlib<br />#--------------------------------------------------------------------------<br />#&nbsp; CAT Preprocessing Flags<br />#--------------------------------------------------------------------------<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CPPARGS = $(CPPFLAGS) $(DEF_FLAGS) $(FLAG_1) $(FLAG_2) \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(FLAG_3) $(FLAG_4) $(FLAG_5) $(FLAG_6) \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(FLAG_7) $(FLAG_8) $(FLAG_9) $(FLAG_10)&nbsp; \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(FLAG_11) $(FLAG_12) $(FLAG_13) $(FLAG_14) \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(FLAG_15) $(FLAG_16) $(FLAG_17) $(FLAG_18) \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(FLAG_19) $(FLAG_20) $(FLAG_21) $(FLAG_22) \<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $(FLAG_23) $(FLAG_24)<br />#--------------------------------------------------------------------------<br />#&nbsp; Libraries<br />#--------------------------------------------------------------------------</p><p>#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; LIBS&nbsp; = $(PV3LIB) $(CLIB)&nbsp; $(PARLIB) $(IOLIBS) $(MPILIB) $(GOTMLIB)<br />#&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; INCS&nbsp; = $(IOINCS) $(GOTMINCS)</p><br /><p>#--------------------------------------------------------------------------<br />#&nbsp; Preprocessing and Compilation Directives<br />#--------------------------------------------------------------------------<br />.SUFFIXES: .o .f90 .F .F90</p><p>.F.o:<br />&nbsp; &nbsp; $(CPP) $(CPPARGS) $*.F &gt; $*.f90<br />&nbsp; &nbsp; $(FC)&nbsp; -c $(FFLAGS) $(INCS) $*.f90<br />#&nbsp; &nbsp; \rm $*.f90<br />#--------------------------------------------------------------------------<br />#&nbsp; FUNWAVE-TVD Source Code.<br />#--------------------------------------------------------------------------</p><p>MODS&nbsp; = mod_param.F&nbsp; &nbsp; mod_global.F&nbsp; &nbsp; mod_util.F \</p><p>MAIN&nbsp; = main.F bc.F fluxes.F init.F io.F trid.F&nbsp; &nbsp; &nbsp; &nbsp;\</p><p>SRCS = $(MODS)&nbsp; $(MAIN)</p><p>OBJS = $(SRCS:.F=.o)</p><p>#--------------------------------------------------------------------------<br />#&nbsp; Linking Directives<br />#--------------------------------------------------------------------------</p><p>$(EXEC):&nbsp; &nbsp; $(OBJS)<br />&nbsp; &nbsp; &nbsp; &nbsp; $(FC) $(FFLAGS) $(LDFLAGS) -o $(EXEC) $(OBJS) $(LIBS)<br />&nbsp; &nbsp; mv $(EXEC) ../work/.<br />#--------------------------------------------------------------------------</p><p>#--------------------------------------------------------------------------<br />#&nbsp; Tar Up Code<br />#--------------------------------------------------------------------------</p><p>tarfile:<br />&nbsp; &nbsp; tar cvf funwave_tvd.tar *.F&nbsp; Makefile</p><p>#--------------------------------------------------------------------------<br />#&nbsp; Cleaning targets.<br />#--------------------------------------------------------------------------</p><p>clean:<br />&nbsp; &nbsp; &nbsp; &nbsp; /bin/rm -f *.o *.mod</p><p>clobber:&nbsp; &nbsp; clean<br />&nbsp; &nbsp; &nbsp; &nbsp; /bin/rm -f *.f90 *.o mytvd</p>]]></description>
			<author><![CDATA[null@example.com (bmod)]]></author>
			<pubDate>Wed, 02 Jul 2014 02:32:10 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1444#p1444</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fortran Version error]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1443#p1443</link>
			<description><![CDATA[<p>That fixed it, thanks!</p><p>I worked through a few other problems but am stuck on this one:<br />D:\Projects\Funwave\Code\funwave-version2.1\src/init.F:874: undefined reference to `wk_wavemaker_time_series_&#039;</p><p>But it is in the same file:<br />SUBROUTINE WK_WAVEMAKER_TIME_SERIES &amp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;(NumWaveComp,WAVE_COMP,PeakPeriod,H_gen,delta,D_gen,beta_gen,width)</p><p>Do you have any suggestions for this one?&nbsp; Is there a reason why it cant see something lower in the file?</p>]]></description>
			<author><![CDATA[null@example.com (bmod)]]></author>
			<pubDate>Wed, 02 Jul 2014 01:59:15 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1443#p1443</guid>
		</item>
		<item>
			<title><![CDATA[Re: Fortran Version error]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1440#p1440</link>
			<description><![CDATA[<p>This error means that the Fortran compiler did find a &quot;param.mod&quot; that it hadn&#039;t compiled itself.&nbsp; There is most likely a file in the base directory of your project named &quot;param.mod.&quot;&nbsp; Simply Fortran, by default, writes all modules into a <em>modules</em> subdirectory, and, when you select &quot;Clean&quot; from the Build menu, it will delete modules only in that directory that it had created.</p><p>When you were given the code to compile, was there a &quot;param.mod&quot; (or any other &quot;.mod&quot; file) included with it?&nbsp; &nbsp;You&#039;ll want to delete all &quot;.mod&quot; files provided with the code base before attempting to compile it.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 30 Jun 2014 11:26:04 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1440#p1440</guid>
		</item>
		<item>
			<title><![CDATA[Fortran Version error]]></title>
			<link>http://forums.approximatrix.com/viewtopic.php?pid=1439#p1439</link>
			<description><![CDATA[<p>Hi,<br />I&#039;m new to simply fortran (and fortran in general) so this could be a newbie mistake.&nbsp; I&#039;m trying to compile someone else&#039;s code, which I assume is in F77 (.f extension)<br />The first problem was module &amp; end statements occuring at the start or the line instead of at the 6th character causing an error.&nbsp; I added some spaces and the error went away.&nbsp; But I&#039;m getting this error now:</p><p>Compiling mod_param.F<br />Compiling mod_global.F<br />mod_global.F:2.10:</p><p>&nbsp; &nbsp; &nbsp; &nbsp;USE PARAM&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1<br />Fatal Error: Cannot read module file &#039;param.mod&#039; opened at (1), because it was created by a different version of GNU Fortran<br />Error(E42): Last command making (build\mod_global.o) returned a bad status<br />Error(E02): Make execution terminated</p><p>Yes I cleaned before building, so I don&#039;t know where the error is comming from as SF is trying to read a file it created.</p>]]></description>
			<author><![CDATA[null@example.com (bmod)]]></author>
			<pubDate>Mon, 30 Jun 2014 02:21:29 +0000</pubDate>
			<guid>http://forums.approximatrix.com/viewtopic.php?pid=1439#p1439</guid>
		</item>
	</channel>
</rss>
