quick question about compiler vendor supplied modules on *NIX

quick question about compiler vendor supplied modules on *NIX

Question: Are there any compiler vendor supplied modules other than `ifport ifnls ifcore ifposix` that one would anticipate a user calling if they are writing native (not cross-compiled) Fortran on a *nix system? (I figure *nix users likely won't be using the Windows dialog/window making, etc modules)

I ask because I'm nearly done writing a sane-ish automatic dependency resolution and on the fly syntax checking GNU Makefile for use on *nix systems and with Emacs' flymake-mode. Through some inelegant "parsing" of the output of makedepf90, abuse of the sed command and makefile syntax I have something half decent working with OK abstraction and generality. However, I need to make sure that makedepf90 will ignore any use statements that the compiler will handle for compiler supplied modules. (Otherwise make things that the source file which uses compiler supplied modules can't be built because it doesn't know how to create the corresponding .mod files.)

A little more info for those who are curious: I followed GNU Make's recommended procedure for generating prerequisites automatically which means that there is one dependency file per fortran source file which gets included by GNU Make and automatically updated. This means that when a source file is updated, its dependency information is updated automatically without having to parse all of the source files in a source tree. Furthermore, I followed some of the suggestions at to improve speed, usage and generality from http://mad-scientist.net/make/autodep.html. However, I did violate Paul's 3rd rule of makefiles, to a degree, because I did not want to pollute the source directory with flymake temporary files, mod files and included dependency files. A simple/sane flymake implementation using makefiles requires a Makefile in the CWD and it made sense to me not to mess with this idea.

I will be putting more info up about this on github and the emacs wiki once I am satisfied with my work, hopefully later this afternoon.

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I thought of two more that I might need mpi if the compiler is intel mpif90 and omp_lib... any others?

Are you excluding the Fortran 2003 intrinsic modules such as ISO_C_BINDING?

Retired 12/31/2016

Yes, if it's in the standard (iso_c_binding, iso_fortran_env, ieee_arithmetic, ieee_exceptions, ieee_features) I excluded no matter what the compiler is. Right now I have support for gfortran (default since it's free) and ifort. Are there any other ifort specific intrinsic modules I should worry about?

Is the body of my original post visible to everyone? There was quite a bit of text there when I composed it, but now, on google chrome beta and Mac OS X (Mavericks) I can't see the body of my OP... strange.

huh, the issue with the visibility of the OP seems to have resolved itself.

Yeah, I've seen the visibility problem before, but it cleared up before I could report it.

It's trivial for you to see all the modules we supply - just look in the compiler include folder. I can't think of any you haven't mentioned.

Retired 12/31/2016

Thanks for the info about the include directory. On OS X it wasn't where I would have expected it to be (I'm more used to Linux) but I found it.

After digging around the include directory I don't really see other candidates, other than omp_lib_kinds although I'm not sure what the foriosdef module does, but I searched for it in the compiler documentation and didn't find anything, so I doubt one would expect to find it in client code. (Although one really never knows what those mischievous clients will do.) Also I don't seem to so the ifnls module in the include directory, but it's possible that I opted out of installing it.

Thanks again, Steve.

I'll probably make a new post once the setup is up and documented on github. Might not be until tomorrow though.

Ah, FORIOSDEF. This defines the values returned by IOSTAT=.

IFNLS is Windows only.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today