migration from old code version

I’ve been moving an old code (2013 PGI compiler version). Opening an old version started the migration etc.

Started working with the migrated version and rebuilt a debug version, fixing some errors and changes that were needed. Got it running fine and moved on to make a release version. That couldn’t find a .mod fine when linking. I cleaned the solution (several times) thinking that would then require the compiler to recreate stuff, same problem remained. Long story short I finally just deleted the original release folder from my x64 folder. Release version then compiled and runs fine.

I’m sure I’ve done something wrong and/or have used bad practices. Any thoughts? I’m curious more than anything else.

It is not clear to me what your project contains and what the dependencies are, but one thing should be made clear: module files (.mod) are used only when compiling source files that contain USE statements for modules. They are not used by the linker at all.

There are some computers (Cray?) on which the Fortran compiler places module information and object code into object (.o) files, but PGI compilers (and other PC compilers used on microprocessor systems) do not do this, as far as I know.

Typically, a “clean” request deletes .exe and .obj files. If a needed module file was not present before the “clean” request, it will still not be present after “clean” is done. In other words, “clean” does not address the problem.

mecej4, thanks for your reply on the weekend, I appreciate your time. By the way, a PGI compiler in a Windows 7 envir using visual studio.

It was a mod file that it couldn’t find. The original file is input via a .f90 file within both the “Include Files” and “Module Files” folders.