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

Build with gfortran 9.3 #24

Open
mdpiper opened this issue Oct 9, 2020 · 10 comments
Open

Build with gfortran 9.3 #24

mdpiper opened this issue Oct 9, 2020 · 10 comments

Comments

@mdpiper
Copy link

mdpiper commented Oct 9, 2020

With gfortran 9.3, building coretran fails on Linux and macOS.

Here's a sample traceback on macOS:

[ 50%] Building Fortran object CMakeFiles/coretran.dir/sorting/m_select.f90.o
[ 51%] Building Fortran object CMakeFiles/coretran.dir/maths/m_maths.f90.o
[ 52%] Building Fortran object CMakeFiles/coretran.dir/maths/sm_maths_d1D.f90.o
[ 54%] Building Fortran object CMakeFiles/coretran.dir/maths/sm_maths_i1D.f90.o
/Users/mpiper/projects/coretran/src/maths/sm_maths_i1D.f90:1:18:

    1 | submodule (m_maths) sm_maths_i1D
      |                  1
......
    4 | use m_allocate, only: allocate
      |                              2
Error: Symbol ‘allocate’ at (1) conflicts with the symbol at (2)
/Users/mpiper/projects/coretran/src/maths/sm_maths_i1D.f90:1:18:

    1 | submodule (m_maths) sm_maths_i1D
      |                  1
......
    5 | use m_deallocate, only: deallocate
      |                                  2
Error: Symbol ‘deallocate’ at (1) conflicts with the symbol at (2)
/Users/mpiper/projects/coretran/src/maths/sm_maths_i1D.f90:1:18:

    1 | submodule (m_maths) sm_maths_i1D
      |                  1
......
    6 | use m_errors, only:eMsg
      |                       2
Error: Symbol ‘emsg’ at (1) conflicts with the symbol at (2)
/Users/mpiper/projects/coretran/src/maths/sm_maths_i1D.f90:1:18:

    1 | submodule (m_maths) sm_maths_i1D
      |                  1
......
    7 | use m_sort, only: argsort
      |                         2
Error: Symbol ‘argsort’ at (1) conflicts with the symbol at (2)
/Users/mpiper/projects/coretran/src/maths/sm_maths_i1D.f90:1:18:

    1 | submodule (m_maths) sm_maths_i1D
      |                  1
......
    8 | use m_select, only: argSelect
      |                             2
Error: Symbol ‘argselect’ at (1) conflicts with the symbol at (2)
/Users/mpiper/projects/coretran/src/maths/sm_maths_i1D.f90:1:18:

    1 | submodule (m_maths) sm_maths_i1D
      |                  1
......
    9 | use m_array1D, only: arange
      |                           2
Error: Symbol ‘arange’ at (1) conflicts with the symbol at (2)
@mdpiper
Copy link
Author

mdpiper commented Oct 9, 2020

I'm kinda booked up right now, so I haven't put any time into looking for a solution. I can try in the next few weeks, though.

For more info, see conda-forge/coretran-feedstock#1.

@leonfoks
Copy link
Owner

leonfoks commented Oct 9, 2020

Okay thanks for the heads up, I’ll take a look at 9.3 and see what I can do

@leonfoks
Copy link
Owner

leonfoks commented Feb 8, 2021

I just compiled successfully on my Mac using gfortran 10. However I have cmake handle the flags etc. required on my Mac.
Any chance you aren't using the same options at compile time?

e.g. these are the flags for me.

-Wl,-rpath,PATH-TO/coretran/lib PATH-TO/coretran/lib/libcoretran.dylib -std=f2008ts -cpp -ffree-line-length-none -fall-intrinsics -fno-underscoring -DNDEBUG -O3 -funroll-all-loops -finline-functions

@leonfoks
Copy link
Owner

leonfoks commented Feb 8, 2021

Actually I just ran into this....

Its because I re-import the deallocate and allocate functions.... So i just need to remove those from the submodules. Looks like gfortran 9+ has this limitation which is nice.

@mdpiper
Copy link
Author

mdpiper commented Feb 10, 2021

Cool--thank you for looking into this, Leon.

If you do make these changes, would you consider incrementing the version on coretran (e.g., to 1.0.1)? The conda-forge bot will pick up on the new version and attempt to rebuild the package.

@leonfoks
Copy link
Owner

No problem. I made the changes already and I’ll update the version number as soon as I can!

@leonfoks
Copy link
Owner

Also! Once this is working again, could you please add some info to the readme about installation via conda? I have no idea whose really using coretran but it would be great if users had that flexibility!!

@mdpiper
Copy link
Author

mdpiper commented Feb 10, 2021

Absolutely! I'd be happy to do so. I'll send you a PR.

@leonfoks
Copy link
Owner

Okay, new release done, 1.0.1!

@mdpiper
Copy link
Author

mdpiper commented Feb 12, 2021

Excellent! Thank you for doing this, Leon. The conda-forge bot successfully rebuilt coretran with gfortran 7 and 9.

(I still owe you a few sentences on installing coretran through conda.)

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