#849: Drop explicit support for Fortran 77 in Cactus -------------------------+-------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: new Priority: minor | Milestone: Component: Cactus | Version: Keywords: | -------------------------+-------------------------------------------------- I suggest to drop explicit support for Fortran 77 in Cactus. Fortran 77 is, for all practical purposes, a subset of Fortran 90, and thus Fortran 77 code can be compiled by Fortran 90 compilers.
There is currently no platform that has a Fortran 77 and no Fortran 90 compiler, and there is no Fortran source code in Cactus that cannot be compiled by a Fortran 90 compiler.
In a way, supporting Fortran 77 as language is similar to supporting K&R C as a language. We don't do this either.
I suggest to remove/ignore all configuration options regarding Fortran 77, and to compile .f77 and .F77 files with a Fortran 90 compiler. This change will simplify the configuration stage of Cactus. I don't expect any user to notice.
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: review Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by eschnett):
* status: new => review
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by rhaas):
* status: review => reviewed_ok
Comment:
Fine with me. Have you tested this with eg BLAS and LAPACK (those being F77 codes)? Cactus will already use F90 to compile Fortran 77 files if F77 is unset as far as I know.
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by eschnett):
BLAS and LAPACK use *.f as file names; Cactus interprets that as Fortran 90, and builds them using the Fortran 90 compiler. You have to use .f77 to make Cactus use a Fortran 77 compiler.
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+-------------------------------------------------
Comment (by rhaas):
Would that not only apply to source files in a thorn's src directory (since it is tied one of Cactus' makefile fragments in Cactus/libs/make)? An ExternalLibrary's configure.sh could do whatever it wants to do. BLAS in particular contains: {{{ cat > make.cactus <<EOF SRCS = $(echo *.f) libblas.a: $(SRCS:%.f=%.o) ${AR} ${ARFLAGS} $@ $^ ${RANLIB} ${RANLIBFLAGS} $@ %.o: %.f ${F77} ${F77FLAGS} ${FIXEDF77FLAGS} -c $*.f -o $*.o EOF ${MAKE} -f make.cactus }}} so it uses the F77 compiler for the .f files inside of BLAS. It does compile though when I comment out F77 in my option list (though there are lots of warnings), which given that there is no difference between the F77 options and the F90 option in my optionlist is not that surprising I guess.
The reason I bring this up that I know of some old code (spherepack https://www2.cisl.ucar.edu/resources/legacy/spherepack) that does actually use arithmetic if statements that are (I think) no longer allowed in new Fortran versions. Since we need to support Fortran 2003 (LoopControl uses it) we need to be a bit more careful than supporting only F90 (which I think is indeed a proper superset of F77).
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: eschnett Type: enhancement | Status: assigned Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by eschnett):
* owner: => eschnett * status: reviewed_ok => assigned
Comment:
The attached patch ignores all Fortran 77 configuration options. It also provides all existing Fortran 77 make variables, as copies of the respective Fortran 90 make variables.
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: eschnett Type: enhancement | Status: review Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by eschnett):
* status: assigned => review
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: eschnett Type: enhancement | Status: reviewed_ok Priority: minor | Milestone: Component: Cactus | Version: Resolution: | Keywords: --------------------------+------------------------------------------------- Changes (by rhaas):
* status: review => reviewed_ok
Comment:
Please apply.
#849: Drop explicit support for Fortran 77 in Cactus --------------------------+------------------------------------------------- Reporter: eschnett | Owner: eschnett Type: enhancement | Status: closed Priority: minor | Milestone: Component: Cactus | Version: Resolution: fixed | Keywords: --------------------------+------------------------------------------------- Changes (by eschnett):
* status: reviewed_ok => closed * resolution: => fixed
Comment:
Applied as r5018.
trac@lists.einsteintoolkit.org