configure.ac 17.3 KB
Newer Older
1
AC_PREREQ([2.61])
Ron Rahaman's avatar
Ron Rahaman committed
2
AC_INIT([Nek5000], [16.0.0], [nek5000-users@lists.mcs.anl.gov])
3
#AM_INIT_AUTOMAKE
4
5
6
#LT_PREREQ([2.2])
#LT_INIT([dlopen])

7
8
#AC_CONFIG_SRCDIR([Nek5000/core/drive1.f])
#AC_CONFIG_HEADERS([config.h])
9

10
###############################################################################
11
# COMMAND-LINE OPTS
12
13
###############################################################################

Ron Rahaman's avatar
Ron Rahaman committed
14
15
AC_ARG_VAR([CASENAME], [the Nek5000 case name (i.e., the name of the .usr and .rea files)])

16
AC_ARG_ENABLE([debug],
17
              [AC_HELP_STRING([--disable-debug], [compile without debug flags (-g) @<:@default: enabled@:>@])],
18
19
20
              [debug="$enableval"], [debug="yes"])

AC_ARG_ENABLE([opt],
21
              [AC_HELP_STRING([--enable-opt], [compile with optimization flags (-O3) @<:@default: disabled@:>@])],
22
23
              [opt="$enableval"], [opt="no"])

24
25
26
AC_ARG_ENABLE([mpi],
              [AS_HELP_STRING([--disable-mpi], [compile without mpi @<:@default: enabled@:>@])],
              [mpi=${enableval}], [mpi=yes])
27

28
29
30
31
32
33
34
35
AC_ARG_ENABLE([amg],
              [AS_HELP_STRING([--enable-amg], [compile without AMG coarse-grid solver @<:@default: disabled@:>@])],
              [amg=${enableval}], [amg=no])

AC_ARG_ENABLE([amg-dump],
              [AS_HELP_STRING([--enable-amg-dump], [if using AMG, dump setup @<:@default: disabled@:>@])],
              [amg_dump=${enableval}], [amg_dump=no])

36
37
38
AC_ARG_ENABLE([cmt],
              [AS_HELP_STRING([--enable-cmt], [compile with compressible multiphase turbulence support @<:@default: disabled@:>@])],
              [cmt=${enableval}], [cmt=no])
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67

AC_ARG_ENABLE([timer],
              [AS_HELP_STRING([--disable-timer], [disable runtime statistics @<:@default: enabled@:>@])],
              [timer=${enableval}], [timer=yes])

AC_ARG_ENABLE([mpi-timer],
              [AS_HELP_STRING([--enable-mpi-timer], [enable MPI runtime statistics @<:@default: disabled@:>@])],
              [mpi_timer=${enableval}], [mpi_timer=no])

AC_ARG_ENABLE([mpi-io],
              [AS_HELP_STRING([--enable-mpi-io], [use MPI-IO I/O kernel @<:@default: disabled@:>@])],
              [mpi_io=${enableval}], [mpi_io=no])

AC_ARG_ENABLE([bgq],
              [AS_HELP_STRING([--enable-bgq], [enable Blue Gene optimizations (BG/Q) @<:@default: disabled@:>@])],
              [bgq=${enableval}], [bgq=no])

AC_ARG_ENABLE([cvode],
              [AS_HELP_STRING([--enable-cvode], [use ODE solver from Sundials to solve for IFIELD>1 @<:@default: disabled@:>@])],
              [cvode=${enableval}], [cvode=no])

AC_ARG_ENABLE([moab],
              [AS_HELP_STRING([--enable-moab], [enable MOAB/CUBIT support @<:@default: disabled@:>@])],
              [moab=${enableval}], [moab=no])

AC_ARG_ENABLE([neknek],
              [AS_HELP_STRING([--enable-neknek], [enable multidomain support @<:@default: disabled@:>@])],
              [neknek=${enableval}], [neknek=no])

Ron Rahaman's avatar
Ron Rahaman committed
68
69
70
71
72
73
74
AC_ARG_ENABLE([nek-lapack],
              [AS_HELP_STRING([--disable-nek-lapack], [disable Nek-supplied LAPACK routines @<:@default: enabled@:>@])],
              [nek_lapack=${enableval}], [nek_lapack=yes])

AC_ARG_ENABLE([nek-blas],
              [AS_HELP_STRING([--disable-nek-blas], [disable Nek-supplied BLAS routines @<:@default: enabled@:>@])],
              [nek_blas=${enableval}], [nek_blas=yes])
75

Ron Rahaman's avatar
Ron Rahaman committed
76
77
78
AC_ARG_ENABLE([xsmm],
              [AS_HELP_STRING([--enable-xsmm], [use libxsmm for mxm @<:@default: disabled@:>@])],
              [xsmm=${enableval}], [xsmm=no])
79
80
81
82
83

AC_ARG_ENABLE([extbar],
              [AS_HELP_STRING([--enable-extbar], [adds underscore to exit call(for BGQ) @<:@default: disabled@:>@])],
              [extbar=${enableval}], [extbar=no])

84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
AC_ARG_ENABLE([libmesh],
              [AS_HELP_STRING([--enable-libmesh], [configure with compilers and flags from an existing libmesh installation @<:@default: enabled@:>@])],
              [libmesh=${enableval}], [libmesh=yes])

AC_ARG_VAR([MOOSE_DIR],   [directory of moose installation @<:@default: moon/moose/@:>@])
AC_ARG_VAR([LIBMESH_DIR], [directory of libmesh installation @<:@default: \$MOOSE_DIR/libmesh/installed/@:>@])

###############################################################################
# GET COMPILERS AND FLAGS FROM LIBMESH
###############################################################################

# Default values for $MOOSE_DIR and $LIBMESH_DIR
: "${MOOSE_DIR=$srcdir/moose}"
: "${LIBMESH_DIR=$MOOSE_DIR/libmesh/installed}"

# If libmesh is enabled, get compilers and flags from libmesh-config
# Adapted from moose/framework/build.mk
if test "x$libmesh" = "xyes"; then
  # First, see if installed libmesh-config exists
  libmesh_config="$LIBMESH_DIR/bin/libmesh-config" 
  AC_MSG_CHECKING([if $libmesh_config exists])
  if test -x $libmesh_config; then
    AC_MSG_RESULT([yes])
  else
    AC_MSG_RESULT([no])
    # If not, see if uninstalled libmesh-config exists
    libmesh_config="$LIBMESH_DIR/contrib/bin/libmesh-config"
    AC_MSG_CHECKING([if $libmesh_config exists])
    if test -x $libmesh_config; then
      AC_MSG_RESULT([yes])
    else
      AC_MSG_RESULT([no])
      AC_MSG_ERROR([could not find libmesh-config script. Ensure that LIBMESH_DIR and/or MOOSE_DIR are correctly set.])
    fi
  fi

  AC_MSG_NOTICE([getting compilers and flags from $libmesh_config])
  CC="$($libmesh_config --cc)"
  CFLAGS="$($libmesh_config --cflags) $CFLAGS"
  CPPFLAGS="$($libmesh_config --cppflags) $CPPFLAGS"
  LDFLAGS="$($libmesh_config --ldflags) $LDFLAGS"
  LIBS="$($libmesh_config --libs) $LIBS"

  F77="$($libmesh_config --fc)"
  FFLAGS="$($libmesh_config --fflags) $FFLAGS"
fi
Ron Rahaman's avatar
Ron Rahaman committed
130

131
132
133
134
135
###############################################################################
# BUILT-IN CHECKS
###############################################################################

# C compiler checks
136
137
138
: ${CFLAGS=""}              # Do not use autconf's default "-g -O2"
AC_PROG_CC                  # Validate C Compiler
AC_PROG_CC_C_O              # Necessary for automake
139
140
141
AC_CHECK_SIZEOF([int *])    # Get sizeof int*, set SIZEOF_INT_P. If SIZEOF_INT_P == 8, then Nek needs -DPTRSIZE8
AC_CHECK_SIZEOF([long int]) # Get sizeof long int, set SIZEOF_LONG_INT

142
143
144
# Fortran compiler checks
: ${FFLAGS="$FFLAGS"}   # Do not use autconf's default "-g -O2"
: ${FCFLAGS="$FCFLAGS"} # Do not use autconf's default "-g -O2"
145
146
147
148
149
150
AC_PROG_F77             # Validate F77 compiler
AC_PROG_F77_C_O         # Necessary for automake
AC_F77_LIBRARY_LDFLAGS  # Determine -l and -L flags, append to $FLIBS
AC_F77_WRAPPERS         # Discover how to call F77 funcs from C, set F77_FUNC macro.  If underscore, then Nek needs -DUNDERSCORE

# Discover flags for Fortran preprocessing
151
152
153
154
fc_old="$F77"; FC="$F77"
AC_FC_PP_SRCEXT([f])  # Discover what flags are needed to preprocess .f files, define FCFLAGS_f
AC_FC_PP_DEFINE       # Discover the flag (eg, -D, -Df) is used to define PP symbols, define FC_DEFINE
FC="$fc_old"
155
156
157
158
159
160

###############################################################################
# FIND F77 FLAG FOR DEFAULT 8-BYTE FLOATS
###############################################################################

AC_LANG_PUSH([Fortran 77])
161
162
fflags_old="$FFLAGS"
nek_real8_flags=""
163
164
165
166
167
168
169
170
171
172
173
for flag in                             dnl
  "-r8 -fpconstant"                     dnl Intel
  "-r8"                                 dnl PGI, some others
  "-fdefault-real-8 -fdefault-double-8" dnl GNU
  "-qrealsize=8 -qdpc=e"                dnl IBM
  "-s default64";                       dnl Cray
do
  FFLAGS="$flag"
  AC_MSG_CHECKING([if Fortran 77 compiler accepts $flag])
  AC_COMPILE_IFELSE( 
    AC_LANG_PROGRAM(, [[      real foo]],),
174
    AC_MSG_RESULT([yes]) && nek_real8_flags="$flag" && break,
175
176
177
178
    AC_MSG_RESULT([no])
  )
done
AC_LANG_POP([Fortran 77])
179
FFLAGS="$fflags_old"
Ron Rahaman's avatar
Ron Rahaman committed
180

181
if test "x$nek_real8_flags" = "x"; then
Ron Rahaman's avatar
Ron Rahaman committed
182
183
  AC_MSG_FAILURE([could not determine Fortran flag for 8-byte floats])
fi
184

185
186
AC_SUBST([nek_real8_flags])

187
188
189
190
###############################################################################
# SET NEK's PREPROCESSOR MACROS
###############################################################################

191
192
# Enable debug flags
if test "x$debug" = "xyes"; then
193
  nek_debug_flags="-g"
194
fi
195
AC_SUBST([nek_debug_flags])
196
197

# Enable optimization flags
198
if test "x$opt" = "xyes" || test "x$bgq" = "xyes"; then
199
  nek_opt_flags="-O3"
200
else
201
  nek_opt_flags="-O2"
202
fi
203
AC_SUBST([nek_opt_flags])
204

205
206
207
208
209
# Check if pointer size == 8
if test "$ac_cv_sizeof_int_p" -eq 8; then
  AC_DEFINE([PTRSIZE8], 1, [If sizeof *int is 8])
fi

210
# See if 'underscore' is in mangling scheme.  
211
if echo "$ac_cv_f77_mangling"| tr -d @<:@:blank:@:>@ | grep '\<underscore\>' > /dev/null ; then 
212
213
214
  AC_DEFINE([UNDERSCORE], 1, [If Fortran name-mangling scheme adds an underscore])
fi

215
# See if MPI is enabled
Ron Rahaman's avatar
Ron Rahaman committed
216
if test "x$mpi" = "xyes"; then
217
  AC_DEFINE([MPI], 1, [If MPI is enabled])
Ron Rahaman's avatar
Ron Rahaman committed
218
  nek_mpi_obj="byte_mpi.o comm_mpi.o"
219
else
Ron Rahaman's avatar
Ron Rahaman committed
220
  nek_mpi_obj="byte_mpi.o comm_mpi.o mpi_dummy.o"
221
fi
222
AC_SUBST([nek_mpi], [$mpi])
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
AC_SUBST([nek_mpi_obj])

# Always define jl_prefix
AC_SUBST([jl_prefix], [jl_])
AC_DEFINE([PREFIX], [jl_], [prefix for JL subroutines])

# See if AMG is enabled
if test "x$amg" = "xyes"; then
  jl_cgs_obj="amg.o fcrs.o"
else
  jl_cgs_obj="sparse_cholesky.o xxt.o fcrs.o"
fi
AC_SUBST([jl_cgs_obj])

# See if AMG_DUMP is enabled
if test "x$amg_dump" = "xyes"; then
  AC_DEFINE([AMG_DUMP], 1, [if AMG dump is enabled])
240
241
242
fi

# See if CMT is enabled
Ron Rahaman's avatar
Ron Rahaman committed
243
if test "x$cmt" = "xyes"; then
244
  AC_DEFINE([CMT], 1, [If CMT is enabled])
245
246
247
  nek_cmt_obj="drive1_cmt.o drive2_cmt.o driver3_cmt.o face.o ausm.o  MixtPerf.o intpdiff.o diffusive_cmt.o eqnsolver_cmt.o surface_fluxes.o bc.o inflow_bc.o outflow_bc.o wall_bc.o step.o filters_cmt.o diagnostics.o"
else
  nek_cmt_obj="cmt_dummy.o"
248
fi
249
AC_SUBST([nek_cmt_obj])
250

Ron Rahaman's avatar
Ron Rahaman committed
251
# Check if sizeof long int == 8
252
253
254
255
256
if test "$ac_cv_sizeof_long_int" -eq 8; then
  AC_DEFINE([LONGINT8], 1, [If sizeof long int is 8])
fi

# See if timer is enabled
Ron Rahaman's avatar
Ron Rahaman committed
257
if test "x$timer" = "xno"; then
258
259
260
261
262
263
  AC_DEFINE([NOTIMER], 1, [If timer is disabled])
fi

# Always set GLOBAL_LONG_LONG
AC_DEFINE([GLOBAL_LONG_LONG], 1, [Use global long long])

Ron Rahaman's avatar
Ron Rahaman committed
264
265
266
267
268
# TODO: Set defs for MOAB

# See if neknek is enabled
if test "x$neknek" = "xyes"; then
  AC_DEFINE([NEKNEK], 1, [if neknek is enabled])
269
270
271
  nek_neknek_obj="multimesh.o"
else
  nek_neknek_obj="singlmesh.o"
Ron Rahaman's avatar
Ron Rahaman committed
272
fi
273
AC_SUBST([nek_neknek_obj])
Ron Rahaman's avatar
Ron Rahaman committed
274
275
276
277
278
279
280

# TODO: Set defs for CVODE

# TODO: Set defs for AMG_DUMP

# TODO: Set defs for BLAS_MXM

281
# == BLAS and MXM handling =====================================================
282
283
284
285
286
287
# TODO: 
#   * Set -O3 flag if $bgq = yes
#   * Consistency check between options
#   * If automake, AM_CONDITIONAL([BGQ], [test "x$bgq" = "xyes"]), etc.
if test "x$bgq" = "xyes"; then 
  AC_DEFINE([BGQ], 1, [if using IBM BG/Q optimizations])
288
  nek_blas_obj=""
289
290
291
292
  nek_mxm_obj="mxm_std.o mxm_bgq.o"
else
  if test "x$xsmm" = "xyes"; then 
    AC_DEFINE([XSMM], 1, [if using libxsmm for mxm])
293
294
    nek_blas_obj="blas.o"
    nek_mxm_obj="mxm_std.o"
295
  else
296
297
298
299
    if test "x$nek_blas" = "xyes"; then 
      nek_blas_obj="blas.o"
      nek_mxm_obj="mxm_std.o"
    else
300
      AC_DEFINE([BLAS_MXM], 1, [if not using Nek5000 BLAS mxm routines])
301
      nek_blas_obj=""
302
303
304
305
      nek_mxm_obj="mxm_std.o"
    fi
  fi
fi 
306
AC_SUBST([nek_blas_obj])
307
308
309
310
311
AC_SUBST([nek_mxm_obj])

# == LAPACK handling ==========================================================
# TODO: 
#   * if automake, AM_CONDITIONAL([NO_LAPACK], [test "x$nek_lapack" = "xno"])
312
313
314
if test "x$nek_lapack" = "xyes"; then
  nek_lapack_obj="dsygv.o ssygv.o"
else
Ron Rahaman's avatar
Ron Rahaman committed
315
  AC_DEFINE([NO_LAPACK], 1, [if not using Nek5000 LAPACK routines])
316
  nek_lapack_obj=""
Ron Rahaman's avatar
Ron Rahaman committed
317
fi
318
AC_SUBST([nek_lapack_obj])
319

320
321
322
###############################################################################
# SIZE FILE HANDLING
###############################################################################
Ron Rahaman's avatar
Ron Rahaman committed
323

324
AC_CHECK_FILE([SIZE], , AC_MSG_ERROR([could not find SIZE file in current directory]))
Ron Rahaman's avatar
Ron Rahaman committed
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
AC_MSG_NOTICE([tweaking SIZE file])

# == General subroutines ======================================================
cat SIZE | grep -i 'lxo' >/dev/null
if test $? -ne 0; then
   echo >>SIZE
   echo 'c automatically added by makenek' >>SIZE
   echo '      parameter(lxo   = lx1) ! max output grid size (lxo>=lx1)' >>SIZE
fi
cat SIZE | grep -i 'lpart' >/dev/null
if test $? -ne 0; then
   echo >>SIZE
   echo 'c automatically added by makenek' >>SIZE
   echo '      parameter(lpart = 1  ) ! max number of particles/proc' >>SIZE
fi
cat SIZE | grep -i 'ax1' >/dev/null
if test $? -ne 0; then
   echo >>SIZE
   echo 'c automatically added by makenek' >>SIZE
   echo '      integer ax1,ay1,az1,ax2,ay2,az2' >> SIZE
   echo '      parameter (ax1=lx1,ay1=ly1,az1=lz1,ax2=lx2,ay2=ly2,az2=lz2) ! running averages' >> SIZE
fi
cat SIZE | grep -i 'lys=lxs' >/dev/null
if test $? -ne 0; then
   cat SIZE | grep -iv lxs > SIZE.x; mv SIZE.x SIZE  # Clean existing SIZE file of old version
   echo >>SIZE
   echo 'c automatically added by makenek' >>SIZE
   echo '      parameter (lxs=1,lys=lxs,lzs=(lxs-1)*(ldim-2)+1) !New Pressure Preconditioner' >> SIZE

fi
cat SIZE | grep -i 'lfdm' >/dev/null
if test $? -ne 0; then
   echo >>SIZE
   echo 'c automatically added by makenek' >>SIZE
   echo '      parameter (lfdm=0)  ! == 1 for fast diagonalization method' >> SIZE
fi
cat SIZE | grep -i 'nio' >/dev/null
if test $? -ne 0; then
   echo >>SIZE
   echo 'c automatically added by makenek' >>SIZE
   echo '      common/IOFLAG/nio  ! for logfile verbosity control' >> SIZE
fi

# == CVODE subroutines ========================================================
if test "x$cvode" = "xyes"; then
  cat SIZE | grep -i 'cv_maxl' >/dev/null
  if test $? -ne 0; then
      echo >>SIZE
      echo 'c automatically added by makenek' >>SIZE
      echo '      integer cv_maxl' >> SIZE
      echo '      parameter(cv_maxl = 20  ) ! Size of Krylov Space'  >>SIZE
  fi
  cat SIZE | grep -i 'cv_delt' >/dev/null
  if test $? -ne 0; then
      echo >>SIZE
      echo 'c automatically added by makenek' >>SIZE
      echo '      real cv_delt' >> SIZE
      echo '      parameter(cv_delt = 0.1 ) ! linear convergence factor ' >>SIZE
  fi
  cat SIZE | grep -i 'cv_sigs' >/dev/null
  if test $? -ne 0; then
      echo >>SIZE
      echo 'c automatically added by makenek' >>SIZE
      echo '      real cv_sigs' >> SIZE
      echo '      parameter(cv_sigs = 0.01) ! Jacobian DQ perturbation scaling factor'  >>SIZE
  fi
fi

# == CMT subroutines ==========================================================
cat SIZE | grep -i 'toteq' >/dev/null
if test $? -ne 0; then
  if test "x$cmt" = "xyes"; then
      echo >>SIZE
      echo 'c automatically added by makenek' >>SIZE
      echo '      integer toteq' >> SIZE
      echo '      parameter(toteq = 5  ) ! Number of conserved variables '  >>SIZE
      echo 'c IFCMT=TRUE  then toteq=5'  >>SIZE
  else
      echo >>SIZE
      echo 'c automatically added by makenek' >>SIZE
      echo '      integer toteq' >> SIZE
      echo '      parameter(toteq = 1  ) ! Number of conserved variables '  >>SIZE
      echo 'c IFCMT=FALSE  then toteq=1'  >>SIZE
  fi
fi
cat SIZE | grep -i 'lelcmt' >/dev/null
if test $? -ne 0; then
  if test "x$cmt" = "xyes"; then
      echo >>SIZE
      echo 'c automatically added by makenek' >>SIZE
      echo '      integer lelcmt' >> SIZE
      echo '      parameter(lelcmt = lelt  ) ! # of cmt elements '  >>SIZE
      echo 'c IFCMT=TRUE  then lelcmt=lelt'  >>SIZE
  else
      echo >>SIZE
      echo 'c automatically added by makenek' >>SIZE
      echo '      integer lelcmt' >> SIZE
      echo '      parameter(lelcmt = 1  ) ! # of cmt elements '  >>SIZE
      echo 'c IFCMT=FALSE  then lelcmt=1'  >>SIZE
  fi
fi

Ron Rahaman's avatar
Ron Rahaman committed
427
428
429
430
###############################################################################
# TWEAK .usr file
###############################################################################

Ron Rahaman's avatar
Ron Rahaman committed
431
AC_CHECK_FILE([$CASENAME.usr], , AC_MSG_ERROR([could not find $CASENAME.usr in current directory. Ensure that CASENAME is correctly set.]))
Ron Rahaman's avatar
Ron Rahaman committed
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
AC_MSG_NOTICE([tweaking $CASENAME.usr])

rm -f $CASENAME.f
cp -p $CASENAME.usr $CASENAME.f

cat $CASENAME.f | grep -i "subroutine.*usrsetvert" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
      subroutine usrsetvert(glo_num,nel,nx,ny,nz) ! to modify glo_num
      integer*8 glo_num(1)
      return
      end
_ACEOF
fi

if test "x$cmt" = "xyes"; then
cat $CASENAME.f | grep -i "subroutine.*cmt_switch" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
      subroutine cmt_switch ! to set IFCMT logical flag
      include 'SIZE'
      include 'INPUT'
      IFCMT=.true.
      return
      end
_ACEOF
fi
fi

cat $CASENAME.f | grep -i "subroutine.*usrflt" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
      subroutine usrflt(rmult) ! user defined filter
      include 'SIZE'
      real rmult(lx1)
      call rone(rmult,lx1)
      return
      end
_ACEOF
fi

cat $CASENAME.f | grep -i "subroutine.*userflux" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
      subroutine userflux ! user defined flux
      include 'SIZE'
      include 'TOTAL'
      include 'NEKUSE'
      real fluxout(lx1*lz1)
      return
      end
_ACEOF
fi

cat $CASENAME.f | grep -i "subroutine.*userEOS" >/dev/null
if test $? -ne 0; then
cat >> $CASENAME.f << _ACEOF
c
c automatically added by makenek
      subroutine userEOS ! user defined EOS 
      include 'SIZE'
      include 'TOTAL'
      include 'NEKUSE'

      return
      end
_ACEOF
fi

Ron Rahaman's avatar
Ron Rahaman committed
509
510
511
###############################################################################
# ALL DONE!
###############################################################################
512

Ron Rahaman's avatar
Ron Rahaman committed
513
AC_CONFIG_FILES([Makefile.nek:Makefile.nek.in])
514

515
AC_OUTPUT