public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/42607]  New: add information about how to compile a module
@ 2010-01-04 13:30 debian-gcc at lists dot debian dot org
  2010-01-05  5:49 ` [Bug fortran/42607] " kargl at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2010-01-04 13:30 UTC (permalink / raw)
  To: gcc-bugs

[forwarded from http://bugs.debian.org/501560]

"gfortran documentation lacks any kind of info about how to create a module
.mod file. It should be quite easy to indicate that the standard gcc option -c
when applied to the to-be-compiled file creates the .mod file along with the .o
file."

should -c explain how a .mod file is created?

  Matthias


-- 
           Summary: add information about how to compile a module
           Product: gcc
           Version: 4.4.3
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: debian-gcc at lists dot debian dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
  2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
@ 2010-01-05  5:49 ` kargl at gcc dot gnu dot org
  2010-01-06 14:16 ` burnus at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-01-05  5:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2010-01-05 05:49 -------
(In reply to comment #0)
> [forwarded from http://bugs.debian.org/501560]
> 
> "gfortran documentation lacks any kind of info about how to create a module
> .mod file. It should be quite easy to indicate that the standard gcc option -c
> when applied to the to-be-compiled file creates the .mod file along with the .o
> file."
> 
> should -c explain how a .mod file is created?

IMHO, the answer is a resounding 'no.'  Adding such information
would simply add unneeded clutter to the manual, and should be
an insult to anyone that uses Fortran.

Also, the Fortran standard does not require that a .mod be created,
and with -fwhole-file it is entirely possible that gfortran 
can keep the module information in memory while compiling a
program and never emit anything.  In fact, the intrinsic
modules specified in the standard (that gfortran has implemented)
do not exist as files.  These are built on the fly.

Should we also explain to the user that 'fire is hot and water
at room temperature is wet.'?


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
  2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
  2010-01-05  5:49 ` [Bug fortran/42607] " kargl at gcc dot gnu dot org
@ 2010-01-06 14:16 ` burnus at gcc dot gnu dot org
  2010-04-02  5:29 ` jv244 at cam dot ac dot uk
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: burnus at gcc dot gnu dot org @ 2010-01-06 14:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from burnus at gcc dot gnu dot org  2010-01-06 14:16 -------
I think a description does not belong into "man gfortran" (invoke.texi), but
maybe into the general text of gfortran.texi.

I think .mod files are not obvious; the standard does not say anything about
them, though (almost?) all compilers use them. On the other hand, few people
seem to have problems with .mod files.

Intel has for instance the following in their manual:
http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/index.htm
 - and mentions it short as output files:
http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/bldaps_for/common/bldaps_produce_outfiles.htm

IBM mentions them shortly at
http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/index.jsp?topic=/com.ibm.xlf101l.doc/xlfcr/compilgpgms.htm


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
  2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
  2010-01-05  5:49 ` [Bug fortran/42607] " kargl at gcc dot gnu dot org
  2010-01-06 14:16 ` burnus at gcc dot gnu dot org
@ 2010-04-02  5:29 ` jv244 at cam dot ac dot uk
  2010-04-04  8:40 ` rwild at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: jv244 at cam dot ac dot uk @ 2010-04-02  5:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jv244 at cam dot ac dot uk  2010-04-02 05:29 -------
(In reply to comment #2)
> I think .mod files are not obvious; the standard does not say anything about
> them, though (almost?) all compilers use them. On the other hand, few people
> seem to have problems with .mod files.

the current Cray compiler (from cce) does not have modules, the mod info ends
up in the .o files.

one thing that could be documented about the gfortran mod files is that they
are left untouched if possible. We use that in our makefile to avoid
recompilation cascades. This is actually an important feature for developers,
since it makes gfortran much faster for development than many of the other
compilers.

Furthermore, the fact that left-over mod files from older/newer gfortran
compilers leads to user-visible error messages could also be worth documenting
(At least state that even though .o, .a and .so files might be 'ABI-compatible'
over several versions of the compiler, .mod files a specific to even a minor
version of the compiler). 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
  2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
                   ` (2 preceding siblings ...)
  2010-04-02  5:29 ` jv244 at cam dot ac dot uk
@ 2010-04-04  8:40 ` rwild at gcc dot gnu dot org
  2010-04-04 15:02 ` jvdelisle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 13+ messages in thread
From: rwild at gcc dot gnu dot org @ 2010-04-04  8:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from rwild at gcc dot gnu dot org  2010-04-04 08:40 -------
(In reply to comment #1)
> > should -c explain how a .mod file is created?
> 
> IMHO, the answer is a resounding 'no.'  Adding such information
> would simply add unneeded clutter to the manual, and should be
> an insult to anyone that uses Fortran.

Not documenting the semantics of module files anywhere is a sure way for build
tools like Automake to never get decent support for building Fortran.  As it is
now, the user needs to fake dependencies manually to make up for this missing
information.  (Where to put the information is another question altogether.)

> Also, the Fortran standard does not require that a .mod be created,

The Fortran standard is irrelevant for this question.  Users want 'make clean'
to remove cruft that 'make' created, and you don't provide a 'gfortran --clean'
to keep information about .mod files under the hood either.


-- 

rwild at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rwild at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
  2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
                   ` (3 preceding siblings ...)
  2010-04-04  8:40 ` rwild at gcc dot gnu dot org
@ 2010-04-04 15:02 ` jvdelisle at gcc dot gnu dot org
  2010-04-04 20:29 ` kargl at gcc dot gnu dot org
  2010-04-05 10:01 ` envite at rolamasao dot org
  6 siblings, 0 replies; 13+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2010-04-04 15:02 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from jvdelisle at gcc dot gnu dot org  2010-04-04 15:02 -------
That idea of a --clean is interesting.  I can see where it would be useful to
force a recompile of module files.  I am not sure what the actual flag should
be. Of course one could use make to do all of this.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
  2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
                   ` (4 preceding siblings ...)
  2010-04-04 15:02 ` jvdelisle at gcc dot gnu dot org
@ 2010-04-04 20:29 ` kargl at gcc dot gnu dot org
  2010-04-05 10:01 ` envite at rolamasao dot org
  6 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu dot org @ 2010-04-04 20:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from kargl at gcc dot gnu dot org  2010-04-04 20:28 -------
(In reply to comment #5)
> (In reply to comment #1)
> > > should -c explain how a .mod file is created?
> > 
> > IMHO, the answer is a resounding 'no.'  Adding such information
> > would simply add unneeded clutter to the manual, and should be
> > an insult to anyone that uses Fortran.
> 
> Not documenting the semantics of module files anywhere is a sure way for build
> tools like Automake to never get decent support for building Fortran.  As it is
> now, the user needs to fake dependencies manually to make up for this missing
> information.  (Where to put the information is another question altogether.)

I don't use automake, so I really don't care what it does or does
not do.

> > Also, the Fortran standard does not require that a .mod be created,
> 
> The Fortran standard is irrelevant for this question.  Users want 'make clean'
> to remove cruft that 'make' created, and you don't provide a 'gfortran --clean'
> to keep information about .mod files under the hood either.
> 

The Fortran standard is the only thing that matters.

'make clean' does the right thing for me.  Of course,
I know how to write a Makefile without depending on
the whim (yes, I wrote whim) of the automake developers.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
  2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
                   ` (5 preceding siblings ...)
  2010-04-04 20:29 ` kargl at gcc dot gnu dot org
@ 2010-04-05 10:01 ` envite at rolamasao dot org
  6 siblings, 0 replies; 13+ messages in thread
From: envite at rolamasao dot org @ 2010-04-05 10:01 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from envite at rolamasao dot org  2010-04-05 10:00 -------
I do not care particularly about automake and such, but precisely because the
Fortran standard does not say a word about module files the user expects to get
info about them _for his compiler_ in _his compiler documentation_.

That's why I think we must (yes, I included myself, because I've spent so much
time trying to figure out how gfortran module files work) create a
documentation section for them. User has the right to know what module files
are (not necessarily the internals), when they're created, where they're stored
and searched for, and whether they're changed if source code change does not
change the module interface.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
       [not found] <bug-42607-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2013-06-25 18:31 ` anlauf at gmx dot de
@ 2015-08-26 15:20 ` gwhowell at ncsu dot edu
  4 siblings, 0 replies; 13+ messages in thread
From: gwhowell at ncsu dot edu @ 2015-08-26 15:20 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607

Gary Howell <gwhowell at ncsu dot edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gwhowell at ncsu dot edu

--- Comment #14 from Gary Howell <gwhowell at ncsu dot edu> ---
A downside to having no documentation for .mod files .. 

cmake suppresses the output from make (get % completed) 

gfortran acts on 
.f90 files to produce .o files .. and when needed also the .mod file
but one .o file fails to produce a .mod file  

and cmake then fails because it can't find the .mod file

suspect this is not a problem with gfortran (likely the preprocessor
failed) but IMHO words in the documentation about when gfortran produces
a .mod file would help in debugging. 

Regards, 
Gary Howell


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
       [not found] <bug-42607-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2013-06-24 20:46 ` dominiq at lps dot ens.fr
@ 2013-06-25 18:31 ` anlauf at gmx dot de
  2015-08-26 15:20 ` gwhowell at ncsu dot edu
  4 siblings, 0 replies; 13+ messages in thread
From: anlauf at gmx dot de @ 2013-06-25 18:31 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607

Harald Anlauf <anlauf at gmx dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at gmx dot de

--- Comment #13 from Harald Anlauf <anlauf at gmx dot de> ---
Since Cray was mentioned, the Cray online documentation says:

[...]
The following files are produced by or accepted by the Cray Fortran compiler:
[...]

modulename.mod
            If the -em option is specified, the compiler writes a
            modulename.mod file for each module; modulename is created by
            taking the name of the module and, if necessary, converting it to
            uppercase. This file contains module information, including any
            contained module procedures.


I consider that an example of a reasonable documentation.

Gfortran generated module files (modulename.mod) are always lower case.
Gfortran creates a .mod file not only for -c, but also for -fsyntax-only,
and apparently always when it is presented a source file which contains
a module statement.  It should not be that difficult to put that into the
documentation.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
       [not found] <bug-42607-4@http.gcc.gnu.org/bugzilla/>
  2011-03-05 17:33 ` nightstrike at gmail dot com
  2011-03-05 17:58 ` kargl at gcc dot gnu.org
@ 2013-06-24 20:46 ` dominiq at lps dot ens.fr
  2013-06-25 18:31 ` anlauf at gmx dot de
  2015-08-26 15:20 ` gwhowell at ncsu dot edu
  4 siblings, 0 replies; 13+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-06-24 20:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING
   Last reconfirmed|                            |2013-06-24
     Ever confirmed|0                           |1

--- Comment #11 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
What should we do with this PR?


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
       [not found] <bug-42607-4@http.gcc.gnu.org/bugzilla/>
  2011-03-05 17:33 ` nightstrike at gmail dot com
@ 2011-03-05 17:58 ` kargl at gcc dot gnu.org
  2013-06-24 20:46 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: kargl at gcc dot gnu.org @ 2011-03-05 17:58 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #10 from kargl at gcc dot gnu.org 2011-03-05 17:57:47 UTC ---
(In reply to comment #9)
> Any chance of this happening?

No one who seemed to care about the issue has
stepped up with a patch.  One may then draw
the conclusion of 'no'.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug fortran/42607] add information about how to compile a module
       [not found] <bug-42607-4@http.gcc.gnu.org/bugzilla/>
@ 2011-03-05 17:33 ` nightstrike at gmail dot com
  2011-03-05 17:58 ` kargl at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: nightstrike at gmail dot com @ 2011-03-05 17:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42607

nightstrike <nightstrike at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nightstrike at gmail dot
                   |                            |com

--- Comment #9 from nightstrike <nightstrike at gmail dot com> 2011-03-05 17:33:05 UTC ---
Any chance of this happening?


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-08-26 15:20 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-04 13:30 [Bug fortran/42607] New: add information about how to compile a module debian-gcc at lists dot debian dot org
2010-01-05  5:49 ` [Bug fortran/42607] " kargl at gcc dot gnu dot org
2010-01-06 14:16 ` burnus at gcc dot gnu dot org
2010-04-02  5:29 ` jv244 at cam dot ac dot uk
2010-04-04  8:40 ` rwild at gcc dot gnu dot org
2010-04-04 15:02 ` jvdelisle at gcc dot gnu dot org
2010-04-04 20:29 ` kargl at gcc dot gnu dot org
2010-04-05 10:01 ` envite at rolamasao dot org
     [not found] <bug-42607-4@http.gcc.gnu.org/bugzilla/>
2011-03-05 17:33 ` nightstrike at gmail dot com
2011-03-05 17:58 ` kargl at gcc dot gnu.org
2013-06-24 20:46 ` dominiq at lps dot ens.fr
2013-06-25 18:31 ` anlauf at gmx dot de
2015-08-26 15:20 ` gwhowell at ncsu dot edu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).