I’ve been working with the EFDC model (Environmental Fluid Dynamics Code, an EPA-endorsed model https://www.epa.gov/exposure-assessment-models/environment-fluid-dynamics-code-efdc-download-page) on Linux, but have recently been tasked with making the code compatible with Windows 10. I compiled the code with the Intel Fortran v16 compiler, went through some minor compatibility changes, and then successfully compiled the code in both Debug and Release modes. However, when I try to open the executable on Windows 10, I am met with an error message that says that “This app can’t run on your PC.”
I read several posts here related to 32 vs. 64 bits compatibility and I recompiled the code with x86 and x64 options and tried with no luck in XP and different flavors of w7 and 10 (32 and 64 bits installations). So that does not seem to be the problem. I also tried compiling with both static and dynamic libraries and with an older version of Visual Studio 2010 with Intel Fortran 2015 that I have on the XP machine and all versions of the compilation are met with the same error.
For a sanity check, I recompiled the exact same code in Linux with Intel Fortran 2016. It compiled flawlessly and the executable runs without issue. In addition, I compiled in both XP and w10 other programs different than EFDC that I have to check if there might be a problem with the compiler or VS installations, but they compiled and run as expected.
We are suspecting that perhaps the problem might be that EFDC modified for our application is large and requires a bit of memory. This generates a large executable when compiled (the .exe is 43 MB). Could this be an issue with Windows and not Linux versions?
I search the forums and documentation but cannot find any reference to this strange behavior. I’m really not sure what to do next. Any suggestions as to what the problem might be or what additional diagnostics I could run to get to the bottom of this? I really appreciate your help!
If an application requires mc-model option to build for Linux, that could become a problem for Windows. Windows 32 bit (unlike Linux) supports building to target intel64 x64 mode which requires a Linux x64 to run. I never heard of anyone installing 32 bit windows 10.
Natalie, the link that you gave in #1 is for an installer, which contains a prebuilt 32-bit EFDC.exe. That EXE ran without any apparent problems on one of the inputs on Windows 10-64 bit.
I do not know where you obtained the sources for building EFDC.exe, and how you built it. Please provide more details.
Thanks for your replies! Tim, I'll look into the mc-model option.
Sorry, mecej4, I suppose it would have been more useful for me to directly share the source and input files. Here they are - https://www.dropbox.com/sh/rb3ucsfmt45kj4x/AADC7sRQU7IYxP08TUjPYDFMa?dl=0
I have a 32-bit system running Windows 10. Works fine. The CPU in that computer doesn't support 64-bit.
Note that Windows doesn't have an mcmodel option and does not support static code and data larger than 2GB even on x64. Sometimes you'll get a linker warning about this, but not always. If you are declaring very large static arrays (COMMONs, usually), you may need to convert these to ALLOCATABLE and allocate them to the desired size.