Deutsch English Français Italiano |
<vh46gf$2mgb8$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Thomas Koenig <tkoenig@netcologne.de> Newsgroups: comp.lang.fortran Subject: Re: in gfortran, is it faster compile times with *.mod files ? Date: Thu, 14 Nov 2024 06:48:47 -0000 (UTC) Organization: A noiseless patient Spider Lines: 44 Message-ID: <vh46gf$2mgb8$1@dont-email.me> References: <vgtt3v$169sh$1@dont-email.me> <vgturv$16fp9$1@dont-email.me> <vgu2rb$16rop$2@dont-email.me> <vgv213$1g931$1@dont-email.me> <vh0chn$1oq8f$1@dont-email.me> <vh0fji$1par2$1@dont-email.me> <vh323k$2cgju$1@dont-email.me> Injection-Date: Thu, 14 Nov 2024 07:48:47 +0100 (CET) Injection-Info: dont-email.me; posting-host="6698cc2e96426248f655040761c17fa8"; logging-data="2834792"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+Ie5bUII+WJb4xOr9qWYNTdicN6Yr6t3c=" User-Agent: slrn/1.0.3 (Linux) Cancel-Lock: sha1:sU0ezwxOObjytCvO5Lx6uFRmjVU= Bytes: 2800 Lynn McGuire <lynnmcguire5@gmail.com> schrieb: > On 11/12/2024 2:59 PM, Thomas Koenig wrote: >> Hm... maybe another point. If you want to find discrepancies in >> argument lists, you could concatenate all your Fortran source files >> into one (which will be large, I presume) and then run "gfortran >> -fsyntax-only" on it. You could then get error messages like >> >> $ cat mismatch.f >> subroutine foo(a) >> real a >> end >> >> subroutine bar >> call foo(42) >> end >> $ gfortran -fsyntax-only mismatch.f >> mismatch.f:6:72: >> >> 6 | call foo(42) >> | 1 >> Error: Type mismatch in argument 'a' at (1); passed INTEGER(4) to REAL(4) >> >> which you could then investigate. > > Yeah, I really do not want to do that as it will be only a special run. > I want the errors to show up during each compile so that the programmer > will fix them right then and there. Then modules are your best choice, I think. On the other hand, -fsyntax-only is very fast because it does not do code generation at all. It might be worth a try to see how long it takes on your whole codebase, and if it can be integrated into your normal compilation process. > And we had a user run into an unbalanced argument call to a subroutine > on Monday. One of us had changed a subroutine argument list and fixed 8 > out of the 9 calls. No telling how many of those land mines are sitting > in our software. You will find out with -fsyntax-only. Another possibility is -flto, but then the final "linking" step will take a very long time. Might speed up things in the resulting executable, though.