Topic: File "is not a valid Win32 application" SF 2.30 build 2281
I am having a couple of baffling issues. The first is the above system message after editing my source and compiling. The compile is normal and completes without issue. The new executable has a new time stamp indicating it was just created. When I try to execute the new program I get the system message as in the title. How I got to this point was that I modified my running code by copying a subroutine and pasting it within the same program and renamed it as something else; essentially having two identical subroutines (with different names) but the new/copied subroutine is not called by the new executable. Old program worked fine, the new one gets rejected by the OS.
Here are the test from the create and makefile:
Generating Makefile... Okay
f951.exe: Warning: Flag '-fmax-stack-var-size=20000000' overwrites '-frecursive' implied by '-fopenmp'
* Complete *
# Automagically generated by Approximatrix Simply Fortran 2.30
FC="C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gfortran.exe"
CC="C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\gcc.exe"
AR="C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\ar.exe"
WRC="C:\Program Files (x86)\Simply Fortran 2\mingw-w64\bin\windres.exe"
OPTFLAGS= -O3 -fgraphite-identity -floop-interchange -floop-strip-mine -floop-block -floop-parallelize-all -mtune=broadwell
RCFLAGS=-O coff -F pe-i386
PRJ_FFLAGS=-fopenmp -fmax-stack-var-size=20000000 -fopenmp
FFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_FFLAGS) -Jmodules
CFLAGS=$(SPECIALFLAGS) $(OPTFLAGS) $(PRJ_CFLAGS)
@echo Compiling .\riod.f
@$(FC) -c -o "build\riod.o" $(FFLAGS) ".\riod.f"
@echo Deleting build\riod.o and related files
@echo Deleting default icon resource
@echo Deleting riod.exe
"riod.exe": "build\riod.o" "build\riod-mp.prj.target"
@echo Generating riod.exe
@$(FC) -o "riod.exe" -static -fopenmp -m32 "build\riod.o" $(LDIR) $(PRJ_LFLAGS)
all: "riod.exe" .SYMBOLIC
The other issue I am having is probably not a SF issue but hoping someone has a clue what is going on. The above mentioned program uses OpenMP for parallel processing. My development system has several instances of this code running at any given time. When I built a new version, I noticed the performance was bad. After testing, I noted that even though I am requesting multiple threads in the executable, only one thread was being used. However, if I move the executable to a different folder and CMD window, it works with the specified number of threads. Even more maddening is that I can move to a different folder and use the same executable and it won't work again. I even used the CMD window in a folder that doesn't work and changed directories to where it was working and restarted the program and it still works there. It seems to be a directory issue but I can't find differences.
Thanks in advance.