Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28602 Discussions

some compiler options relevant to compilation cascades

Izaak_Beekman
New Contributor II
382 Views

I've seen that NAG provides some options to control the output and behavior surrounding .mod files. I've poured through the documentation, and I can't find Intel's direct equivalents to these options, however I think I have an idea of some work arounds. Can someone please let me know if I have overlooked anything?

The NAG options in question are:

  1. -nocheck_modtime : don't complain if .mod files appear out of date
    Does ifort even check the modification time of .mod files? I've been trying to concoct a situation to get the compiler to think that the module is out of date, but have not had any luck.
  2. -M : only produce .mod file
    I think -syntax-only is equivalent? This should be much faster than producing an object file, right?
  3. -nomod : don't produce .mod file
    I can't seem to find any equivalent options, although one could be clever and use -I to find modules in a different directory and then implement some logic to see if the newly produced .mod file is different and if so, move it to the module directory to replace the old version and if not delete it so that it doesn't trigger a cascade when an object on which it depends is built.

Thanks

0 Kudos
2 Replies
Steven_L_Intel1
Employee
382 Views

Intel Fortran doesn't have those options. Keep in mind that we don't offer a build system on Linux, so there's no control on checks for module times. The compiler doesn't look at timestamps. -syntax-only might do what you want as far as that goes. While we don't have -nomod, I suppose you could always direct -module to /dev/nul

0 Kudos
Izaak_Beekman
New Contributor II
382 Views

OK, great! Thanks so much Steve. The time stamp issue was the most worrisome to me, as I think I have ways around the other two options via -syntax-only (which definitely does create .mod files for you) and either deleting the mod file after compilation if I don't want it or as you pointed out, sending it to /dev/null.

Thanks!

0 Kudos
Reply