coretran
coretran copied to clipboard
Build with gfortran 9.3
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)
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 https://github.com/conda-forge/coretran-feedstock/pull/1.
Okay thanks for the heads up, I’ll take a look at 9.3 and see what I can do
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
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.
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.
No problem. I made the changes already and I’ll update the version number as soon as I can!
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!!
Absolutely! I'd be happy to do so. I'll send you a PR.
Okay, new release done, 1.0.1!
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.)