[yt-dev] Forthon 0.8.13

Douglas Harvey Rudd drudd at uchicago.edu
Wed Jul 9 09:44:10 PDT 2014


Hi all,

Has anyone tried to build YT using a recent version of Forthon?  I've been building using 0.8.10 on an older Python installation but when I use any of 3 installations using Forthon 0.8.13 (pip installed, 0.8.15 is current) it fails due to misunderstanding how to construct the module fortran file from the module name:

Traceback (most recent call last):
  File "/software/python-2.7-2014q2-el6-x86_64/bin/Forthon", line 2, in <module>
    import Forthon.Forthon_builder
  File "/software/python-2.7-2014q2-el6-x86_64/lib/python2.7/site-packages/Forthon/Forthon_builder.py", line 87, in <module>
    raise Exception('Main fortran file can not be found, please specify using the fortranfile option')
Exception: Main fortran file can not be found, please specify using the fortranfile option

....

subprocess.CalledProcessError: Command '['/software/python-2.7-2014q2-el6-x86_64/bin/Forthon', '-F', 'gfortran', '--compile_first', 'fKD_source', '--no2underscores', '--fopt', "'-O3'", 'fKD', 'fKD_source.f90']' returned non-zero exit status 1


Looking through the differences in Forthon_builder.py between those two versions looks like fortranfile is set to a default in the older version:
0.8.10:34  fortranfile    = options.fortranfile or (pkg + '.' + options.fixed_suffix)
0.8.13:34  fortranfile    = options.fortranfile

Adding a --fortranfile option for fKD.f90 seems to work, but I'm not certain this is the correct solution.  I'll submit a PR for the following change unless anyone else has a better idea (or reason it's a bad idea):

setup.py:63
        cmd = [Forthon_exe, "-F", "gfortran", "--compile_first",
               "fKD_source", "--no2underscores", "--fopt", "'-O3'", "fKD",
               "fKD_source.f90"]

->

        cmd = [Forthon_exe, "-F", "gfortran", "--compile_first",
               "fKD_source", "--no2underscores", "--fopt", "'-O3'", "-f", "fKD.f90",
               "fKD", "fKD_source.f90"]
 
Douglas Rudd
Scientific Computing Consultant
Research Computing Center
drudd at uchicago.edu






More information about the yt-dev mailing list