GCC at Google Summer of Code
GCC participates at Google's Summer of Code program. If you are a
student - whether undergrad, graduate or Ph.D.: That's the opportunity
to help working on an Open Source project, have some fun, improve your
favourite compiler - and earn some bucks as well. At least for most
front-end parts, one does not need to be a compiler wizard - and
(nearly) all current developers have a background in physics, chemistry,
engineering or similar - and work on gfortran in their spare time. There
are many possible projects such as improving the support for
polymorphism (object oriented programming), multi-image coarrays,
run-time argument checking, and many more on all levels of difficulty. -
If you are not a student yourself, but know one, you could inform
him/her about this programme. See http://www.google-melange.com/ for
details.
* * *
GCC 4.6.0
The version 4.6.0 of the GNU Compiler Collection (GCC) has been just
released. It might take a while until your distributor (Linux/UNIX
vendor, Cygwin, MinGW/MinGW64, ...) has the new version. Though, some
vendors do already have 4.6 in unstable, on the build server, etc. See
also http://gcc.gnu.org/wiki/GFortranBinaries
The 4.6 release also opened the 4.7 development cycle; you can expect
some nice features - which exactly, only the future will tell. However,
the first improvements are already in.
Release notes: http://gcc.gnu.org/gcc-4.6/changes.html
Highlights:
* Many improvements to the Link-Time Optimization (LTO), which optimizes
programs across several .o files and thus also between Fortran, C, C++
etc. programs.
* Support for new CPUs and improved CPU tuning - in particular with
-march=native and for AVX and the new Sandy Bridge/Bobcat processors.
* GCC ships now with the libquadmath library for 128bit floating-point
arithmetic on x86, x86-64 and ia64 systems. The library is accessible
from C/C++ (__float128; with printf hooks on GLIBC systems) and it is
used to implement the REAL(16) data type in gfortran. As the operations
can not be done fully in hardware, the math functions can be between
approx. 1.2 to 300 times slower than "double"/REAL(8), depending on used
operations/math functions. (The library should cover all C99/Fortran
2003/2008 real and complex math functions.)
* Fortran: Better whole-file argument diagnostic and improved code
generation in particular more inlining; additional early optimization
reducing the number of array temporaries. Compile time is now much
faster for large array constructors.
* Fortran 2003: Improved polymorphism support, ASSOCIATE construct,
(re)allocate on assignment, deferred-type parameter for scalar character
variables ("allocatable character length"), pointer-rank remapping,
allocatable namelists variables
* Fortran 2008: CONTIGUOUS, ALLOCATE with MOLD=, IMPURE (ELEMENTAL)
procedures, most of the new intrinsics (in particular:
execute_command_line and bit intrinsics), experimental single-image
coarray support
Tobias
|
|
0
|
|
|
|
Reply
|
Tobias
|
3/27/2011 11:30:52 AM |
|
That's very interesting. Is GFortran written in C, C++ or Fortran? What
kind of background do you need? Where can I learn more about a GSC
project with GFortran?
Daniel.
On 03/27/2011 01:30 PM, Tobias Burnus wrote:
> GCC at Google Summer of Code
>
> GCC participates at Google's Summer of Code program. If you are a
> student - whether undergrad, graduate or Ph.D.: That's the opportunity
> to help working on an Open Source project, have some fun, improve your
> favourite compiler - and earn some bucks as well. At least for most
> front-end parts, one does not need to be a compiler wizard - and
> (nearly) all current developers have a background in physics, chemistry,
> engineering or similar - and work on gfortran in their spare time. There
> are many possible projects such as improving the support for
> polymorphism (object oriented programming), multi-image coarrays,
> run-time argument checking, and many more on all levels of difficulty. -
> If you are not a student yourself, but know one, you could inform
> him/her about this programme. See http://www.google-melange.com/ for
> details.
>
> * * *
>
> GCC 4.6.0
>
> The version 4.6.0 of the GNU Compiler Collection (GCC) has been just
> released. It might take a while until your distributor (Linux/UNIX
> vendor, Cygwin, MinGW/MinGW64, ...) has the new version. Though, some
> vendors do already have 4.6 in unstable, on the build server, etc. See
> also http://gcc.gnu.org/wiki/GFortranBinaries
>
> The 4.6 release also opened the 4.7 development cycle; you can expect
> some nice features - which exactly, only the future will tell. However,
> the first improvements are already in.
>
>
> Release notes: http://gcc.gnu.org/gcc-4.6/changes.html
>
> Highlights:
>
> * Many improvements to the Link-Time Optimization (LTO), which optimizes
> programs across several .o files and thus also between Fortran, C, C++
> etc. programs.
>
> * Support for new CPUs and improved CPU tuning - in particular with
> -march=native and for AVX and the new Sandy Bridge/Bobcat processors.
>
> * GCC ships now with the libquadmath library for 128bit floating-point
> arithmetic on x86, x86-64 and ia64 systems. The library is accessible
> from C/C++ (__float128; with printf hooks on GLIBC systems) and it is
> used to implement the REAL(16) data type in gfortran. As the operations
> can not be done fully in hardware, the math functions can be between
> approx. 1.2 to 300 times slower than "double"/REAL(8), depending on used
> operations/math functions. (The library should cover all C99/Fortran
> 2003/2008 real and complex math functions.)
>
> * Fortran: Better whole-file argument diagnostic and improved code
> generation in particular more inlining; additional early optimization
> reducing the number of array temporaries. Compile time is now much
> faster for large array constructors.
>
> * Fortran 2003: Improved polymorphism support, ASSOCIATE construct,
> (re)allocate on assignment, deferred-type parameter for scalar character
> variables ("allocatable character length"), pointer-rank remapping,
> allocatable namelists variables
>
> * Fortran 2008: CONTIGUOUS, ALLOCATE with MOLD=, IMPURE (ELEMENTAL)
> procedures, most of the new intrinsics (in particular:
> execute_command_line and bit intrinsics), experimental single-image
> coarray support
>
> Tobias
|
|
0
|
|
|
|
Reply
|
Daniel
|
3/27/2011 12:06:44 PM
|
|
On Mar 27, 5:06=A0am, Daniel Carrera <dan...@gmail.com> wrote:
> That's very interesting. Is GFortran written in C, C++ or Fortran? What
> kind of background do you need? Where can I learn more about a GSC
> project with GFortran?
>
The front-end code is written in C. The library code is written
in C, m4, and Fortran. You can find some info at
http://gcc.gnu.org/wiki/SummerOfCode
(which appears to be slightly out-of-date.)
--
steve
|
|
0
|
|
|
|
Reply
|
steve
|
3/27/2011 12:24:08 PM
|
|
Daniel Carrera wrote:
> That's very interesting. Is GFortran written in C, C++ or Fortran?
Most parts are written in C; a small part of the run-time library is
written in Fortran - and in m4-wrapped C code. (The test cases in the
test suite are - of course - written in in Fortran - with some C for
BIND(C).)
> What kind of background do you need?
Passion :-) More seriously: Some knowledge in C, willingness to work on
the project.
> Where can I learn more about a GSC project with GFortran?
Well, there is no real list of items. Every GSoC student can propose
their pet project. The main interest from our side (current gfortran
developers) is of course to complete the missing Fortran 2003/2008
features, though as written adding run-time argument checking or similar
non-F03/08 items are also useful.
As Steve mentioned, there is a GSoC page at GCC (
http://gcc.gnu.org/wiki/SummerOfCode ), which I believe is up to date.
However, it only lists some ideas - and it list's the GSoC projects of
the previous years. You will see that the projects had been (as always)
overly ambitious, but they were still successful, bringing proc-pointers
and ASSOCIATE, and some OOP - though some work was also done by the same
contributors outside of GSoC. -- If you (that applies to anyone) has
some specific questions, feel free to write a private email or to send
an email to GCC's Fortran mailing list.
Usually, the best way to contribute is to start with fixing a small bug
- typically, diagnostics or issues involving invalid code are best. That
way one gets an idea about the code - and fixes a real world issue at
the same time. (See GCC's Bugzilla or ask for suggestions for a PR to
pick. After picking one, you probably still want to ask for some
suggestions regarding where/how to fix the PR - unless you want to be
brave and prefer to figure it out yourself.)
Note: I think this topic is becoming too specific to comp.lang.fortran.
I thus suggest to continue it either via private email or on the GCC's
Fortran mailing list, cf. http://gcc.gnu.org/lists.html
Note 2: There is also an IRC channel for the GCC development (#gcc) and
for gfortran (#gfortran) at irc.oftc.net. The gfortran one is usually a
bit quiet, though, - and the #gcc one is strictly for development *of*
GCC. (Use irc.freenode.net's #gcc for questions regarding the
development *with* GCC.)
* * *
To start - for GSoC or if someone else is interested in the code:
a) The Free Software Foundation wants to have a copyright assignment for
all non-trivial patches (>10 lines trivial code), cf.
http://gcc.gnu.org/contribute.html ; thus, this is an unfortunate legal
prerequisite before patches can be accepted - and as it involves at some
point paper send by mail (not email), it can also take a while. Hence,
the procedure should be started as soon as one knows that one wants to
contribute.
b) The source code itself
Best is to use either subversion or Git to access the code (you can also
browse the code via the web):
SVN: http://gcc.gnu.org/svn.html
GIT: http://gcc.gnu.org/wiki/GitMirror
The GIT repository needs about 1.4 GB of hard-disk space (.git = 750 MB,
gcc = 320 MB of which testsuite has 151 MB, libjava 170 MB, libstdc++-v3
= 65 MB), the svn repository needs 1.5 GB. (Git seems to be much more
efficient, given that it includes the full revision log and some of the
GCC branches.) If you do not have that much space and do not want to
build GCC, you could also download only some directories, which SVN and
GIT allow. Or you can use the weekly snapshot of GCC, which allows one
to download only parts of the source code. However, when developing,
having the full source code as GIT or SVN repository is best.
The code consists of:
gcc - the compiler itself
gcc/fortran - the Fortran compiler
libgfortran - the Fortran run-time library
gcc/testsuite/gfortran.dg -- the Fortran part of the ...
gcc/testsuite/gfortran.fortran-torture/ - ... testsuite
libgomp - the OpenMP run-time library (contains also [Fortran] test cases)
libquadmath - the REAL(16)/__float128 math library
- and several other directory -
In gcc/fortran, the trans* files are about translating the gfortran
internal representation into the gimple format of the compiler middle
end. All other files in the directory deal with the internal gfortran
structures to hold the representation of the source code. Thus,
typically one treads statements via decl.c or match*.c during parsing
and then post-process them in resolve.c before they are converted into
the gimple "tree" in trans-{stmt,decl,expr}.c. For intrinsic procedures,
the walk is usually: intrinsic.c, check.c, simplify.c, iresolve.c and
then trans-intrinsic.c. The main definitions are in gfortran.h.
Note: The proper compilers are f951, cc1, lto1, etc. Those are called by
a wrapper (called driver) with names "gcc", "gfortran", "g++" etc.
Hence, calling "gfortran foo.c bar.f90" works by calling "cc1" for one
file and "f951" for the other file, before "gfortran" calls the
assembler and linker. Compile with "-v" to see how the proper compiler
is invoked. Usually, the distinction between compiler and driver does
not matter, but if you want to debug the compiler (rather than the
driver), running "gdb --args gfortran -c foo.f90" is not what you want.
Use something like
gdb --args `gfortran -v -c foo.f90 2>&1 | grep f951`
instead.
(Note there is a small difference between compiling programs with "gcc"
vs. "gfortran": "gfortran" links by default libgfortran and libm, "gcc"
does not.)
c) Building GCC: See http://gcc.gnu.org/wiki/GFortranBinaries#FromSource
It makes sense to be able to build GCC oneself - at least if one wants
to modify its code. I have only experience doing so under Linux, where
it is relatively straight forward, but others do it also under MinGW or
MacOS or Cygwin. However, running the test suite under Windows is said
to be no fun. (It takes ages.)
You need a sufficiently recent GMP (integer arithmethic), mpfr
(floating-point arithmethic) and MPC (complex arithmetic) library as
stated at http://gcc.gnu.org/install/ - typically, at least the latter
is missing, unless your distribution offers already GCC 4.5. Those files
can also be build in tree and are also available from the
"infrastructure" directory on the FTP mirrors - along with the source
code of GCC itself.
Tobias
|
|
0
|
|
|
|
Reply
|
Tobias
|
3/27/2011 2:31:54 PM
|
|
On 03/27/2011 04:31 PM, Tobias Burnus wrote:
> Note: I think this topic is becoming too specific to comp.lang.fortran.
> I thus suggest to continue it either via private email or on the GCC's
> Fortran mailing list, cf. http://gcc.gnu.org/lists.html
Agreed. Private mail sent.
Daniel.
|
|
0
|
|
|
|
Reply
|
Daniel
|
3/27/2011 3:27:51 PM
|
|
|
4 Replies
368 Views
(page loaded in 0.107 seconds)
|