[ET Trac] [Einstein Toolkit] #1111: Missing fortran compiler prevents CCTK_REAL8 from being defined.

Einstein Toolkit trac-noreply at einsteintoolkit.org
Tue Nov 6 23:19:21 CST 2012


#1111: Missing fortran compiler prevents CCTK_REAL8 from being defined.
----------------------+-----------------------------------------------------
  Reporter:  sbrandt  |       Owner:              
      Type:  defect   |      Status:  new         
  Priority:  major    |   Milestone:  ET_2012_11  
 Component:  Cactus   |     Version:  Cactus_4.0.0
Resolution:           |    Keywords:              
----------------------+-----------------------------------------------------

Comment (by knarf):

 It works if F77/F90 are set to 'none' or it is unset. So, this problem
 only appears if the user did specify something as fortran compiler but
 that doesn't work. Thus, I think it is warrented to downgrade this ticket;
 please revert if you disagree.

 However, the ticket itself should be left open because it is still an
 error.

 In the case above you see in the configure output quite some warnings
 about things going wrong:
 {{{
 Unknown Linux f90 compiler 'dfadf'.
 Please add appropriate information to
   /home/knarf/Cactus/lib/make/known-architectures/linux
 and send the updated file to CactusMaint
 We will try anyway ...
 }}}
 and
 {{{
 Determining number of fortran underscores...
 Compiling test file with sdfsa -fopenmp -g -fcray-pointer -m128bit-long-
 double ...
 Failed to compile fname_test.f
 Creating null fortran name conversion routine
 Compiling test file with dfadf -fopenmp -g -fcray-pointer -m128bit-long-
 double ...
 Failed to compile fname_test.f
 Creating null fortran common name conversion routine.
 Fortran compilation failed ...
 COMPILATION WILL FAIL WITH ANY FORTRAN SOURCE CODE
 }}}

 One part of the problem is close to line 1121 in lib/make/configure.in:
 {{{
 if test -n "$CCTK_REAL8" -a \( "x$F77" = 'xnone' -o \(
 "x$cctk_cv_have_fortran_real8" -a "x$cctk_cv_have_fortran_complex16" =
 'xyes' \) \); then
   AC_DEFINE_UNQUOTED(CCTK_REAL8, $CCTK_REAL8)
   AC_DEFINE(HAVE_CCTK_REAL8)
 fi
 }}}

 In short: only define CCTK_REAL8 is C did find it and if either fortran
 did as well or F77 is set to 'none'.

 Now the question is how to best handle this case. The user specified a
 non-working Fortran compiler (or used a standard option list but doesn't
 have the compiler installed). I suggest to let configure fail at the point
 of
 {{{
 COMPILATION WILL FAIL WITH ANY FORTRAN SOURCE CODE
 }}}
 with hints to either correct the F77/F90 entries in the optionlist or to
 either not set them or set them to 'none' of indeed no Fortran compiler is
 needed.

 The following patch implements the message, but the return value of that
 script isn't checked for, so a patch aborting configure at that stage
 would need to be either at another place or more invasive.

 {{{
 Index: configure.pl
 ===================================================================
 --- configure.pl        (revision 4902)
 +++ configure.pl        (working copy)
 @@ -35,6 +35,9 @@
  {
    print "Fortran compilation failed ...\n";
    print "COMPILATION WILL FAIL WITH ANY FORTRAN SOURCE CODE\n";
 +  print " ! Apparently a Fortran compiler was specified (F77/F90), but it
 does not \n".
 +        " ! seem to be working. Either make sure to specify a working
 Fortran compiler, \n".
 +        " ! do not set F77/F90, or set them to 'none'.\n\n";
  }

  sub test_fortran_name
 }}}

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1111#comment:3>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list