jacobwilliams / Fortran-Astrodynamics-Toolkit

A Modern Fortran Library for Astrodynamics 🚀
Other
175 stars 50 forks source link

Problems compiling with ifort #3

Closed astrojuanlu closed 8 years ago

astrojuanlu commented 8 years ago

I tried compiling with the latest ifort, but it didn't work. These are my modified build script and the compilation log with -verbose:

#!/bin/bash

#
#  Build the Fortran Astrodynamics Toolkit library and example programs
#
#  Requirements:
#  
#  * FoBiS - https://github.com/szaghi/FoBiS
#    Install using: sudo pip install FoBiS.py
#
#  * FORD - https://github.com/cmacmackin/ford
#    Install using: sudo pip install ford
#

DOCDIR='./doc/'                             # build directory for documentation
SRCDIR='./src/'                             # library source directory
TESTDIR='./tests/'                          # tests source directory
BINDIR='./bin/'                             # build directory for example
LIBDIR='./lib/'                             # build directory for library
MODCODE='fortran_astrodynamics_toolkit.f90' # FAT module file name
LIBOUT='libfat.a'                           # name of FAT library
FORDMD='fortran-astrodynamics-toolkit.md'   # FORD MD config file
FCOMPILER='intel'                             # Fortran compiler flag for FoBiS
FCOMPILERFLAGS='-c -O2'                     # Fortran compiler settings

#build source using FoBiS:

if hash FoBiS.py 2>/dev/null; then

    echo "build library..."
    FoBiS.py build -compiler ${FCOMPILER} -fc /home/juanlu/INTEL/bin/ifort -cflags "${FCOMPILERFLAGS}" -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors -verbose

    echo "build test programs"
    FoBiS.py build -compiler ${FCOMPILER} -fc /home/juanlu/INTEL/bin/ifort -cflags "${FCOMPILERFLAGS}" -dbld ${BINDIR} -s ${TESTDIR} -i ${LIBDIR} -dmod ./ -dobj ./ -libs ${LIBDIR}${LIBOUT} -colors -verbose

else
    echo "FoBiS.py not found! Cannot build library. Install using: sudo pip install FoBiS.py"
fi

# build the documentation using FORD:

if hash ford 2>/dev/null; then

    echo "Building documentation..."
    ford ${FORDMD}

else
    echo "Ford not found! Cannot build documentation. Install using: sudo pip install ford"
fiFind attached 

build library...
src/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
----------------------------------------^
src/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
-----------------------------------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
compilation aborted for src/geopotential_module.f90 (code 1)
Module 'pygooglechart' not found: Gcov graphs disabled
Builder options
  Directories
    Building directory: "lib"
    Compiled-objects .o   directory: "lib"
    Compiled-objects .mod directory: "lib"
  Compiler options
    Vendor: "intel"
    Compiler command: "/home/juanlu/INTEL/bin/ifort"
    Module directory switch: "-module"
    Compiling flags: "-c -O2"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  PreForM.py used: False
  PreForM.py output directory: None
  PreForM.py extensions processed: []

Building src/fortran_astrodynamics_toolkit.f90
Compiling src/kind_module.f90 serially
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/kind_module.f90 -o lib/kind_module.o
Compiling src/numbers_module.f90 serially
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/numbers_module.f90 -o lib/numbers_module.o
Compiling src/vector_module.f90 serially
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/vector_module.f90 -o lib/vector_module.o
Compiling src/conversion_module.f90 serially
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/conversion_module.f90 -o lib/conversion_module.o
Compiling src/random_module.f90 serially
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/random_module.f90 -o lib/random_module.o
Compiling src/brent_module.f90 src/math_module.f90 src/gooding_module.f90 serially
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/brent_module.f90 -o lib/brent_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/math_module.f90 -o lib/math_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/gooding_module.f90 -o lib/gooding_module.o
Compiling src/bplane_module.f90 src/complex_step.f90 src/crtbp_module.f90 src/ephemeris_module.f90 src/geodesy_module.f90 src/geometry_module.f90 src/geopotential_module.f90 src/iau_orientation_module.f90 src/lambert_module.f90 src/minpack_module.f90 src/modified_equinoctial_module.f90 src/relative_motion_module.f90 src/rk_module.f90 src/string_module.f90 src/time_module.f90 serially
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/bplane_module.f90 -o lib/bplane_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/complex_step.f90 -o lib/complex_step.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/crtbp_module.f90 -o lib/crtbp_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/ephemeris_module.f90 -o lib/ephemeris_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/geodesy_module.f90 -o lib/geodesy_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/geometry_module.f90 -o lib/geometry_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/geopotential_module.f90 -o lib/geopotential_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/iau_orientation_module.f90 -o lib/iau_orientation_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/lambert_module.f90 -o lib/lambert_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/minpack_module.f90 -o lib/minpack_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/modified_equinoctial_module.f90 -o lib/modified_equinoctial_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/relative_motion_module.f90 -o lib/relative_motion_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/rk_module.f90 -o lib/rk_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/string_module.f90 -o lib/string_module.o
Executing: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/time_module.f90 -o lib/time_module.o
src/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
----------------------------------------^
src/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
-----------------------------------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
compilation aborted for src/geopotential_module.f90 (code 1)

build test programs
Module 'pygooglechart' not found: Gcov graphs disabled
Ford not found! Cannot build documentation. Install using: sudo pip install ford
jacobwilliams commented 8 years ago

Weird. It works fine with gfortran. Looking at the error, I think it might be an Intel bug (perhaps because of the nested select type statements). I'll test it with ifort tomorrow.

jacobwilliams commented 8 years ago

Confirmed. It is a simple fix though. Stand by.