<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Approximatrix Forums — File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
		<link>https://forums.approximatrix.com/viewtopic.php?id=687</link>
		<atom:link href="https://forums.approximatrix.com/extern.php?action=feed&amp;tid=687&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in File "is not a valid Win32 application" SF 2.30 build 2281.]]></description>
		<lastBuildDate>Tue, 09 Oct 2018 18:34:32 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3206#p3206</link>
			<description><![CDATA[<p>I want to follow up to this thread and sort of close it out. I spent the last several weeks thinking about my issues and trying figure out how to use allocated arrays. I finally hit on that my three really large arrays are only used in one subroutine and I thought it would be easy to set up the array allocation for those three arrays. A few simple changes resulted in an executable that was much smaller and used only the memory for those arrays that we needed. Of course my initial elation at the reduced memory footprint and significantly reduced execution time were tempered with some ill behaviors which I eventually fixed. </p><p>What is still disappointing is that the 32 bit code will not run, even with the new memory allocations and reduced footprint. However, since I am moving on to more modern code, the 64 bit version will be the default going forward.&nbsp; Thanks for the help.</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Tue, 09 Oct 2018 18:34:32 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3206#p3206</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3205#p3205</link>
			<description><![CDATA[<p>Jeff,</p><p>I am just getting back to this as I was away since my last note. </p><p>With the changes to the compiler options you gave me, I can now run my program in OpenMP mode.&nbsp; I am using the converted FORTRAN 90 as 64 bit source for my testing as I would like this code to become the default code going forward. Note that all my arrays are still static. You asked about array sizes, I reported that in one of these earlier communications but I was wrong. I have 3 large arrays of double precision reals that are 12x1000x4000 which is over a Gigabyte for all three if my arithmetic is correct. Three are other smaller arrays but none that compare to those three. </p><p>Questions: the number of bytes in the -Wl,--stack,N option, is that for the entire executable or for the largest array size?</p><p>I am having somewhat perplexing run time use of CPUs that I am trying to understand. For example, when running a modest sized problem using all possible threads, the CPU only goes about 67% busy. The CPU use will increase to about 90% if I triple the size of the problem. I never got this type of behavoir before on the old 32 bit code. On the 32 bit code, only for very small problems and large thread numbers would the CPU use be inefficient. </p><p>Here are the linker options I am currently using (There are no compiler options specified at this point). </p><p>-Wl,--stack,1500000000 -lgomp</p><p>And here is the Makefile:</p><p>#<br /># Automagically generated by Approximatrix Simply Fortran 2.41<br />#<br />FC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe&quot;<br />CC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gcc.exe&quot;<br />AR=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\ar.exe&quot;<br />WRC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\windres.exe&quot;<br />RM=rm -f</p><br /><p>OPTFLAGS= -O2 -fgraphite-identity -floop-interchange -floop-strip-mine -floop-block -floop-parallelize-all</p><p>SPECIALFLAGS=$(IDIR)</p><p>RCFLAGS=-O coff</p><p>PRJ_FFLAGS= -fopenmp</p><p>PRJ_CFLAGS=</p><p>PRJ_LFLAGS=-Wl,--stack,1500000000 -lgomp</p><p>FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules </p><p>CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)</p><p>&quot;build\riod.o&quot;: &quot;.\riod.f90&quot;<br />&nbsp; &nbsp; @echo Compiling .\riod.f90<br />&nbsp; &nbsp; @$(FC) -c -o &quot;build\riod.o&quot; $(FFLAGS) &quot;.\riod.f90&quot;</p><p>clean: .SYMBOLIC<br />&nbsp; &nbsp; @echo Deleting build\riod.o and related files<br />&nbsp; &nbsp; @$(RM) &quot;build\riod.o&quot;<br />&nbsp; &nbsp; @echo Deleting default icon resource<br />&nbsp; &nbsp; @$(RM) &quot;build\sf_default_resource.res&quot;<br />&nbsp; &nbsp; @echo Deleting riod.exe<br />&nbsp; &nbsp; @$(RM) &quot;riod.exe&quot;</p><p>&quot;riod.exe&quot;:&nbsp; &quot;build\riod.o&quot; &quot;build\Riod-MP-F90.prj.target&quot;<br />&nbsp; &nbsp; @echo Generating riod.exe<br />&nbsp; &nbsp; @$(FC) -o &quot;riod.exe&quot; -static-libgfortran -fopenmp &quot;build\riod.o&quot; $(LDIR) $(PRJ_LFLAGS)</p><p>all: &quot;riod.exe&quot; .SYMBOLIC</p><p>Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Tue, 18 Sep 2018 17:00:38 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3205#p3205</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3190#p3190</link>
			<description><![CDATA[<p>Simply Fortran&#039;s OpenMP implementation on Windows apparently ignores OpenMP stacksize directives.&nbsp; The stacksize will default to Windows&#039; 1MB&nbsp; size.&nbsp; You can change this in theory using the following flag in the Linker box under Compiler Flags in Project Options:</p><div class="codebox"><pre><code>-Wl,--stack,N</code></pre></div><p>where <em>N</em> is the number of bytes for the stacksize.&nbsp; Other than that, there shouldn&#039;t be any problem in theory with OpenMP.&nbsp; &nbsp;While you&#039;re in the Project Options window, though,make sure to remove all references to Pthreads.&nbsp; Simply Fortran&#039;s&nbsp; OpenMP implementation does not require or use Pthreads any longer (it did in 2.3), and the Pthreads library could be doing something weird at startup.</p><p>If you&#039;re using static arrays still, have you determined or guessed at how much memory you&#039;re using?&nbsp; I haven&#039;t seen much about the memory requirements for your program, though I suspect the issues are still related to threading since the program works with OpenMP disabled.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Mon, 10 Sep 2018 11:41:37 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3190#p3190</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3189#p3189</link>
			<description><![CDATA[<p>Jeff,</p><p>I am just wondering if you were able to determine if there was some issue with the OpenMP stack and if there is a fix for it? I am still trying to figure out how to change my code to do the array allocations. I am still debating the best way to implement the code changes. An easy fix would be to make all the arrays static and allocate the memory as such but I don&#039;t see how that is different that what I currently do. I may try this in a week or so. </p><p>Thanks,<br />Rod</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Fri, 07 Sep 2018 15:31:22 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3189#p3189</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3188#p3188</link>
			<description><![CDATA[<p>Jeff,</p><p>One thing I should have mentioned is that the recursion error occurs long before any OpenMP directives&nbsp; are initiated. I do have some calls early on to determine the number of processors and to set up home many to use, but only one thread is active.&nbsp; This part of the code is all single threaded. </p><p>Not sure exactly if I did this right but I added the line:</p><p>!$&nbsp; &nbsp; &nbsp; OMP_STACKSIZE=256000000</p><p>to the top of the code. The compiler didn&#039;t barf on this line of code and compiled without error. Running the code with OpenMP enabled and the result is pretty much the same as it fails to run. </p><p>Since none of the arrays in this code have changed from the version I was using with SF2.3, doesn&#039;t that mean that my code as is should run under SF2.41 (Specific bugs in SF2.41 notwithstanding)? If that is the case, I am loathe to change too much in the code at this time if there can be a fix for the problem. I looked into the allocated arrays and not sure I completely understand how to make the changes and as it touches&nbsp; many things routines in the code. I will investigate this more however as if it can alleaviate issues going forward it may be worth doing.</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Thu, 30 Aug 2018 13:09:06 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3188#p3188</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3187#p3187</link>
			<description><![CDATA[<p>It looks like there may be some odd stack behavior with OpenMP on Windows. You can try two things:</p><p>1. Set the variable [pre]OMP_STACKSIZE=256M[/pre] or something similar.&nbsp; It should force any additional threads to start with a somewhat sizeable stack size</p><p>2. Use ALLOCATE to create all your arrays rather than pre-defining their sizes.&nbsp; I&#039;m guessing that you might be hitting some sort of per-thread stack size limit that isn&#039;t quite working right.&nbsp; That would be a bug on our part, of course.&nbsp; I&#039;ll look at the OpenMP library code to see what&#039;s wrong.&nbsp; But allocating everything might possibly be a workaround.</p><p>Sorry for all this trouble!&nbsp; &nbsp;As programs get more complex, so do the possible problems.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Thu, 30 Aug 2018 11:56:46 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3187#p3187</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3186#p3186</link>
			<description><![CDATA[<p>Jeff,</p><p>I had tried changing the subroutine to a function in the f90 code but not my legacy code. I have been cleaning up this code since this episode to make it more modern (got rid of my old do loops and number continue lines) and so doing this change was not a big deal. It didn&#039;t make any difference though as the code still has the recursive calls to nonrecursive procedure. </p><p>However, as you suspected, turning off OpenMP and removing the flags in the compiler options did make the code run.</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Wed, 29 Aug 2018 20:38:29 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3186#p3186</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3185#p3185</link>
			<description><![CDATA[<p>Have you tried running everything without OpenMP enabled?&nbsp; Your program should run fine without it, and it eliminates another possible source of a problem.</p><p>You also mentioned that the calls are &quot;recursive,&quot; but I don&#039;t see where any recursive calls are being made.&nbsp; Recursive subroutines must be declared as such:</p><div class="codebox"><pre><code>       RECURSIVE SUBROUTINE SIZEOBJ(factor, zmass, radx)</code></pre></div><p>Also, your <em>sizeobj</em> subroutine is just screaming to be converted to a function, which might help (though I still don&#039;t know why you&#039;re seeing a crash).&nbsp; Could you change it to:</p><div class="codebox"><pre><code>function sizeobj(factor,zmass)
      real*8 factor,zmass,sizeobj
c
       sizeobj=factor*(zmass**(1.d0/3.d0))
      end function sizeobj</code></pre></div><p>and change your call to:</p><div class="codebox"><pre><code>    sz(j) = sizeobj(con(56), sm(j))</code></pre></div><p>Perhaps, though, you&#039;ve simplified things for us, and we&#039;re not seeing some additional work being done.</p><p>I am worried, though, that something may be wrong with the stack just because OpenMP is enabled.&nbsp; It would be a new bug if so.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 29 Aug 2018 18:31:41 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3185#p3185</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3184#p3184</link>
			<description><![CDATA[<p>I am now trying to debug my old code for this recursive call error. Note that this code worked perfectly fine in SF 2.3 before I made changes. I have restored this as a 32 bit project and have the following as the makefile:</p><p>#<br /># Automagically generated by Approximatrix Simply Fortran 2.41<br />#<br />FC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe&quot;<br />CC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gcc.exe&quot;<br />AR=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\ar.exe&quot;<br />WRC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\windres.exe&quot;<br />RM=rm -f</p><br /><p>OPTFLAGS= -g -Og</p><p>SPECIALFLAGS=-m32 $(IDIR)</p><p>RCFLAGS=-O coff -F pe-i386</p><p>PRJ_FFLAGS=-fopenmp&nbsp; -fmax-stack-var-size=20000000 -fcheck=all -fopenmp</p><p>PRJ_CFLAGS=</p><p>PRJ_LFLAGS=-lgomp -lpthread</p><p>FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules </p><p>CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)</p><p>&quot;build\riod.o&quot;: &quot;.\riod.f&quot;<br />&nbsp; &nbsp; @echo Compiling .\riod.f<br />&nbsp; &nbsp; @$(FC) -c -o &quot;build\riod.o&quot; $(FFLAGS) &quot;.\riod.f&quot;</p><p>clean: .SYMBOLIC<br />&nbsp; &nbsp; @echo Deleting build\riod.o and related files<br />&nbsp; &nbsp; @$(RM) &quot;build\riod.o&quot;<br />&nbsp; &nbsp; @echo Deleting default icon resource<br />&nbsp; &nbsp; @$(RM) &quot;build\sf_default_resource.res&quot;<br />&nbsp; &nbsp; @echo Deleting riod.exe<br />&nbsp; &nbsp; @$(RM) &quot;riod.exe&quot;</p><p>&quot;riod.exe&quot;:&nbsp; &quot;build\riod.o&quot; &quot;build\riod-mp.prj.target&quot;<br />&nbsp; &nbsp; @echo Generating riod.exe<br />&nbsp; &nbsp; @$(FC) -o &quot;riod.exe&quot; -fopenmp -m32 &quot;build\riod.o&quot; $(LDIR) $(PRJ_LFLAGS)</p><p>all: &quot;riod.exe&quot; .SYMBOLIC</p><br /><p>Debugging I go to the first call of the offending subroutine (sizeobj) and step inside. The debugger takes me to the subroutine definition line. The next step takes me to another uncalled subroutine &quot;End&quot; statement. The next step takes me back to the called subroutine and then the next few steps executes the simple calculations and exits back to the calling routine. </p><p>I jump to the next instance of sizeobj and step inside the routine. The next step now causes the program to crash. Here is the code for calling sizeobj the second time; note I have added the tmpxx variables to pass arguments to the sizeobj subroutine and it does behave slightly differently this way:</p><p>implicit real*8 (a-h,o-z)<br />...<br />&nbsp; &nbsp; &nbsp; &nbsp; tmp10=sm(j)<br />&nbsp; &nbsp; &nbsp; &nbsp; tmp11=con(56)<br />&nbsp; &nbsp; &nbsp; &nbsp; tmp12=0<br />&nbsp; &nbsp; &nbsp; &nbsp; call sizeobj(tmp11,tmp10,tmp12)<br />&nbsp; &nbsp; &nbsp; &nbsp; sz(j)=tmp12</p><p>Here is the simple subroutine being called:</p><p>&nbsp; &nbsp; &nbsp; subroutine sizeobj(factor,zmass,radx)<br />&nbsp; &nbsp; &nbsp; real*8 factor,zmass,radx<br />c<br />&nbsp; &nbsp; &nbsp; &nbsp;radx=factor*(zmass**(1.d0/3.d0))<br />&nbsp; &nbsp; &nbsp; return<br />&nbsp; &nbsp; &nbsp; end Subroutine</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Wed, 29 Aug 2018 16:50:51 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3184#p3184</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3183#p3183</link>
			<description><![CDATA[<p>I tried adding the -mcmodel=medium flag but the program still crashes before debugging can start.&nbsp; </p><p>Also, as I was playing with another version of the this code, I am trying to convert it to F90 format, I noticed that even when I backed out of the changes I made in the code it would not run. While debugging this f90 version, I get a message that states I have a recursive function call. (I had to look up what that is and I do not intend to recursively call anything). So while playing with that this morning, SF crashed. </p><p>Then I began thinking, I didn&#039;t try to compile the old code with the new SF version I am using. So I backed out of the original code change, (deleted the subroutine I duplicated) and recompiled to see if I could get back to where I was before I updated SF. Unless I have the compiler option -fmax-stack-var-size=20000000, the code crashed immediately as noted above. With that compiler option, I can debug and again as with the f90 version above I get a recursive call message again before the crash. </p><p>During debugging after I step into the offending call,&nbsp; but the next step takes me to some intermediate position within a completely different subroutine; this different subroutine has not even been called yet. The debugger should still be in that subroutine but I get put elsewhere and then the next step comes back to where is should be. This may be the real issue, that there is some sort of memory alignment issue?&nbsp; Here is the makefile from this last test. </p><p>#<br /># Automagically generated by Approximatrix Simply Fortran 2.41<br />#<br />FC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe&quot;<br />CC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gcc.exe&quot;<br />AR=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\ar.exe&quot;<br />WRC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\windres.exe&quot;<br />RM=rm -f</p><br /><p>OPTFLAGS= -g -pg</p><p>SPECIALFLAGS=$(IDIR)</p><p>RCFLAGS=-O coff</p><p>PRJ_FFLAGS=-fopenmp -mcmodel=medium&nbsp; -fcheck=all -fopenmp</p><p>PRJ_CFLAGS=</p><p>PRJ_LFLAGS=-lgomp -lpthread</p><p>FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules </p><p>CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)</p><p>&quot;build\riod.o&quot;: &quot;.\riod.f&quot;<br />&nbsp; &nbsp; @echo Compiling .\riod.f<br />&nbsp; &nbsp; @$(FC) -c -o &quot;build\riod.o&quot; $(FFLAGS) &quot;.\riod.f&quot;</p><p>clean: .SYMBOLIC<br />&nbsp; &nbsp; @echo Deleting build\riod.o and related files<br />&nbsp; &nbsp; @$(RM) &quot;build\riod.o&quot;<br />&nbsp; &nbsp; @echo Deleting default icon resource<br />&nbsp; &nbsp; @$(RM) &quot;build\sf_default_resource.res&quot;<br />&nbsp; &nbsp; @echo Deleting riod.exe<br />&nbsp; &nbsp; @$(RM) &quot;riod.exe&quot;</p><p>&quot;riod.exe&quot;:&nbsp; &quot;build\riod.o&quot; &quot;build\riod-mp.prj.target&quot;<br />&nbsp; &nbsp; @echo Generating riod.exe<br />&nbsp; &nbsp; @$(FC) -o &quot;riod.exe&quot; -static -fopenmp -pg &quot;build\riod.o&quot; $(LDIR) $(PRJ_LFLAGS)</p><p>all: &quot;riod.exe&quot; .SYMBOLIC</p><p>Sorry to be such a bother, I fear my bad programing is somehow rearing its ugly head.</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Wed, 29 Aug 2018 12:03:30 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3183#p3183</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3182#p3182</link>
			<description><![CDATA[<p>Can you try adding the flag:</p><div class="codebox"><pre><code>-mcmodel=medium</code></pre></div><p>to the Fortran and Linker flags boxes in Project Options under the &quot;Compiler Flags&quot; tab?&nbsp; &nbsp;I think that should increase the stack size enough to avoid the crash.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Wed, 29 Aug 2018 11:13:22 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3182#p3182</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3181#p3181</link>
			<description><![CDATA[<p>Ok, I have not used debugging in a while and it took me some time to poke around to find the Debugger stack. What appears in that window is the following:</p><p>MAIN_<br />_chkstk_ms&nbsp; </p><p>This message disappears after the program terminates. Forgot to add the makefile:</p><p>OPTFLAGS= -g -pg</p><p>SPECIALFLAGS=-m32 $(IDIR)</p><p>RCFLAGS=-O coff -F pe-i386</p><p>PRJ_FFLAGS=-fopenmp -fcheck=all -fopenmp</p><p>PRJ_CFLAGS=</p><p>PRJ_LFLAGS=-lgomp -lpthread</p><p>FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules </p><p>CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)</p><p>&quot;build\riod.o&quot;: &quot;.\riod.f&quot;<br />&nbsp; &nbsp; @echo Compiling .\riod.f<br />&nbsp; &nbsp; @$(FC) -c -o &quot;build\riod.o&quot; $(FFLAGS) &quot;.\riod.f&quot;</p><p>clean: .SYMBOLIC<br />&nbsp; &nbsp; @echo Deleting build\riod.o and related files<br />&nbsp; &nbsp; @$(RM) &quot;build\riod.o&quot;<br />&nbsp; &nbsp; @echo Deleting default icon resource<br />&nbsp; &nbsp; @$(RM) &quot;build\sf_default_resource.res&quot;<br />&nbsp; &nbsp; @echo Deleting riod.exe<br />&nbsp; &nbsp; @$(RM) &quot;riod.exe&quot;</p><p>&quot;riod.exe&quot;:&nbsp; &quot;build\riod.o&quot; &quot;build\riod-mp.prj.target&quot;<br />&nbsp; &nbsp; @echo Generating riod.exe<br />&nbsp; &nbsp; @$(FC) -o &quot;riod.exe&quot; -static -fopenmp -m32 -pg &quot;build\riod.o&quot; $(LDIR) $(PRJ_LFLAGS)</p><p>all: &quot;riod.exe&quot; .SYMBOLIC</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Tue, 28 Aug 2018 22:45:39 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3181#p3181</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3180#p3180</link>
			<description><![CDATA[<p>The program crashes when the Segmentation Fault occurs.&nbsp; In the Debugger panel under &quot;Stack&quot; (it defaults to &quot;Variables&quot;), what is the position showing when the Segmentation Fault occurs?</p><p>Additionally, based on your makefile, I see no sign that debugging was enabled.&nbsp; Can you check that again?&nbsp; The <em>-g</em> flag should appear in the makefile.&nbsp; </p><p>Profiling won&#039;t provide any useful information.&nbsp; It would only be useful for seeing which routines take the most amount of time to execute with a long-running program.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 28 Aug 2018 21:20:49 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3180#p3180</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3179#p3179</link>
			<description><![CDATA[<p>Ok, I explicitly turned on debugging and rebuild. When I start the debugging session I get a SF debugging pop-up that says &quot;Signal received: SIGSEGV - Segmentation fault&quot;. This happens a couple of times and then I get the OS message that the program has stopped. Nothing appears on the console. I have enabled profiling but when I check the profile it says, &quot;Profiling data does not exist yet...&quot;<br />Here is the current makefile:</p><p>#<br /># Automagically generated by Approximatrix Simply Fortran 2.41<br />#<br />FC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe&quot;<br />CC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gcc.exe&quot;<br />AR=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\ar.exe&quot;<br />WRC=&quot;C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\windres.exe&quot;<br />RM=rm -f</p><br /><p>OPTFLAGS= -mtune=broadwell</p><p>SPECIALFLAGS=-m32 $(IDIR)</p><p>RCFLAGS=-O coff -F pe-i386</p><p>PRJ_FFLAGS=-fopenmp -fmax-stack-var-size=20000000 -fopenmp</p><p>PRJ_CFLAGS=</p><p>PRJ_LFLAGS=-lgomp -lpthread</p><p>FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules </p><p>CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)</p><p>&quot;build\riod.o&quot;: &quot;.\riod.f&quot;<br />&nbsp; &nbsp; @echo Compiling .\riod.f<br />&nbsp; &nbsp; @$(FC) -c -o &quot;build\riod.o&quot; $(FFLAGS) &quot;.\riod.f&quot;</p><p>clean: .SYMBOLIC<br />&nbsp; &nbsp; @echo Deleting build\riod.o and related files<br />&nbsp; &nbsp; @$(RM) &quot;build\riod.o&quot;<br />&nbsp; &nbsp; @echo Deleting default icon resource<br />&nbsp; &nbsp; @$(RM) &quot;build\sf_default_resource.res&quot;<br />&nbsp; &nbsp; @echo Deleting riod.exe<br />&nbsp; &nbsp; @$(RM) &quot;riod.exe&quot;</p><p>&quot;riod.exe&quot;:&nbsp; &quot;build\riod.o&quot; &quot;build\riod-mp.prj.target&quot;<br />&nbsp; &nbsp; @echo Generating riod.exe<br />&nbsp; &nbsp; @$(FC) -o &quot;riod.exe&quot; -static -fopenmp -m32 &quot;build\riod.o&quot; $(LDIR) $(PRJ_LFLAGS)</p><p>all: &quot;riod.exe&quot; .SYMBOLIC</p>]]></description>
			<author><![CDATA[null@example.com (grogley)]]></author>
			<pubDate>Tue, 28 Aug 2018 20:49:51 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3179#p3179</guid>
		</item>
		<item>
			<title><![CDATA[Re: File "is not a valid Win32 application" SF 2.30 build 2281]]></title>
			<link>https://forums.approximatrix.com/viewtopic.php?pid=3178#p3178</link>
			<description><![CDATA[<p>I would recommend running it within the debugger in that case.&nbsp; The debugger should stop where the program crashes.</p>]]></description>
			<author><![CDATA[null@example.com (jeff)]]></author>
			<pubDate>Tue, 28 Aug 2018 19:19:29 +0000</pubDate>
			<guid>https://forums.approximatrix.com/viewtopic.php?pid=3178#p3178</guid>
		</item>
	</channel>
</rss>
