I'm trying to compile and install the latest version of the DSSAT Cropping System Model on macOS Mojave (10.14.6) using cmake and Absoft18.0 f90, but seem to have run into a problem with compiling one f90 file.
cmake seems to successfully generate a makefile:
-- The Fortran compiler identification is Absoft
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Check for working Fortran compiler: /Applications/Absoft18.0/bin/f90 - skipped
-- Checking whether /Applications/Absoft18.0/bin/f90 supports Fortran 90
-- Checking whether /Applications/Absoft18.0/bin/f90 supports Fortran 90 - yes
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
fatal: not a git repository (or any of the parent directories): .git
-- MAJOR: 4 MINOR: 7 MODEL: 5 BUILD: 42 COMMIT:
-- BRANCH:
-- COMMIT:
-- Flags
FFLAGS -openmp -w -m64 -YMOD_ONLY -p/opt/imsl/fnl700/macab115e64/include -cpp
RELEASE -O3 -DNDEBUG -O3 -unroll
DEBUG -g -O0
LINKER
-- Build Info
BUILD TYPE DEBUG
VERSION 4.7.5.42
I. PREFIX /usr/local
Executable dscsm047
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/smauget1/DSSAT47/build
The resulting makefile successfully compiles 9 object files.....
[ 0%] Building Fortran object CMakeFiles/dscsm047.dir/Utilities/CSMVersion.for.o
[ 0%] Building Fortran object CMakeFiles/dscsm047.dir/Utilities/OSDefsLINUX.for.o
[ 0%] Building Fortran object CMakeFiles/dscsm047.dir/Utilities/ModuleDefs.for.o
[ 0%] Building Fortran object CMakeFiles/dscsm047.dir/InputModule/OPHEAD.for.o
[ 0%] Building Fortran object CMakeFiles/dscsm047.dir/Management/FertType_mod.for.o
[ 0%] Building Fortran object CMakeFiles/dscsm047.dir/Plant/ALOHA-Pineapple/Aloha_mod.f90.o
[ 1%] Building Fortran object CMakeFiles/dscsm047.dir/Plant/CANEGRO-Sugarcane/SC_CNG_mods.for.o
[ 1%] Building Fortran object CMakeFiles/dscsm047.dir/Plant/CERES-SharedFiles/SLigCeres.for.o
[ 1%] Building Fortran object CMakeFiles/dscsm047.dir/Plant/CSYCA-Cassava/YCA_Albedo_Check_m.f90.o
But reports an error on line 50 of the 10th file...
Absoft ERROR 25: YCA_CONTROL_ENVIRONMENT: /Users/smauget1/DSSAT47/Plant/CSYCA-Cassava/YCA_Control_Environment.f90: 50, 5
This statement is not allowed in a derived type definition.
Line 50 in YCA_Control_Environment.f90 (attached) is a contains statement. The compiler then continues to report additional errors and maxes out at 100 reports. The f90 syntax in YCA_Control_Environment.f90 (interfaces, contains etc.) is a little advanced for me, so I can't tell whether a) the syntax in this file is wrong, or b) there is something missing in my FFLAGS that would allow me to compile this particular file.
Any ideas? Any help is appreciated.