Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compile failed on GNU Fortran (GCC) 7.3.1 (Red Hat 7.3.1-5) #20

Closed
rmcd-mscb opened this issue Oct 16, 2018 · 3 comments
Closed

compile failed on GNU Fortran (GCC) 7.3.1 (Red Hat 7.3.1-5) #20

rmcd-mscb opened this issue Oct 16, 2018 · 3 comments

Comments

@rmcd-mscb
Copy link

Compile failed as follows:

rmcd@localhost build]$ make
[ 1%] Building Fortran object CMakeFiles/coretran.dir/core/m_variableKind.f90.o
[ 2%] Building Fortran object CMakeFiles/coretran.dir/core/m_errors.f90.o
[ 4%] Building Fortran object CMakeFiles/coretran.dir/core/m_unitTester.f90.o
[ 5%] Building Fortran object CMakeFiles/coretran.dir/core/m_allocate.f90.o
/home/rmcd/git/coretran/src/core/m_allocate.f90:44.4:

module subroutine allocate_r1D(this, n)
1

Error: Unclassifiable statement at (1)
/home/rmcd/git/coretran/src/core/m_allocate.f90:47.11:

  real(r32), allocatable, intent(inout) :: this(:) 
       1

Error: Parameter 'r32' at (1) has not been declared or is a variable, which does not reduce to a constant expression
/home/rmcd/git/coretran/src/core/m_allocate.f90:49.14:

  integer(i32), intent(in) :: n 
          1

Error: Parameter 'i32' at (1) has not been declared or is a variable, which does not reduce to a constant expression
/home/rmcd/git/coretran/src/core/m_allocate.f90:51.7:

end subroutine
   1

Error: Expecting END INTERFACE statement at (1)

@rmcd-mscb
Copy link
Author

configured with:
cmake -DCMAKE_BUILD_TYPE=DEBUG --DCMAKE_INTALL_PREFIX=/usr/local -G"Unix Makefiles" ../src

@rmcd-mscb rmcd-mscb reopened this Oct 16, 2018
@rmcd-mscb
Copy link
Author

cmake was using an unexpected version of gfortran. I used the -DCMAKE_Fortran_COMPILER option with success.

@leonfoks
Copy link
Owner

Thanks for the issue, I've updated the docs to explain why this option is important.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants