You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Source code files for recently introduced methods and functionalities like LIBXC, RI-MP2GRD or RI-CC use extensively Fortran 2003 syntax, e.g., allocatable assignments. As such, these source code files require proper treatment by Fortran compilers, so the compiler recognize them as Fortran 2003 code.
As result, I see people adding script support for various platforms and compilers trying to deal with such files. This is either adding specific computer flags, or using compiler alias that force compiler to treat $MODULE.F90 as the Fortran 2003 code.
I suggest much neater solution, which could 1) help avoid complications in future and 2) eliminate these many platform or compiler specific lines, as specified above. This could be an introduction of yet another MODULE_F extension, namely .F03. Most, if not all, modern Fortran compilers should automatically turn on all necessary flags for Fortran 2003 code if the file extension .F03 used.
I suggest to make changes in the "comp" switch setting the extension for MODULE_F. It could start as below
switch ($MODULE)
case mod_dft_gridint:
case mod_dft_molgrid:
case mod_grid_storage:
case mod_nosp_basis:
case mod_nameio:
case functionals:
case riccutils:
case riccrhf:
case rimp2grd:
case rimp2omp:
case libxc:
case libxc_empty:
set MODULE_F=$MODULE.F03
breaksw
....
other cases as before
....
switch ($MODULE_F:e)
case f:
case F:
sed -e "s/^$MACHIN/ /" $SRCIN > $CODEOUT
breaksw
case f90:
case F90:
case F03:
cp $SRCIN $CODEOUT
breaksw
endsw
Ivan Rostov
NCI Australia, Canberra
The text was updated successfully, but these errors were encountered:
Source code files for recently introduced methods and functionalities like LIBXC, RI-MP2GRD or RI-CC use extensively Fortran 2003 syntax, e.g., allocatable assignments. As such, these source code files require proper treatment by Fortran compilers, so the compiler recognize them as Fortran 2003 code.
As result, I see people adding script support for various platforms and compilers trying to deal with such files. This is either adding specific computer flags, or using compiler alias that force compiler to treat $MODULE.F90 as the Fortran 2003 code.
I suggest much neater solution, which could 1) help avoid complications in future and 2) eliminate these many platform or compiler specific lines, as specified above. This could be an introduction of yet another MODULE_F extension, namely .F03. Most, if not all, modern Fortran compilers should automatically turn on all necessary flags for Fortran 2003 code if the file extension .F03 used.
I suggest to make changes in the "comp" switch setting the extension for MODULE_F. It could start as below
Ivan Rostov
NCI Australia, Canberra
The text was updated successfully, but these errors were encountered: