Calling fortran subroutine from my deal.II code

66 views
Skip to first unread message

Praveen C

unread,
Jun 3, 2017, 4:15:09 PM6/3/17
to Deal. II Googlegroup
Dear all

I have made changes to CMakeLists.txt

set (CMAKE_Fortran_COMPILER "gfortran")
set (CMAKE_Fortran_FLAGS_RELEASE "-O2 -m64")
set (CMAKE_Fortran_FLAGS_DEBUG   "-O0 -g -m64”)

SET(TARGET_SRC
  ${TARGET}.cc
  kronrod.f90
  )

PROJECT(${TARGET} CXX Fortran)

When I compile, I get this error

$ make
[ 33%] Building Fortran object CMakeFiles/main.dir/kronrod.f90.o
gfortran: error: unrecognized command line option '-Qunused-arguments'; did you mean '-Wunused-argument'?
make[2]: *** [CMakeFiles/main.dir/kronrod.f90.o] Error 1
make[1]: *** [CMakeFiles/main.dir/all] Error 2
make: *** [all] Error 2

This seems related to clang. How can I fix this ? I see this flag here

CMakeFiles/main.dir/flags.make:Fortran_FLAGS = -O3 -g   -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks  -pedantic -fPIC -Wall -Wextra -Wpointer-arith -Wwrite-strings -Wsynth -Wsign-compare -Wswitch -Woverloaded-virtual  -Qunused-arguments -Wno-unsupported-friend -Wno-unused-parameter -Wno-unused-variable -Wno-undefined-var-template -openmp-simd -std=c++1z -std=c++1z -ftemplate-depth=1024 -Wno-unused-local-typedefs -O0 -ggdb -Wa,--compress-debug-sections

Thanks
praveen

Jean-Paul Pelteret

unread,
Aug 21, 2017, 10:42:44 AM8/21/17
to deal.II User Group
Hi Praveen,

I know its been a long time since you posted this question, but it caught my eye again recently. Matthias has posted an explanation on GitHub as to how to work around if you're using an older version of deal.II, or why its no longer an issue with the current development version.

Regards,
Jean-Paul

Praveen C

unread,
Aug 28, 2017, 6:27:27 AM8/28/17
to Deal.II Googlegroup
Thanks a lot. I will need this in the near future and may save me some effort from converting fortran to c++.

Best
praveen

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages