head	1.112;
access;
symbols
	release-2-12:1.110
	release-2-12-beta-1:1.110
	release-2-11:1.102
	release-2-11-beta-2:1.101
	release-2-11-beta-1:1.101
	release-2-10:1.97
	release-2-10-beta-2:1.97
	release-2-10-beta-1:1.96
	release-2-9:1.76
	release-2-9-beta-3:1.76
	release-2-9-beta-2:1.76
	release-2-9-beta-1:1.76
	release-2-8:1.72
	release-2-8-beta-3:1.72
	release-2-8-beta-2:1.72
	release-2-8-beta-1:1.70
	release-2-7:1.63
	release-2-7-beta-4:1.63
	release-2-7-beta-3:1.60
	release-2-7-beta-2:1.55
	release-2-7-beta-1:1.52
	release-2-6:1.42
	release-2-6-beta-2:1.42
	release-2-6-beta-1:1.41
	release-2-5:1.35
	release-2-5-beta-3:1.35
	release-2-5-beta-2:1.35
	release-2-5-beta-1:1.28
	release-2-4:1.28
	release-2-4-beta-2:1.28
	release-2-4-beta-1:1.27
	release-2-3:1.26
	release-2-3-beta-2:1.26
	release-2-3-beta-1:1.25
	release-2-2:1.18
	release-2-2-beta-3:1.18
	release-2-2-beta-2:1.18
	release-2-2-beta-1:1.16
	release-2-1:1.11
	release-2-1-beta-4:1.10
	release-2-1-beta-3:1.9
	release-2-1-beta-2:1.9
	release-2-1-beta-1:1.6
	release-2-0-pre-charm-syntax:1.6
	release-2-0:1.5
	release-2-0-beta-3:1.5
	release-2-0-beta-2:1.5
	release-alpha-1:1.1;
locks; strict;
comment	@# @;


1.112
date	2017.04.01.19.15.01;	author jim;	state Exp;
branches;
next	1.111;

1.111
date	2017.02.15.18.26.12;	author jim;	state Exp;
branches;
next	1.110;

1.110
date	2016.10.20.20.50.56;	author jim;	state Exp;
branches;
next	1.109;

1.109
date	2016.09.19.17.58.32;	author jim;	state Exp;
branches;
next	1.108;

1.108
date	2016.09.13.20.36.25;	author jim;	state Exp;
branches;
next	1.107;

1.107
date	2016.09.03.19.13.05;	author jim;	state Exp;
branches;
next	1.106;

1.106
date	2016.07.29.21.16.16;	author jim;	state Exp;
branches;
next	1.105;

1.105
date	2016.07.28.15.24.33;	author jim;	state Exp;
branches;
next	1.104;

1.104
date	2016.04.17.16.24.22;	author jim;	state Exp;
branches;
next	1.103;

1.103
date	2016.03.18.15.05.09;	author jim;	state Exp;
branches;
next	1.102;

1.102
date	2015.12.16.18.49.05;	author jim;	state Exp;
branches;
next	1.101;

1.101
date	2015.10.28.17.01.39;	author jim;	state Exp;
branches;
next	1.100;

1.100
date	2015.10.15.19.41.08;	author jim;	state Exp;
branches;
next	1.99;

1.99
date	2015.01.17.00.13.00;	author jim;	state Exp;
branches;
next	1.98;

1.98
date	2015.01.16.23.23.47;	author jim;	state Exp;
branches;
next	1.97;

1.97
date	2014.11.11.17.05.38;	author jim;	state Exp;
branches;
next	1.96;

1.96
date	2014.08.20.18.26.42;	author jim;	state Exp;
branches;
next	1.95;

1.95
date	2014.06.18.17.25.09;	author jim;	state Exp;
branches;
next	1.94;

1.94
date	2014.05.12.20.18.58;	author jim;	state Exp;
branches;
next	1.93;

1.93
date	2014.03.11.17.16.58;	author jim;	state Exp;
branches;
next	1.92;

1.92
date	2014.03.07.19.53.05;	author jim;	state Exp;
branches;
next	1.91;

1.91
date	2013.12.13.21.16.31;	author jim;	state Exp;
branches;
next	1.90;

1.90
date	2013.11.15.22.55.05;	author jim;	state Exp;
branches;
next	1.89;

1.89
date	2013.11.15.14.39.12;	author jim;	state Exp;
branches;
next	1.88;

1.88
date	2013.10.28.20.25.39;	author jim;	state Exp;
branches;
next	1.87;

1.87
date	2013.10.04.22.48.04;	author jim;	state Exp;
branches;
next	1.86;

1.86
date	2013.10.04.22.20.25;	author jim;	state Exp;
branches;
next	1.85;

1.85
date	2013.10.04.22.15.42;	author jim;	state Exp;
branches;
next	1.84;

1.84
date	2013.10.04.18.21.21;	author jim;	state Exp;
branches;
next	1.83;

1.83
date	2013.07.10.17.18.24;	author jim;	state Exp;
branches;
next	1.82;

1.82
date	2013.06.20.15.18.40;	author jim;	state Exp;
branches;
next	1.81;

1.81
date	2013.06.10.16.48.39;	author jim;	state Exp;
branches;
next	1.80;

1.80
date	2013.03.01.17.56.44;	author jim;	state Exp;
branches;
next	1.79;

1.79
date	2013.02.14.23.45.53;	author jim;	state Exp;
branches;
next	1.78;

1.78
date	2012.10.02.01.31.21;	author jim;	state Exp;
branches;
next	1.77;

1.77
date	2012.08.04.22.35.58;	author jim;	state Exp;
branches;
next	1.76;

1.76
date	2012.03.01.02.12.11;	author jim;	state Exp;
branches;
next	1.75;

1.75
date	2012.02.23.03.54.30;	author jim;	state Exp;
branches;
next	1.74;

1.74
date	2011.07.12.18.23.08;	author bohm;	state Exp;
branches;
next	1.73;

1.73
date	2011.06.17.21.55.09;	author jim;	state Exp;
branches;
next	1.72;

1.72
date	2011.05.10.16.09.00;	author jim;	state Exp;
branches;
next	1.71;

1.71
date	2011.05.08.19.29.33;	author jim;	state Exp;
branches;
next	1.70;

1.70
date	2011.02.27.22.32.10;	author jim;	state Exp;
branches;
next	1.69;

1.69
date	2011.02.20.04.22.09;	author jim;	state Exp;
branches;
next	1.68;

1.68
date	2011.02.19.23.30.59;	author jim;	state Exp;
branches;
next	1.67;

1.67
date	2011.02.19.22.48.05;	author jim;	state Exp;
branches;
next	1.66;

1.66
date	2011.02.19.22.41.25;	author jim;	state Exp;
branches;
next	1.65;

1.65
date	2011.02.19.17.16.23;	author jim;	state Exp;
branches;
next	1.64;

1.64
date	2011.02.15.21.40.14;	author jim;	state Exp;
branches;
next	1.63;

1.63
date	2010.09.09.15.19.04;	author jim;	state Exp;
branches;
next	1.62;

1.62
date	2010.09.09.15.05.57;	author jim;	state Exp;
branches;
next	1.61;

1.61
date	2010.08.19.19.26.56;	author jim;	state Exp;
branches;
next	1.60;

1.60
date	2010.07.02.20.53.53;	author jim;	state Exp;
branches;
next	1.59;

1.59
date	2010.07.01.18.57.32;	author jim;	state Exp;
branches;
next	1.58;

1.58
date	2010.01.12.21.35.05;	author jim;	state Exp;
branches;
next	1.57;

1.57
date	2010.01.12.20.04.50;	author jim;	state Exp;
branches;
next	1.56;

1.56
date	2009.11.17.21.11.11;	author jim;	state Exp;
branches;
next	1.55;

1.55
date	2009.11.12.22.51.36;	author jim;	state Exp;
branches;
next	1.54;

1.54
date	2009.11.11.20.11.52;	author jim;	state Exp;
branches;
next	1.53;

1.53
date	2009.05.13.16.10.43;	author jim;	state Exp;
branches;
next	1.52;

1.52
date	2009.03.13.15.40.27;	author jim;	state Exp;
branches;
next	1.51;

1.51
date	2009.03.12.21.54.20;	author jim;	state Exp;
branches;
next	1.50;

1.50
date	2009.03.07.22.39.30;	author jim;	state Exp;
branches;
next	1.49;

1.49
date	2009.02.27.23.03.01;	author jim;	state Exp;
branches;
next	1.48;

1.48
date	2009.02.06.19.29.58;	author jim;	state Exp;
branches;
next	1.47;

1.47
date	2009.02.06.19.06.58;	author jim;	state Exp;
branches;
next	1.46;

1.46
date	2008.12.19.20.40.23;	author jim;	state Exp;
branches;
next	1.45;

1.45
date	2008.11.13.17.15.59;	author jim;	state Exp;
branches;
next	1.44;

1.44
date	2008.05.23.20.22.32;	author jim;	state Exp;
branches;
next	1.43;

1.43
date	2008.05.20.19.56.35;	author jim;	state Exp;
branches;
next	1.42;

1.42
date	2006.04.17.16.54.57;	author chaomei2;	state Exp;
branches;
next	1.41;

1.41
date	2005.07.21.16.23.05;	author jim;	state Exp;
branches;
next	1.40;

1.40
date	2005.05.27.19.32.30;	author jim;	state Exp;
branches;
next	1.39;

1.39
date	2004.09.09.21.50.07;	author jim;	state Exp;
branches;
next	1.38;

1.38
date	2004.09.09.17.35.50;	author jim;	state Exp;
branches;
next	1.37;

1.37
date	2004.06.15.15.37.57;	author jim;	state Exp;
branches;
next	1.36;

1.36
date	2004.03.05.17.17.25;	author jim;	state Exp;
branches;
next	1.35;

1.35
date	2003.09.11.23.26.21;	author jim;	state Exp;
branches;
next	1.34;

1.34
date	2003.08.25.21.23.57;	author jim;	state Exp;
branches;
next	1.33;

1.33
date	2003.06.16.20.22.07;	author jim;	state Exp;
branches;
next	1.32;

1.32
date	2003.05.27.21.32.05;	author jim;	state Exp;
branches;
next	1.31;

1.31
date	2003.05.22.15.40.32;	author jim;	state Exp;
branches;
next	1.30;

1.30
date	2003.05.15.21.27.48;	author jim;	state Exp;
branches;
next	1.29;

1.29
date	2002.06.11.22.27.17;	author jim;	state Exp;
branches;
next	1.28;

1.28
date	2002.02.13.16.35.08;	author jim;	state Exp;
branches;
next	1.27;

1.27
date	2001.12.27.16.36.21;	author jim;	state Exp;
branches;
next	1.26;

1.26
date	2001.06.06.20.56.14;	author jim;	state Exp;
branches;
next	1.25;

1.25
date	2001.02.20.23.42.49;	author jim;	state Exp;
branches;
next	1.24;

1.24
date	2001.02.20.20.14.38;	author jim;	state Exp;
branches;
next	1.23;

1.23
date	2001.02.17.19.33.56;	author gzheng;	state Exp;
branches;
next	1.22;

1.22
date	2001.02.15.17.41.18;	author gzheng;	state Exp;
branches;
next	1.21;

1.21
date	2001.01.08.23.02.30;	author jim;	state Exp;
branches;
next	1.20;

1.20
date	2001.01.08.22.12.59;	author jim;	state Exp;
branches;
next	1.19;

1.19
date	2000.12.22.03.13.42;	author gzheng;	state Exp;
branches;
next	1.18;

1.18
date	2000.09.14.21.34.07;	author jim;	state Exp;
branches;
next	1.17;

1.17
date	2000.09.14.20.01.00;	author jim;	state Exp;
branches;
next	1.16;

1.16
date	2000.08.29.03.18.34;	author jim;	state Exp;
branches;
next	1.15;

1.15
date	2000.04.27.16.33.00;	author jim;	state Exp;
branches;
next	1.14;

1.14
date	2000.03.16.17.06.59;	author jim;	state Exp;
branches;
next	1.13;

1.13
date	2000.03.16.16.21.29;	author jim;	state Exp;
branches;
next	1.12;

1.12
date	2000.03.07.20.27.24;	author jim;	state Exp;
branches;
next	1.11;

1.11
date	99.11.10.21.25.10;	author jim;	state Exp;
branches;
next	1.10;

1.10
date	99.10.29.22.18.13;	author jim;	state Exp;
branches;
next	1.9;

1.9
date	99.10.06.21.08.38;	author jim;	state Exp;
branches;
next	1.8;

1.8
date	99.09.27.15.03.19;	author jim;	state Exp;
branches;
next	1.7;

1.7
date	99.09.16.03.48.13;	author jim;	state Exp;
branches;
next	1.6;

1.6
date	99.05.07.20.13.09;	author jim;	state Exp;
branches;
next	1.5;

1.5
date	98.08.21.01.50.32;	author jim;	state Exp;
branches;
next	1.4;

1.4
date	98.08.21.01.17.31;	author jim;	state Exp;
branches;
next	1.3;

1.3
date	98.01.15.20.35.42;	author jim;	state Exp;
branches;
next	1.2;

1.2
date	97.12.29.19.26.34;	author milind;	state Exp;
branches;
next	1.1;

1.1
date	97.08.12.16.37.51;	author milind;	state Exp;
branches;
next	;


desc
@@


1.112
log
@Update to Charm++ 6.8.0-beta1.
@
text
@#!/bin/csh -f
set CHARM_VERSION = 6.8.0-beta1
goto begin
syntax:
  echo ''
  echo 'This script will create a build directory for NAMD.'
  echo ''
  echo 'Usage: config [<build_dir>/]<arch>[.comment] [options]'
  echo ''
  echo 'Options (most defaults are set in arch subdirectory):'
  echo '  --charm-base <Charm++ base build directory containing src>'
  echo "      (defaults to ./charm-$CHARM_VERSION or ./charm)"
  echo '  --charm-arch <subdirectory of Charm++ base build directory>'
  echo '      (such as mpi-linux-x86_64-mpicxx or multicore-linux64)'
  echo '  --charm-opts <options to pass to charmc (quote list)>'
  echo '  --with-tcl (default)  --without-tcl'
  echo '  --tcl-prefix <directory containing Tcl lib and include>'
  echo '      (defaults to ./tcl or ~/tcl)'
  echo '  --without-python (default)  --with-python (requires Tcl)'
  echo '  --python-prefix <directory containing Python lib and include>'
  echo '      (defaults to /usr)'
  echo '  --with-fftw (default)  --without-fftw'
  echo '  --with-fftw3 (use fftw3 API, your fftw-prefix should match) '
  echo '  --fftw-prefix <directory containing FFTW lib and include>'
  echo '      (defaults to ./fftw or ~/fftw)'
  echo '  --with-mkl (use Intel Math Kernel Library via fftw3 API) '
  echo '  --mkl-prefix <directory containing Intel MKL lib and include>'
  echo '      (defaults to $MKLROOT)'
  echo '  --cxx <C++ compiler command>'
  echo '  --cxx-opts <C++ compiler options (quote list)>'
  echo '  --cxx-noalias-opts <C++ compiler options (quote list)>'
  echo '  --cxx-thread-opts <C++ compiler options (quote list)>'
  echo '  --cc <C compiler command>'
  echo '  --cc-opts <C compiler options (quote list)>'
  echo '  --with-debug  (sets all opts to -g)'
  echo '  --arch-suffix <suffix for NAMD platform printed at startup>'
  echo '  (the following are experimental features)'
  echo '  --without-memopt (default)  --with-memopt'
  echo '  --without-cuda (default)  --with-cuda'
  echo '      (do NOT use CUDA-enabled Charm++, NAMD does not need it)'
  echo '  --without-mic (default)  --with-mic'
  echo '      (do NOT use MIC-enabled Charm++, NAMD does not need it)'
  echo '  --cuda-prefix <directory containing CUDA bin, lib, and include>'
  echo '  --cuda-gencode arch=<arch>,code=<code> (may be repeated)'
  echo '  --cuda-dlink arch=<arch>,code=<code> (for cuFFT, may be repeated)'
  echo ''
  if ( $?PRINT_ARCH_LIST ) then
    set ARCH_PAT = ''
    set ARCH_PAT2 = 'XXX'
    switch ( `uname -s` )
      case Linux:
        set ARCH_PAT = Linux
        switch ( `uname -p` )
          case i686:
            set ARCH_PAT = Linux-x86
          breaksw
          case x86_64:
            set ARCH_PAT = Linux-x86_64
            set ARCH_PAT2 = Linux-KNL
            grep 'Xeon Phi' /proc/cpuinfo > /dev/null
            if ( ! $? ) set ARCH_PAT = Linux-KNL
            if ( $?CRAY_PRE_COMPILE_OPTS ) then
              switch ( $CRAY_PRE_COMPILE_OPTS )
              case *seastar*:
                set ARCH_PAT2 = CRAY-XT
              breaksw
              case *gemini*:
                set ARCH_PAT2 = CRAY-XE
              breaksw
              case *aries*:
                set ARCH_PAT2 = CRAY-XC
              breaksw
              default:
                set ARCH_PAT2 = CRAY
              endsw
            endif
          breaksw
          case ppc:
            set ARCH_PAT = Linux-P
            set ARCH_PAT2 = BlueGene
          breaksw
          case ppc64:
            set ARCH_PAT = Linux-P
            set ARCH_PAT2 = BlueGene
          breaksw
        endsw
      breaksw
      case AIX:
        set ARCH_PAT = AIX
      breaksw
      case SunOS:
        set ARCH_PAT = Solaris
        switch ( `uname -p` )
          case sparc:
            set ARCH_PAT = Solaris-Sparc
          breaksw
        endsw
      breaksw
      case Darwin:
        set ARCH_PAT = MacOSX
      breaksw
      case CYGWIN*:
        set ARCH_PAT = Win
        set ARCH_PAT2 = Cygwin
      breaksw
    endsw
    if ( XX$ARCH_PAT == XX$ARCH_PAT2 ) set ARCH_PAT = XXXXXX
    echo 'Possible options for <arch> on this machine based on uname: ' 
    ( cd arch ; ls -1 $ARCH_PAT*.arch $ARCH_PAT2*.arch |sed -e 's/\.arch//' | egrep -v 'template' | pr -2 -t)
    if ( XX$ARCH_PAT != XX ) then
      echo ''
      echo 'ls arch/*.arch to see all known platforms.  Options such as'
      echo 'MPI are controlled by the choice of Charm++ architecture. '
      echo 'Please see .txt files for Charm++ and NAMD build instructions.'
    endif
  else
    echo 'config with no arguments lists available <arch> options.'
  endif
  echo ''
  exit 1

exists:
  echo ''
  echo 'directory already exists'
  echo ''
  exit 1

begin:

  # defaults
  set use_debug = 0
  set use_tcl = 1
  set use_python = 0
  set use_fftw = 1
  set use_fftw3 = 0
  set use_mkl = 0
  set use_cuda = 0
  set use_memopt = 0
  set use_mic = 0
  set use_spec = 0

  if ($#argv < 1) then
    set PRINT_ARCH_LIST
    goto syntax
  endif

  if ( $1 == debug ) then
    set use_debug = 1
    shift
  endif

  if ($#argv < 1) goto syntax
  if ( $1 == tcl ) then
    echo 'The "tcl" flag is not needed; use of tcl is assumed.'
    shift
  endif

  if ($#argv < 1) goto syntax
  if ( $1 == fftw ) then
    echo 'The "fftw" flag is not needed; use of fftw is assumed.'
    shift
  endif

  if ($#argv < 1) goto syntax
  if ( $1 == plugins ) then
    echo 'The "plugins" flag is not needed; plugins are built automatically.'
    shift
  endif

  if ($#argv < 1) goto syntax
  if ( $1 == cuda ) then
    set use_cuda = 1
    shift
  endif

  if ($#argv < 1) goto syntax
  if ( $1 == memopt ) then
    set use_memopt = 1
    shift
  endif

  if ($#argv < 1) goto syntax
  if ( $1 == mic ) then
    set use_mic = 1
    shift
  endif

  if ($#argv < 1) goto syntax
  if ( $1 =~ --* ) goto syntax

  set BUILD_DIR=$1 ; shift
  if ( x$BUILD_DIR == x ) goto syntax

  if ( -e $BUILD_DIR ) goto exists

  set ARCH=$BUILD_DIR:t
  if ( ! -f arch/$ARCH.arch ) set ARCH=$ARCH:r
  if ( ! -f arch/$ARCH.arch ) then
    echo "ERROR: Platform $ARCH not found in directory arch"
    set PRINT_ARCH_LIST
    goto syntax
  else
    echo ''
    echo "Selected arch file arch/$ARCH.arch contains:"
    echo ''
    cat arch/$ARCH.arch
  endif

  endif

  set ARCH_SUFFIX_ARG = ""

  if ( $#argv > 0 && $1 !~ --* ) then
    set ARCH_SUFFIX_ARG = ${ARCH_SUFFIX_ARG}-$1
    shift
  endif

  set PYTHON_PREFIX="/usr"
  set CUDA_GENCODE = ""
  set CUDA_DLINK = ""

  while ( $#argv > 0 )
    if ( $1 !~ --* ) then
      echo "ERROR: Expected an option beginning with -- but found $1"
      goto syntax
    endif
    switch ( $1 )

      case --arch-suffix:
        shift
        set ARCH_SUFFIX_ARG = ${ARCH_SUFFIX_ARG}-$1
      breaksw

      case --with-debug:
        set use_debug = 1
      breaksw

      case --with-tcl:
        set use_tcl = 1
      breaksw
      case --without-tcl:
        set use_tcl = 0
      breaksw
      case --tcl-prefix:
        shift
        if ( ! -d $1 ) then
          echo "ERROR: No such directory $1"
          goto syntax
        endif
        set TCL_PREFIX=$1
      breaksw

      case --with-python:
        set use_python = 1
      breaksw
      case --without-python:
        set use_python = 0
      breaksw
      case --python-prefix:
        shift
        if ( ! -d $1 ) then
          echo "ERROR: No such directory $1"
          goto syntax
        endif
        set PYTHON_PREFIX=$1
      breaksw

      case --with-fftw:
        set use_fftw = 1
      breaksw
      case --with-fftw3:
        set use_fftw3 = 1
      breaksw
      case --without-fftw:
        set use_fftw = 0
        set use_fftw3 = 0
      breaksw
      case --fftw-prefix:
        shift
        if ( ! -d $1 ) then
          echo "ERROR: No such directory $1"
          goto syntax
        endif
        set FFTW_PREFIX=$1
      breaksw
      case --with-mkl
        set use_mkl = 1
        set use_fftw = 0
        set use_fftw3 = 0
      breaksw
      case --mkl-prefix:
        shift
        if ( ! -d $1 ) then
          echo "ERROR: No such directory $1"
          goto syntax
        endif
        set MKL_PREFIX=$1
      breaksw

      case --with-cuda:
        set use_cuda = 1
      breaksw
      case --without-cuda:
        set use_cuda = 0
      breaksw
      case --cuda-prefix:
        if ( $?CRAY_CUDATOOLKIT_DIR ) then
          echo "ERROR: Do not specify --cuda-prefix when CRAY cudatoolkit module is loaded"
          goto syntax
        endif
        shift
        if ( ! -d "$1" ) then
          echo "ERROR: No such directory $1"
          goto syntax
        endif
        set CUDA_PREFIX="$1"
      breaksw
      case --cuda-gencode:
        shift
        if ( ! $#argv  ) then
          echo "ERROR: --cuda-gencode requires an argument"
          goto syntax
        endif
        set CUDA_GENCODE = ( $CUDA_GENCODE -gencode $1 )
      breaksw
      case --cuda-dlink:
        shift
        if ( ! $#argv  ) then
          echo "ERROR: --cuda-dlink requires an argument"
          goto syntax
        endif
        set CUDA_DLINK = ( $CUDA_DLINK -gencode $1 )
      breaksw

      case --with-memopt:
        set use_memopt = 1
      breaksw

      case --with-mic:
        set use_mic = 1
      breaksw
      case --without-mic:
        set use_mic = 0
      breaksw

      case --with-spec:
        set use_spec = 1
      breaksw

      case --charm-base:
        shift
        if ( ! -d $1 ) then
          echo "ERROR: No such directory $1"
          goto syntax
        endif
        set CHARM_BASE=$1
      breaksw
      case --charm-arch:
        shift
        set CHARM_ARCH=$1
      breaksw
      case --charm-opts:
        shift
        set CHARM_OPTS="$1"
      breaksw

      case --cxx:
        shift
        set CXX_COMMAND="$1"
      breaksw
      case --cxx-opts:
        shift
        set CXX_OPTS="$1"
      breaksw
      case --cxx-noalias-opts:
        shift
        set CXX_NOALIAS_OPTS="$1"
      breaksw
      case --cxx-thread-opts:
        shift
        set CXX_THREAD_OPTS="$1"
      breaksw
      case --cc:
        shift
        set CC_COMMAND="$1"
      breaksw
      case --cc-opts:
        shift
        set CC_OPTS="$1"
      breaksw

      default
        echo "ERROR: unknown option $1"
        goto syntax
      breaksw
    endsw

    shift
  end

  if ( $?CHARM_BASE && $?CHARM_ARCH ) then
    if ( ! -d $CHARM_BASE/$CHARM_ARCH ) then
      echo "ERROR: No such directory $CHARM_BASE/$CHARM_ARCH"
      goto syntax
    endif
  endif

  if ( $use_fftw && $use_mkl ) then
    echo "ERROR: Do not specify both FFTW and Intel MKL"
    goto syntax
  endif

  if ( $use_cuda || $use_mic ) then

    if ( $?CHARM_ARCH ) then
      set CHARM_ARCH_TEST = $CHARM_ARCH
    else
      set CHARM_ARCH_TEST = `awk '/^CHARMARCH =/ {print $3}' arch/$ARCH.arch`
    endif

    if ( $CHARM_ARCH_TEST =~ mpi-* ) then
      set charm_arch_mpi = 1
      if ( $CHARM_ARCH_TEST =~ *-win32* || $CHARM_ARCH_TEST =~ *-win64* ) then
        set charm_arch_mpi = 0
      endif
    else
      set charm_arch_mpi = 0
    endif

    if ( $CHARM_ARCH_TEST =~ *-smp* || $CHARM_ARCH_TEST =~ multicore-* ) then
      set charm_arch_smp = 1
    else
      set charm_arch_smp = 0
    endif

    if ( $use_cuda ) set ERRTYPE = "CUDA"
    if ( $use_mic ) set ERRTYPE = "MIC"

    if ( $charm_arch_mpi || ! $charm_arch_smp ) then
      echo ''
      echo "ERROR: $ERRTYPE builds require non-MPI SMP or multicore Charm++ arch for reasonable performance."
      echo ''
      echo "Consider ibverbs-smp or verbs-smp (InfiniBand), gni-smp (Cray), or multicore (single node)."
      echo ''
      exit 1
    endif

  endif

  if ( $use_python ) then
    if ( ! $use_tcl ) then
      echo ''
      echo "ERROR: Python interface requires Tcl."
      echo ''
      exit 1
    endif
    foreach python_include ( $PYTHON_PREFIX/include/python2.[0-9] )
      set python_lib = $python_include:t
    end
    if ( $?python_lib ) then
      echo "Using $python_lib with include files in $python_include"
    else
      set python_include = $PYTHON_PREFIX/include/python
      set python_lib = python
      echo "Unable to local Python; please edit Make.config file."
    endif
  endif

  if ( $?CHARM_BASE ) then
    if ( $CHARM_BASE !~ /* ) set CHARM_BASE = .rootdir/$CHARM_BASE
  endif

  set DIR=`pwd`;

  set BUILD_LINK = $BUILD_DIR
  # Environment variable NAMD_BUILD_BASE may point to scratch directory.
  if ( $BUILD_DIR:t == $BUILD_DIR && $?NAMD_BUILD_BASE ) then
    if ( -e $BUILD_DIR ) goto exists
    set UNIQ = `date '+%Y-%b-%d'`-$$
    set BUILD_DIR = $NAMD_BUILD_BASE/${UNIQ}_$BUILD_DIR
    echo "Creating link: $BUILD_DIR to $BUILD_LINK"
    ln -s $BUILD_DIR $BUILD_LINK
  endif

  if ( -e $BUILD_DIR ) goto exists
  echo "Creating directory: $BUILD_DIR"
  mkdir $BUILD_DIR
  cd $BUILD_DIR

  set ROOTDIR=$DIR
  if ( $BUILD_DIR:t == $BUILD_DIR ) set ROOTDIR='..'
  if ( ./$BUILD_DIR:t == $BUILD_DIR ) set ROOTDIR='..'

  echo "Creating link: $ROOTDIR to .rootdir"
  ln -s $ROOTDIR .rootdir

  if ( $use_fftw ) then
    if ( ! $?FFTW_PREFIX ) then
      if ( -d .rootdir/fftw/lib && -d .rootdir/fftw/include ) then
        echo "Using FFTW build found in main build directory"
        set FFTW_PREFIX = .rootdir/fftw
      else if ( -d $HOME/fftw/lib && -d $HOME/fftw/include ) then
        echo "Using FFTW build found in $HOME/fftw"
        set FFTW_PREFIX = $HOME/fftw
      endif
    endif
    if ( $?FFTW_PREFIX && ! $use_fftw3 ) then
      if ( -e $FFTW_PREFIX/include/fftw3.h ) then
        echo "Using FFTW3 build found in $FFTW_PREFIX"
        set use_fftw3 = 1
      endif
    endif
  endif

  echo "Writing build options to $BUILD_LINK/Make.config"

  set noclobber

  if ( $?CHARM_BASE ) then
    echo "CHARMBASE = $CHARM_BASE" > Make.config
  else if ( -d .rootdir/charm-$CHARM_VERSION ) then
    set CHARM_BASE = .rootdir/charm-$CHARM_VERSION
    echo "Using Charm++ $CHARM_VERSION build found in main build directory"
    echo "CHARMBASE = .rootdir/charm-$CHARM_VERSION" > Make.config
  else if ( -d .rootdir/charm ) then
    set CHARM_BASE = .rootdir/charm
    echo "Using Charm++ build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm' > Make.config
  else
    set CHARM_BASE = `awk '/^CHARMBASE =/ {print $3}' .rootdir/Make.charm`
    echo "Using Charm++ build found in Make.charm: $CHARM_BASE"
    echo include .rootdir/Make.charm > Make.config
  endif

  echo include .rootdir/arch/$ARCH.arch >> Make.config

  if ( $?CHARM_ARCH ) then
    echo "CHARMARCH = $CHARM_ARCH" >> Make.config
  else
    set CHARM_ARCH = `awk '/^CHARMARCH =/ {print $3}' .rootdir/arch/$ARCH.arch`
  endif
  if ( ! -d $CHARM_BASE/$CHARM_ARCH ) then
    echo "Warning: No such directory $CHARM_BASE/$CHARM_ARCH"
  endif
  if ( $?CHARM_OPTS ) then
    echo "CHARMOPTS = $CHARM_OPTS" >> Make.config
  endif
  echo 'CHARM = $(CHARMBASE)/$(CHARMARCH)' >> Make.config
  set ARCH_SUFFIX = ""
  if ( $CHARM_ARCH =~ *-scyld* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-Scyld
  if ( $CHARM_ARCH =~ *-clustermatic* ) then
    set SUF = "-Clustermatic"
    if ( "$ARCH_SUFFIX_ARG" =~ *-Clustermatic* ) set SUF = ""
    set ARCH_SUFFIX = ${ARCH_SUFFIX}${SUF}
  endif
  if ( $CHARM_ARCH =~ mpi-* ) then
    set SUF = "-MPI"
    if ( "$ARCH_SUFFIX_ARG" =~ *-MVAPICH* ) set SUF = ""
    if ( "$ARCH_SUFFIX_ARG" =~ *-OpenMPI* ) set SUF = ""
    set ARCH_SUFFIX = ${ARCH_SUFFIX}${SUF}
  endif
  if ( $CHARM_ARCH =~ gemini_gni-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-ugni
  if ( $CHARM_ARCH =~ gni-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-ugni
  if ( $CHARM_ARCH =~ lapi-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-lapi
  if ( $CHARM_ARCH =~ pami-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-pami
  if ( $CHARM_ARCH =~ pamilrts-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-pamilrts
  if ( $CHARM_ARCH =~ netlrts-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-netlrts
  if ( $CHARM_ARCH =~ verbs-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-verbs
  if ( $CHARM_ARCH =~ *-vmi* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-vmi
  if ( $CHARM_ARCH =~ *-tcp* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-TCP
  if ( $CHARM_ARCH =~ *-gm* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-gm
  if ( $CHARM_ARCH =~ *-mx* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-mx
  if ( $CHARM_ARCH =~ *-elan* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-Elan
  if ( $CHARM_ARCH =~ *-ibverbs* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-ibverbs
  if ( $CHARM_ARCH =~ *-ofi* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-ofi
  if ( $CHARM_ARCH =~ *-smp* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-smp
  if ( $CHARM_ARCH =~ *multicore-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-multicore
  set ARCH_SUFFIX = ${ARCH_SUFFIX}${ARCH_SUFFIX_ARG}
  if ( $use_cuda ) then
    set SUF = "-CUDA"
    if ( "$ARCH_SUFFIX_ARG" =~ *CUDA* ) set SUF = ""
    set ARCH_SUFFIX = ${ARCH_SUFFIX}${SUF}
  endif
  if ( $use_mic ) then
    set SUF = "-MIC"
    if ( "$ARCH_SUFFIX_ARG" =~ *MIC* ) set SUF = ""
    set ARCH_SUFFIX = ${ARCH_SUFFIX}${SUF}
  endif
  if ( $use_memopt ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-memopt
  if ( $use_spec ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-SPEC
  echo NAMD_PLATFORM = \$\(NAMD_ARCH\)${ARCH_SUFFIX} >> Make.config

  echo 'include .rootdir/arch/$(NAMD_ARCH).base' >> Make.config
  if ( $use_tcl ) echo 'include .rootdir/arch/$(NAMD_ARCH).tcl' >> Make.config
  if ( $use_mkl ) then
    echo 'include .rootdir/arch/$(NAMD_ARCH).mkl' >> Make.config
  else if ( $use_fftw3 ) then
    echo 'include .rootdir/arch/$(NAMD_ARCH).fftw3' >> Make.config
  else if ( $use_fftw ) echo 'include .rootdir/arch/$(NAMD_ARCH).fftw' >> Make.config
  endif
  if ( $use_cuda ) echo 'include .rootdir/arch/$(NAMD_ARCH).cuda' >> Make.config
  if ( $use_cuda && "x$CUDA_GENCODE" != x ) then
    echo "CUDAGENCODE = $CUDA_GENCODE" >> Make.config
    if ( "x$CUDA_DLINK" != x ) then
      echo "CUDADLINKOPTS = $CUDA_DLINK" >> Make.config
    else
      echo "# runtime error if dlink architectures not available in libcufft_static" >> Make.config
      echo "CUDADLINKOPTS = $CUDA_GENCODE" >> Make.config
    endif
  endif

  if ( $use_memopt ) echo 'MEMOPT=-DMEM_OPT_VERSION' >> Make.config

  if ( $use_mic ) echo 'include .rootdir/arch/$(NAMD_ARCH).mic' >> Make.config

  if ( $use_spec ) echo 'RELEASEFLAGS=-DSPEC_DISABLED_VERSION' >> Make.config

  set threaded = 0
  if ( $CHARM_ARCH =~ *-smp* ) set threaded = 1
  if ( $CHARM_ARCH =~ *multicore-* ) set threaded = 1

  if ( $use_tcl ) then
    if ( $?TCL_PREFIX ) then
      echo "TCLDIR = $TCL_PREFIX" >> Make.config
    else if ( $threaded && -d .rootdir/tcl-threaded/lib && -d .rootdir/tcl-threaded/include ) then
      echo "Using Tcl build found in main build directory"
      echo 'TCLDIR = .rootdir/tcl-threaded' >> Make.config
    else if ( $threaded && -d $HOME/tcl-threaded/lib && -d $HOME/tcl-threaded/include ) then
      echo "Using Tcl build found in $HOME/tcl-threaded"
      echo 'TCLDIR = $(HOME)/tcl-threaded' >> Make.config
    else if ( -d .rootdir/tcl/lib && -d .rootdir/tcl/include ) then
      echo "Using Tcl build found in main build directory"
      echo 'TCLDIR = .rootdir/tcl' >> Make.config
    else if ( -d $HOME/tcl/lib && -d $HOME/tcl/include ) then
      echo "Using Tcl build found in $HOME/tcl"
      echo 'TCLDIR = $(HOME)/tcl' >> Make.config
    endif
  endif

  if ( $use_python ) then
    echo "PYTHON = -DNAMD_PYTHON -I$python_include" >> Make.config
    echo "PYTHONLIB = -L$PYTHON_PREFIX/lib64 -l$python_lib -ldl -lutil" >> Make.config
  endif

  if ( $use_mkl ) then
    if ( $?MKL_PREFIX ) then
      echo "FFTDIR = $MKL_PREFIX" >> Make.config
    endif
  else if ( $use_fftw ) then
    if ( $?FFTW_PREFIX ) then
      echo "FFTDIR = $FFTW_PREFIX" >> Make.config
    else if ( -d .rootdir/fftw/lib && -d .rootdir/fftw/include ) then
      echo "Using FFTW build found in main build directory"
      echo 'FFTDIR = .rootdir/fftw' >> Make.config
    else if ( -d $HOME/fftw/lib && -d $HOME/fftw/include ) then
      echo "Using FFTW build found in $HOME/fftw"
      echo 'FFTDIR = $(HOME)/fftw' >> Make.config
    endif
  endif

  if ( $use_cuda ) then
    set CUDART_SO_PAT = 'lib64/libcudart.so.[1-9]'
    set CUFFT_SO_PAT = 'lib64/libcufft.so.[1-9]'
    switch ( `uname -s` )
      case Darwin:
        set CUDART_SO_PAT = 'lib/libcudart.dylib'
        set CUFFT_SO_PAT = 'lib/libcufft.dylib'
      breaksw
      case CYGWIN*:
        set CUDART_SO_PAT = 'bin/cudart64_*.dll'
        set CUFFT_SO_PAT = 'bin/cufft64_*.dll'
      breaksw
    endsw
    if ( $?CUDA_PREFIX ) then
      if ( `uname -s` =~ 'CYGWIN*' ) then
        set CUDA_PREFIX=`cygpath -d "$CUDA_PREFIX"`
        set CUDA_PREFIX=`cygpath "$CUDA_PREFIX"`
      endif
      echo "CUDADIR = $CUDA_PREFIX" >> Make.config
    else if ( -d .rootdir/cuda/lib && -d .rootdir/cuda/include ) then
      echo "Using CUDA build found in main build directory"
      echo 'CUDADIR = .rootdir/cuda' >> Make.config
      set CUDA_PREFIX = .rootdir/cuda
    else if ( -d $HOME/cuda/lib && -d $HOME/cuda/include ) then
      echo "Using CUDA build found in $HOME/cuda"
      echo 'CUDADIR = $(HOME)/cuda' >> Make.config
      set CUDA_PREFIX = $HOME/cuda
    endif
    if ( $?CUDA_PREFIX ) then
      set CUDART_SO_FULL=`glob "$CUDA_PREFIX"/$CUDART_SO_PAT`
      if ( "x$CUDART_SO_FULL" == x ) set CUDART_SO_FULL=`glob "$CUDA_PREFIX"/$CUDART_SO_PAT.[0-9]`
      if ( "x$CUDART_SO_FULL" == x ) set CUDART_SO_FULL=`glob "$CUDA_PREFIX"/$CUDART_SO_PAT.[0-9].[0-9]`
      if ( "x$CUDART_SO_FULL" == x || "$CUDART_SO_FULL" !~ */* ) unset CUDART_SO_FULL
      set CUFFT_SO_FULL=`glob "$CUDA_PREFIX"/$CUFFT_SO_PAT`
      if ( "x$CUFFT_SO_FULL" == x ) set CUFFT_SO_FULL=`glob "$CUDA_PREFIX"/$CUFFT_SO_PAT.[0-9]`
      if ( "x$CUFFT_SO_FULL" == x ) set CUFFT_SO_FULL=`glob "$CUDA_PREFIX"/$CUFFT_SO_PAT.[0-9].[0-9]`
      if ( "x$CUFFT_SO_FULL" == x || "$CUFFT_SO_FULL" !~ */* ) unset CUFFT_SO_FULL
    endif
    if ( $?CUDART_SO_FULL ) then
      set CUDART_SO_FULL="$CUDART_SO_FULL"
      echo "CUDASODIR = $CUDART_SO_FULL:h" >> Make.config
      echo "LIBCUDARTSO = $CUDART_SO_FULL:t" >> Make.config
      if ( $?CUFFT_SO_FULL ) then
        set CUFFT_SO_FULL="$CUFFT_SO_FULL"
        if ( "x$CUDART_SO_FULL:h" != "x$CUFFT_SO_FULL:h" ) then
          echo "Warning: Found $CUDART_SO_FULL and $CUFFT_SO_FULL in different directories"
        endif
        echo "LIBCUFFTSO = $CUFFT_SO_FULL:t" >> Make.config
      else
        echo "Warning: Found $CUDART_SO_FULL but no cufft"
      endif
    endif
  endif

  if ( $?CXX_COMMAND ) then
    echo "CXX = $CXX_COMMAND" >> Make.config
  endif
  if ( $?CXX_OPTS ) then
    echo "CXXOPTS = $CXX_OPTS" >> Make.config
  endif
  if ( $?CXX_NOALIAS_OPTS ) then
    echo "CXXNOALIASOPTS = $CXX_NOALIAS_OPTS" >> Make.config
  endif
  if ( $?CXX_THREAD_OPTS ) then
    echo "CXXTHREADOPTS = $CXX_THREAD_OPTS" >> Make.config
  endif
  if ( $?CC_COMMAND ) then
    echo "CC = $CC_COMMAND" >> Make.config
  endif
  if ( $?CC_OPTS ) then
    echo "COPTS = $CC_OPTS" >> Make.config
  endif

  if ( $use_debug ) then
    echo 'CXXOPTS = -g' >> Make.config
    echo 'CXXTHREADOPTS = -g' >> Make.config
    echo 'CXXSIMPARAMOPTS = -g' >> Make.config
    echo 'CXXNOALIASOPTS = -g' >> Make.config
    echo 'COPTS = -g' >> Make.config
  endif

  echo "Linking Makefile"
  ln -s .rootdir/Makefile ./Makefile
  echo "Linking Make.depends"
  ln -s .rootdir/Make.depends ./Make.depends
  echo "Linking src directory"
  ln -s .rootdir/src ./src
  echo "Linking plugins directory"
  ln -s .rootdir/plugins ./plugins
  echo "Linking psfgen directory"
  ln -s .rootdir/psfgen ./sb

  echo ''
  echo "Generated $BUILD_LINK/Make.config contains the following:"
  echo ''
  cat Make.config

  echo ''
  echo "You are ready to run make in directory $BUILD_LINK now."
@


1.111
log
@Add --cuda-dlink option to specify gencode options to dlink cuFFT static library.
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.7.1
@


1.110
log
@Recognize ofi in Charm++ platform and add to NAMD platform string.
@
text
@d45 1
d220 1
d326 8
d602 9
a610 1
  if ( $use_cuda && "x$CUDA_GENCODE" != x ) echo "CUDAGENCODE = $CUDA_GENCODE" >> Make.config
@


1.109
log
@Add --python-prefix option, ignore Python 3 if installed.
@
text
@d565 1
@


1.108
log
@Don't confuse CC and CXX environment variables for --cc and --cxx arguments.
@
text
@d20 2
d217 1
d257 8
d447 1
a447 1
    foreach python_include ( /usr/include/python[23].[0-9] )
d453 1
a453 1
      set python_include = /usr/include/python
d623 1
a623 1
    echo "PYTHONLIB = -l$python_lib" >> Make.config
@


1.107
log
@Add support for spaces in cuda-prefix on Windows and cufft library.
@
text
@d348 1
a348 1
        set CXX="$1"
d364 1
a364 1
        set CC="$1"
d685 2
a686 2
  if ( $?CXX ) then
    echo "CXX = $CXX" >> Make.config
d697 2
a698 2
  if ( $?CC ) then
    echo "CC = $CC" >> Make.config
@


1.106
log
@Add config options for Intel Math Kernel Library.
@
text
@d299 1
a299 1
        if ( ! -d $1 ) then
d303 1
a303 1
        set CUDA_PREFIX=$1
d632 2
a633 1
    set CUDA_SO_PAT = 'lib64/libcudart.so.[1-9]'
d636 2
a637 1
        set CUDA_SO_PAT = 'lib/libcudart.dylib'
d640 2
a641 1
        set CUDA_SO_PAT = 'bin/cudart64_*.dll'
d645 4
d660 22
a681 8
      set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT`
      if ( x$CUDA_SO_FULL == x ) set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT.[0-9]`
      if ( x$CUDA_SO_FULL == x ) set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT.[0-9].[0-9]`
      if ( x$CUDA_SO_FULL == x || $CUDA_SO_FULL !~ */* ) unset CUDA_SO_FULL
    endif
    if ( $?CUDA_SO_FULL ) then
      echo "CUDASODIR = $CUDA_SO_FULL:h" >> Make.config
      echo "LIBCUDARTSO = $CUDA_SO_FULL:t" >> Make.config
@


1.105
log
@Add arch files for Intel Xeon Phi KNL processor (self-hosted, not co-processor).
@
text
@d24 3
d133 1
d273 13
d387 5
d573 3
a575 1
  if ( $use_fftw3 ) then
d615 5
a619 1
  if ( $use_fftw ) then
@


1.104
log
@Update to Charm++ 6.7.1.
@
text
@d53 3
d101 1
@


1.103
log
@Add --with-python option to build optional Python interface.
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.7.0
@


1.102
log
@Update Charm++ version 6.7.0-pre to 6.7.0.
@
text
@d19 1
d123 1
d240 7
d403 19
d580 5
@


1.101
log
@Allow mpi-smp CUDA builds on Windows only.
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.7.0-pre
@


1.100
log
@Increase Charm++ version to 6.7.0-pre (pre-release).
@
text
@d367 3
@


1.99
log
@Require non-MPI SMP or multicore Charm++ arch for CUDA and MIC builds to avoid poor performance.
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.6.1
@


1.98
log
@Fix inconsistent use of >> and >! and set noclobber.
@
text
@d357 34
@


1.97
log
@Increase Charm++ version to 6.6.1.
@
text
@d405 2
d408 1
a408 1
    echo "CHARMBASE = $CHARM_BASE" >> Make.config
d412 1
a412 1
    echo "CHARMBASE = .rootdir/charm-$CHARM_VERSION" >> Make.config
d416 1
a416 1
    echo 'CHARMBASE = .rootdir/charm' >> Make.config
d420 1
a420 1
    echo include .rootdir/Make.charm >! Make.config
@


1.96
log
@bump CHARM_VERSION to 6.6.0-rc4
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.6.0-rc4
@


1.95
log
@bump CHARM_VERSION to 6.6.0-rc3
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.6.0-rc3
@


1.94
log
@Add --cuda-gencode option to allow builds on CUDA 5.5.
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.6.0-rc1
@


1.93
log
@Fix "Illegal variable name." error.
@
text
@d38 1
d205 2
d275 8
d485 1
@


1.92
log
@auto-detect fftw3
@
text
@d381 1
a381 1
        set FFTW_PREFIX = $(HOME)/fftw
@


1.91
log
@No need to copy libcudart.so into build directory on Cray.
@
text
@d374 18
@


1.90
log
@Bump charm version to match nightly builds.
@
text
@d261 4
@


1.89
log
@Recognized Cygwin build environment.
@
text
@d2 1
a2 1
set CHARM_VERSION = 6.5.1
@


1.88
log
@Add netlrts and verbs as recognized Charm++ machine layers.
@
text
@d91 4
@


1.87
log
@Break add new CRAY-XE arch files to distinguish XE/XK from XT platform.
@
text
@d416 2
@


1.86
log
@Recognize gni- charm arch as ugni.
@
text
@d54 2
d57 1
a57 1
                set ARCH_PAT2 = CRAY-XT
@


1.85
log
@Add CRAY XC30 arch files.
@
text
@d410 1
@


1.84
log
@Tweak LIBCUDARTSO search to not depend on return status from ls.
@
text
@d51 13
a63 1
            set ARCH_PAT2 = CRAY-XT
@


1.83
log
@Port to Intel Xeon Phi "MIC" accelerator by David M. Kunzman of Intel.
@
text
@d495 3
a497 3
      if ( $status ) set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT.[0-9]`
      if ( $status ) set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT.[0-9].[0-9]`
      if ( $status || $CUDA_SO_FULL !~ */* ) unset CUDA_SO_FULL
@


1.82
log
@Update to Charm++ 6.5.1.
@
text
@d35 2
d107 1
d151 6
d255 7
d415 5
d433 2
@


1.81
log
@Update to charm-6.5.0.
@
text
@d2 1
d12 1
a12 1
  echo '      (defaults to ./charm-6.5.0 or ./charm)'
d340 4
a343 4
  else if ( -d .rootdir/charm-6.5.0 ) then
    set CHARM_BASE = .rootdir/charm-6.5.0
    echo "Using Charm++ 6.5.0 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.5.0' >> Make.config
@


1.80
log
@Distinguish pamilrts from pami in NAMD_PLATFORM
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.4.0 or ./charm)'
d339 4
a342 4
  else if ( -d .rootdir/charm-6.4.0 ) then
    set CHARM_BASE = .rootdir/charm-6.4.0
    echo "Using Charm++ 6.4.0 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.4.0' >> Make.config
@


1.79
log
@Switch "$?" to standard "$status" to work on standard csh for ubuntu on arm.
@
text
@d380 4
a383 3
  if ( $CHARM_ARCH =~ gemini_gni* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-ugni
  if ( $CHARM_ARCH =~ lapi* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-lapi
  if ( $CHARM_ARCH =~ pami* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-pami
@


1.78
log
@Fix CUDASODIR and LIBCUDARTSO determination for CUDA 5.
@
text
@d470 3
a472 3
      if ( $? ) set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT.[0-9]`
      if ( $? ) set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT.[0-9].[0-9]`
      if ( $? || $CUDA_SO_FULL !~ */* ) unset CUDA_SO_FULL
@


1.77
log
@Add --with-spec option to add warning and disable dcd output for SPEC release.
@
text
@a458 1
      set CUDA_SO_FULL=`ls $CUDA_PREFIX/$CUDA_SO_PAT`
d462 1
a462 1
      set CUDA_SO_FULL=`ls .rootdir/cuda/$CUDA_SO_PAT`
d466 7
a472 1
      set CUDA_SO_FULL=`ls $HOME/cuda/$CUDA_SO_PAT`
@


1.76
log
@Update to charm-6.4.0.
@
text
@d104 1
d245 4
d398 1
d410 2
@


1.75
log
@Add -ugni arch suffix.
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.3.2 or ./charm)'
d334 4
a337 4
  else if ( -d .rootdir/charm-6.3.2 ) then
    set CHARM_BASE = .rootdir/charm-6.3.2
    echo "Using Charm++ 6.3.2 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.3.2' >> Make.config
@


1.74
log
@Add support for building against FFTW-3.2 instead of FFTW-2.1.5
@
text
@d375 1
@


1.73
log
@Look for ./tcl-threaded or ~/tcl-threaded first for smp or multicore builds
@
text
@d19 2
a20 1
  echo '  --fftw-prefix <directory containing FFTW 2.1.3 lib and include>'
d101 1
d209 3
d214 1
d396 4
a399 1
  if ( $use_fftw ) echo 'include .rootdir/arch/$(NAMD_ARCH).fftw' >> Make.config
@


1.72
log
@Update to charm-6.3.2.
@
text
@d395 4
d402 6
@


1.71
log
@Add CUDA support for Win64 and MacOSX-x86_64.
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.3.0 or ./charm)'
d328 4
a331 4
  else if ( -d .rootdir/charm-6.3.0 ) then
    set CHARM_BASE = .rootdir/charm-6.3.0
    echo "Using Charm++ 6.3.0 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.3.0' >> Make.config
@


1.70
log
@Support 64-bit smp/multicore builds on AIX.  Supply buffer to getcwd().
@
text
@d420 9
d431 1
a431 1
      set CUDA_SO_FULL=`ls $CUDA_PREFIX/lib/libcudart.so.[1-9]`
d435 1
a435 1
      set CUDA_SO_FULL=`ls .rootdir/cuda/lib/libcudart.so.[1-9]`
d439 1
a439 1
      set CUDA_SO_FULL=`ls $HOME/cuda/lib/libcudart.so.[1-9]`
d442 2
a443 2
      set CUDA_SO=$CUDA_SO_FULL:t
      echo "LIBCUDARTSO = $CUDA_SO" >> Make.config
@


1.69
log
@more suffix changes
@
text
@d59 3
d329 1
d333 1
@


1.68
log
@fix bug when no suffix on command line
@
text
@d163 2
d166 1
a166 1
    set ARCH_SUFFIX_ARG = -$1
d179 1
a179 1
        set ARCH_SUFFIX_ARG = -$1
d353 14
a366 5
  if ( $CHARM_ARCH =~ *-clustermatic* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-Clustermatic
  if ( $CHARM_ARCH =~ *mpi-* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-MPI
  if ( $CHARM_ARCH =~ lapi* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-LAPI
  if ( $CHARM_ARCH =~ pami* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-PAMI
  if ( $CHARM_ARCH =~ *-vmi* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-VMI
d368 2
a369 2
  if ( $CHARM_ARCH =~ *-gm* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-GM
  if ( $CHARM_ARCH =~ *-mx* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-MX
d372 1
a372 1
  if ( $CHARM_ARCH =~ *-smp* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-SMP
d374 5
a378 2
  if ( $?ARCH_SUFFIX_ARG ) then
    set ARCH_SUFFIX = ${ARCH_SUFFIX}${ARCH_SUFFIX_ARG}
a379 1
  if ( $use_cuda ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-CUDA
@


1.67
log
@add ibverbs suffix
@
text
@d363 3
a365 1
  if ( $?ARCH_SUFFIX_ARG ) set ARCH_SUFFIX = ${ARCH_SUFFIX}${ARCH_SUFFIX_ARG}
@


1.66
log
@Automatically add more options to suffix.
@
text
@d360 1
@


1.65
log
@Switch to Charm++ 6.3.0.
@
text
@d164 1
a164 1
    set ARCH_SUFFIX = -$1
d177 1
a177 1
        set ARCH_SUFFIX = -$1
d330 2
a331 2
    echo "Using Charm++ build found in Make.charm:"
    cat .rootdir/Make.charm
d339 5
d349 14
a362 13
  if ( ! $?ARCH_SUFFIX ) then
    set ARCH_SUFFIX = ""
    if ( $ARCH =~ *-Scyld* ) set ARCH_SUFFIX = -Scyld
    if ( $ARCH =~ *-Clustermatic* ) set ARCH_SUFFIX = -Clustermatic
    if ( $ARCH =~ *-MPI* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-MPI
    if ( $ARCH =~ *-CMPI* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-CMPI
    if ( $ARCH =~ *-MPT* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-MPT
    if ( $ARCH =~ *-VMI* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-VMI
    if ( $ARCH =~ *-TCP* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-TCP
    if ( $ARCH =~ *-GM* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-GM
    if ( $ARCH =~ *-MX* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-MX
    if ( $ARCH =~ *-Elan* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-Elan
  endif
@


1.64
log
@Automatically append -CUDA and -memopt to platform name.
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.2.2 or ./charm)'
d323 3
a325 3
  else if ( -d .rootdir/charm-6.2.2 ) then
    echo "Using Charm++ 6.2.2 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.2.2' >> Make.config
@


1.63
log
@More echo commands to work around CygWin tcsh hangs.
@
text
@d357 2
@


1.62
log
@Workaround for bug in CygWin that caused tcsh to hang.  Adding an extra
echo command between the calls to ln -s makes it go away.  The hung tcsh
could be resumed manually by running cat /proc/*/cmdline.
@
text
@d440 1
a440 1
  echo "Linking src, plugins, and psfgen"
d442 1
d444 1
@


1.61
log
@Update to charm-6.2.2.
@
text
@d436 1
a436 1
  echo "Linking Makefiles"
d438 1
@


1.60
log
@Change pattern Linux-PPC to Linux-P to catch Linux-POWER too.
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.2.1 or ./charm)'
d323 3
a325 3
  else if ( -d .rootdir/charm-6.2.1 ) then
    echo "Using Charm++ 6.2.1 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.2.1' >> Make.config
@


1.59
log
@updating NAMD and Charm++ versions.
@
text
@d50 1
a50 1
            set ARCH_PAT = Linux-PPC
d54 1
a54 1
            set ARCH_PAT = Linux-PPC
@


1.58
log
@Copy and convert entire lib directory in make winrelease (was in config).
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.1.3 or ./charm)'
d323 3
a325 3
  else if ( -d .rootdir/charm-6.1.3 ) then
    echo "Using Charm++ 6.1.3 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.1.3' >> Make.config
@


1.57
log
@Fix .ci file rules to avoid copying src directory on Windows.
@
text
@a438 9
  if ( $ARCH =~ *Win* ) then
   echo "Converting text files"
   mkdir lib; mkdir lib/abf
   foreach d ( . lib lib/abf )
     foreach f ( .rootdir/$d/*.txt .rootdir/$d/*.tcl )
       perl -p -i -e 's/(?<!\r)\n$/\r\n/' < $f > $d/$f:t
     end
   end
  endif
@


1.56
log
@fix missing quotes needed to handle options that are quoted lists
@
text
@d448 4
a451 11
  if ( $ARCH =~ *MSVC* ) then
    echo "Copying src, plugins, and psfgen"
    cp -r .rootdir/src ./src
    cp -r .rootdir/plugins ./plugins
    cp -r .rootdir/psfgen ./sb
  else
    echo "Linking src, plugins, and psfgen"
    ln -s .rootdir/src ./src
    ln -s .rootdir/plugins ./plugins
    ln -s .rootdir/psfgen ./sb
  endif
@


1.55
log
@Look for charm-6.1.3 instead of charm-6.1
@
text
@d247 1
a247 1
        set CHARM_OPTS=$1
d252 1
a252 1
        set CXX=$1
d256 1
a256 1
        set CXX_OPTS=$1
d260 1
a260 1
        set CXX_NOALIAS_OPTS=$1
d264 1
a264 1
        set CXX_THREAD_OPTS=$1
d268 1
a268 1
        set CC=$1
d272 1
a272 1
        set CC_OPTS=$1
@


1.54
log
@make config script work with CUDA 3.x
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.1 or ./charm)'
d323 3
a325 3
  else if ( -d .rootdir/charm-6.1 ) then
    echo "Using Charm++ 6.1 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.1' >> Make.config
@


1.53
log
@notes on CUDA builds
@
text
@d393 1
d397 1
d401 5
@


1.52
log
@Pattern for MacOSX.
@
text
@d30 1
d32 1
a33 1
  echo '  --without-memopt (default)  --with-memopt'
@


1.51
log
@Update versions to NAMD 2.7b1 and Charm++ 6.1.
@
text
@d66 3
@


1.50
log
@More help on building, don't search home dir for charm.
@
text
@d11 1
a11 1
  echo '      (defaults to ./charm-6.1, ./charm-6.0.1, or ./charm)'
a321 3
  else if ( -d .rootdir/charm-6.0.1 ) then
    echo "Using Charm++ 6.0.1 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.0.1' >> Make.config
@


1.49
log
@Change i686/amd64 to x86/x86_64
@
text
@d9 1
a9 8
  echo 'Options (defaults are set in arch subdirectory):'
  echo '  --tcl-prefix <directory containing lib and include>'
  echo '  --with-tcl (default)  --without-tcl'
  echo '  --fftw-prefix <directory containing lib and include>'
  echo '  --with-fftw (default)  --without-fftw'
  echo '  --cuda-prefix <directory containing bin, lib, and include>'
  echo '  --without-cuda (default)  --with-cuda'
  echo '  --without-memopt (default)  --with-memopt'
d11 1
d13 1
d15 6
d29 4
d67 1
a67 1
    echo 'Possible options for <arch> on this machine: ' 
d71 3
a73 1
      echo 'ls arch/*.arch to see all known platforms'
d319 6
a324 3
  else if ( -d .rootdir/charm-6.0 ) then
    echo "Using Charm++ 6.0 build found in main build directory"
    echo 'CHARMBASE = .rootdir/charm-6.0' >> Make.config
a327 6
  else if ( -d $HOME/charm-6.0 ) then
    echo "Using Charm++ 6.0 build found in $HOME/charm-6.0"
    echo 'CHARMBASE = $(HOME)/charm-6.0' >> Make.config
  else if ( -d $HOME/charm ) then
    echo "Using Charm++ build found in $HOME/charm"
    echo 'CHARMBASE = $(HOME)/charm' >> Make.config
d458 1
a458 1
  echo "You are ready to do a make in directory $BUILD_LINK now."
@


1.48
log
@Clean up config script, remove Win32 cruft, and look harder for charm.
@
text
@d37 1
a37 1
            set ARCH_PAT = Linux-i686
d40 1
a40 1
            set ARCH_PAT = Linux-amd64
d44 1
d48 1
@


1.47
log
@Cleanup Win32 build system.
@
text
@d307 1
a307 7
  if ( $ARCH =~ XXXWin* ) then
   cat .rootdir/Make.charm >! Make.config
   cat .rootdir/arch/$ARCH.arch >> Make.config
  else
   echo include .rootdir/Make.charm >! Make.config
   echo include .rootdir/arch/$ARCH.arch >> Make.config
  endif
d313 3
d319 7
d327 3
d352 4
a355 16
  if ( $ARCH =~ XXXWin32* ) then
   cat .rootdir/arch/Win32.base >> Make.config
   if ( $use_tcl ) cat .rootdir/arch/Win32.tcl >> Make.config
   if ( $use_fftw ) cat .rootdir/arch/Win32.fftw >> Make.config
   if ( $use_cuda ) cat .rootdir/arch/Win32.cuda >> Make.config
  else if ( $ARCH =~ XXXWin64* ) then
   cat .rootdir/arch/Win64.base >> Make.config
   if ( $use_tcl ) cat .rootdir/arch/Win64.tcl >> Make.config
   if ( $use_fftw ) cat .rootdir/arch/Win64.fftw >> Make.config
   if ( $use_cuda ) cat .rootdir/arch/Win64.cuda >> Make.config
  else
   echo 'include .rootdir/arch/$(NAMD_ARCH).base' >> Make.config
   if ( $use_tcl ) echo 'include .rootdir/arch/$(NAMD_ARCH).tcl' >> Make.config
   if ( $use_fftw ) echo 'include .rootdir/arch/$(NAMD_ARCH).fftw' >> Make.config
   if ( $use_cuda ) echo 'include .rootdir/arch/$(NAMD_ARCH).cuda' >> Make.config
  endif
d423 2
a424 7
  if ( $ARCH =~ XXXWin* ) then
   cp .rootdir/Makefile ./Makefile
   cp .rootdir/Make.depends ./Make.depends
  else
   ln -s .rootdir/Makefile ./Makefile
   ln -s .rootdir/Make.depends ./Make.depends
  endif
@


1.46
log
@Add --with-memopt option to config.
@
text
@d307 1
a307 1
  if ( $ARCH =~ *Win* ) then
d345 1
a345 1
  if ( $ARCH =~ *Win32* ) then
d350 1
a350 1
  else if ( $ARCH =~ *Win64* ) then
d428 1
a428 1
  if ( $ARCH =~ *Win* ) then
a443 1
  echo "Linking src, plugins, and psfgen"
d445 1
d450 1
@


1.45
log
@CUDA support via --with-cuda --cuda-prefix <dir>
@
text
@d16 1
d85 1
d122 6
d216 4
d361 2
@


1.44
log
@fix illegal file inquiry -de, replace with equivalent -d
@
text
@d14 2
d83 1
d114 6
d193 15
d337 1
d342 1
d347 1
d371 12
@


1.43
log
@Smarted, more flexible config script.
@
text
@d280 1
a280 1
  else if ( -de .rootdir/charm-6.0 ) then
d283 1
a283 1
  else if ( -de $HOME/charm-6.0 ) then
d326 1
a326 1
    else if ( -de .rootdir/tcl/lib && -de .rootdir/tcl/include ) then
d329 1
a329 1
    else if ( -de $HOME/tcl/lib && -de $HOME/tcl/include ) then
d338 1
a338 1
    else if ( -de .rootdir/fftw/lib && -de .rootdir/fftw/include ) then
d341 1
a341 1
    else if ( -de $HOME/fftw/lib && -de $HOME/fftw/include ) then
@


1.42
log
@Make changes for 64-bit windows
@
text
@d5 1
a5 2
  echo 'Usage: config [debug] [tcl] [fftw] [<build_dir>/]<arch>[.comment] [suffix]'
  echo 'Environment variable NAMD_BUILD_BASE may point to scratch directory.'
d7 59
a65 2
  echo '<arch>: ' 
  ( cd arch ; ls -1 *.arch |sed -e 's/\.arch//' | egrep -v 'template' | pr -2 -t)
d77 10
a86 1
  if ($#argv < 1) goto syntax
a89 2
  else
    set use_debug = 0
d94 1
a94 1
    set use_tcl = 1
a95 2
  else
    set use_tcl = 0
d100 1
a100 1
    set use_fftw = 1
a101 2
  else
    set use_fftw = 0
d111 2
d115 2
a116 1
  set DIR=`pwd`;
d120 127
a246 1
  if ( ! -f arch/$ARCH.arch ) goto syntax
d249 1
d251 1
a251 1
    if ( -d $BUILD_DIR:t ) goto exists
d258 1
a258 1
  if ( -d $BUILD_DIR ) goto exists
d269 2
a270 1
  echo "Creating Makearch"
d272 2
a273 2
   cat .rootdir/Make.charm >! Makearch
   cat .rootdir/arch/$ARCH.arch >> Makearch
d275 2
a276 2
   echo include .rootdir/Make.charm >! Makearch
   echo include .rootdir/arch/$ARCH.arch >> Makearch
d278 28
a305 14
  echo 'CHARM = $(CHARMBASE)/$(CHARMARCH)' >> Makearch
  set ARCH_SUFFIX = ""
  if ( $ARCH =~ *-Scyld* ) set ARCH_SUFFIX = -Scyld
  if ( $ARCH =~ *-Clustermatic* ) set ARCH_SUFFIX = -Clustermatic
  if ( $ARCH =~ *-MPI* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-MPI
  if ( $ARCH =~ *-CMPI* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-CMPI
  if ( $ARCH =~ *-MPT* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-MPT
  if ( $ARCH =~ *-VMI* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-VMI
  if ( $ARCH =~ *-TCP* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-TCP
  if ( $ARCH =~ *-GM* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-GM
  if ( $ARCH =~ *-Elan* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-Elan
  if ($#argv > 0) then
    set ARCH_SUFFIX = -$1
    shift
d307 2
a308 1
  echo NAMD_PLATFORM = \$\(NAMD_ARCH\)${ARCH_SUFFIX} >> Makearch
d310 3
a312 3
   cat .rootdir/arch/Win32.base >> Makearch
   if ( $use_tcl ) cat .rootdir/arch/Win32.tcl >> Makearch
   if ( $use_fftw ) cat .rootdir/arch/Win32.fftw >> Makearch
d314 58
a371 14
   cat .rootdir/arch/Win64.base >> Makearch
   if ( $use_tcl ) cat .rootdir/arch/Win64.tcl >> Makearch
   if ( $use_fftw ) cat .rootdir/arch/Win64.fftw >> Makearch
  else
   echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).base' >> Makearch
   if ( $use_tcl ) echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).tcl' >> Makearch
   if ( $use_fftw ) echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).fftw' >> Makearch
   if ( $use_debug ) then
    echo 'CXXOPTS = -g' >> Makearch
    echo 'CXXTHREADOPTS = -g' >> Makearch
    echo 'CXXSIMPARAMOPTS = -g' >> Makearch
    echo 'CXXNOALIASOPTS = -g' >> Makearch
    echo 'COPTS = -g' >> Makearch
   endif
d373 1
d401 7
a407 18
  echo "Creating dpme2 and linking files"
  (cd $DIR/dpme2;find . -name CVS -prune -o -type d -print )|sed -e s@@.@@@@> temp.d
  (cd $DIR/dpme2;find . -name CVS -prune -o -type f -print )|sed -e s@@.@@@@> temp.f
  awk '{print "mkdir dpme2"$1;}' < temp.d > temp.m
  awk '{print "ln -s ../.rootdir dpme2"$1;}' < temp.d >> temp.m
  awk '{print "ln -s .rootdir/dpme2"$1" dpme2"$1;}' < temp.f > temp.l
  sh temp.m
  sh temp.l
  rm -f temp.d temp.f temp.m temp.l
  echo "Creating dpmta-2.6 and linking files"
  (cd $DIR/dpmta-2.6;find . -name CVS -prune -o -type d -print )|sed -e s@@.@@@@> temp.d
  (cd $DIR/dpmta-2.6;find . -name CVS -prune -o -type f -print )|sed -e s@@.@@@@> temp.f
  awk '{print "mkdir dpmta-2.6"$1;}' < temp.d > temp.m
  awk '{print "ln -s ../.rootdir dpmta-2.6"$1;}' < temp.d >> temp.m
  awk '{print "ln -s .rootdir/dpmta-2.6"$1" dpmta-2.6"$1;}' < temp.f > temp.l
  sh temp.m
  sh temp.l
  rm -f temp.d temp.f temp.m temp.l
@


1.41
log
@Add adaptive biasing force method from Chipot.
@
text
@d81 1
a81 1
  if ( $ARCH =~ *Win32* ) then
d108 4
d125 1
a125 1
  if ( $ARCH =~ *Win32* ) then
d132 1
a132 1
  if ( $ARCH =~ *Win32* ) then
@


1.40
log
@Include and build plugins with namd2 source, no longer separate library.
@
text
@d130 5
a134 2
   foreach f ( .rootdir/*.txt )
     perl -p -i -e 's/(?<!\r)\n$/\r\n/' < $f > $f:t
@


1.39
log
@Added MPT (SGI Message Passing Toolkit) to recognized options.
@
text
@d5 1
a5 1
  echo 'Usage: config [debug] [tcl] [fftw] [plugins] [<build_dir>/]<arch>[.comment] [suffix]'
d47 1
a47 1
    set use_plugins = 1
a48 2
  else
    set use_plugins = 0
a107 1
   if ( $use_plugins ) cat .rootdir/arch/Win32.plugins >> Makearch
a111 1
   if ( $use_plugins ) echo 'include .rootdir/arch/$(NAMD_ARCH)$(NAMD_SUBARCH).plugins' >> Makearch
d134 1
a134 1
  echo "Linking src and psfgen"
d137 1
d141 1
@


1.38
log
@Added explicit suffix to allow Clustermatic4, Scyld29, etc. without adding
additional arch definition files.
@
text
@d96 1
@


1.37
log
@Make CMPI a preserved arch flag.
@
text
@d5 1
a5 1
  echo 'Usage: config [debug] [tcl] [fftw] [plugins] [<build_dir>/]<arch>[.comment]'
a92 1
  if ( $ARCH =~ *-ScyldCD* ) set ARCH_SUFFIX = -ScyldCD
a93 1
  if ( $ARCH =~ *-Clustermatic4* ) set ARCH_SUFFIX = -Clustermatic4
d100 4
@


1.36
log
@Fixed NAMD_PLATFORM bug, added NAMD_SUBARCH variable.
@
text
@d97 1
@


1.35
log
@List platforms as two columns.
@
text
@d92 4
a95 3
  if ( $ARCH =~ *-ScyldCD* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-ScyldCD
  if ( $ARCH =~ *-Scyld* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-Scyld
  if ( $ARCH =~ *-Clustermatic* ) set ARCH_SUFFIX = ${ARCH_SUFFIX}-Clustermatic
d108 4
a111 4
   echo 'include .rootdir/arch/$(NAMD_ARCH).base' >> Makearch
   if ( $use_tcl ) echo 'include .rootdir/arch/$(NAMD_ARCH).tcl' >> Makearch
   if ( $use_fftw ) echo 'include .rootdir/arch/$(NAMD_ARCH).fftw' >> Makearch
   if ( $use_plugins ) echo 'include .rootdir/arch/$(NAMD_ARCH).plugins' >> Makearch
@


1.34
log
@added -TCP flags to NAMD_PLATFORM and rewrote flag appending code
@
text
@d9 1
a9 1
  ( cd arch ; ls -1 *.arch |sed -e 's/\.arch//' | egrep -v 'template' | pr -3 -t)
@


1.33
log
@Added -Elan flag.
@
text
@d91 10
a100 17
  if ( $ARCH =~ *-MPI* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-MPI' >> Makearch
  else if ( $ARCH =~ *-VMI* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-VMI' >> Makearch
  else if ( $ARCH =~ *-GM* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-GM' >> Makearch
  else if ( $ARCH =~ *-Elan* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-Elan' >> Makearch
  else if ( $ARCH =~ *-ScyldCD* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-ScyldCD' >> Makearch
  else if ( $ARCH =~ *-Scyld* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-Scyld' >> Makearch
  else if ( $ARCH =~ *-Clustermatic* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-Clustermatic' >> Makearch
  else
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)' >> Makearch
  endif
@


1.32
log
@Capitalize Clustermatic correctly.
@
text
@d97 2
@


1.31
log
@Added GM to special flags.
@
text
@d101 2
a102 2
  else if ( $ARCH =~ *-ClusterMatic* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-ClusterMatic' >> Makearch
@


1.30
log
@Recognize -ClusterMatic extension as different architecture.
@
text
@d95 2
@


1.29
log
@Added support for building with plugins.
@
text
@d99 2
@


1.28
log
@Moved psfgen to separate directory tree based on Justin's version.
@
text
@d5 1
a5 1
  echo 'Usage: config [debug] [tcl] [fftw] [<build_dir>/]<arch>[.comment]'
d46 8
d106 1
d111 1
@


1.27
log
@Added ability to add comments and use scratch directory for builds.
@
text
@d124 1
a124 1
  echo "Linking src"
d127 1
d130 1
@


1.26
log
@Added VMI as an architecture type (for NCSA clusters.)
@
text
@d5 2
a6 1
  echo 'Usage: config [debug] [tcl] [fftw] [<build_dir>/]<arch> '
d46 2
a47 1
  set ARCH=$1 ; shift
d50 17
a66 7
  if ( x$ARCH == x ) goto syntax
  if ( ! -f arch/$ARCH:t.arch ) goto syntax
  if ( -d $ARCH ) goto exists

  echo "Creating Directory: $ARCH"
  mkdir $ARCH
  cd $ARCH
d69 2
a70 1
  if ( $ARCH:t == $ARCH ) set ROOTDIR='..'
d75 1
a75 1
  if ( $ARCH:t =~ *Win32* ) then
d77 1
a77 1
   cat .rootdir/arch/$ARCH:t.arch >> Makearch
d80 1
a80 1
   echo include .rootdir/arch/$ARCH:t.arch >> Makearch
d83 1
a83 1
  if ( $ARCH:t =~ *-MPI* ) then
d85 1
a85 1
  else if ( $ARCH:t =~ *-VMI* ) then
d87 1
a87 1
  else if ( $ARCH:t =~ *-ScyldCD* ) then
d89 1
a89 1
  else if ( $ARCH:t =~ *-Scyld* ) then
d94 1
a94 1
  if ( $ARCH:t =~ *Win32* ) then
d106 1
d111 1
a111 1
  if ( $ARCH:t =~ *Win32* ) then
d118 1
a118 1
  if ( $ARCH:t =~ *Win32* ) then
d125 1
a125 1
  if ( $ARCH:t =~ *MSVC* ) then
d148 1
a148 1
  echo "You are ready to do a make in directory $ARCH now."
@


1.25
log
@Convert text files to DOS format.
@
text
@d72 2
@


1.24
log
@Fixes to build on Win32 under Cygwin.
@
text
@d102 6
@


1.23
log
@MSVC version config will copy the src instead of symbolic link.
@
text
@d95 7
a101 2
  ln -s .rootdir/Makefile ./Makefile
  ln -s .rootdir/Make.depends ./Make.depends
@


1.22
log
@changed pr -3t to "pr -3 -t" because it was not recorgnized on IBM SP.
@
text
@d98 5
a102 1
  ln -s .rootdir/src ./src
@


1.21
log
@Scyld fix.
@
text
@d8 1
a8 1
  ( cd arch ; ls -1 *.arch |sed -e 's/\.arch//' | egrep -v 'template' | pr -3t)
@


1.20
log
@Changes for Scyld versions.
@
text
@d72 2
a75 2
  else if ( $ARCH:t =~ *-ScyldCD* ) then
    echo 'NAMD_PLATFORM = $(NAMD_ARCH)-ScyldCD' >> Makearch
@


1.19
log
@format config help page.
@
text
@d8 1
a8 1
  ( cd arch ; ls -1 *.arch |sed -e 's/\.arch//' | egrep -v 'template' | pr -4t)
d72 4
@


1.18
log
@Config script now does Win32 (but runs on unix).
@
text
@d7 2
a8 1
  echo 'arch: ' `( cd arch ; ls -1 *.arch |sed -e 's/\.arch//' | egrep -v 'template' )`
@


1.17
log
@One Makefile now builds Win32 and unix.
@
text
@d61 7
a67 2
  echo include .rootdir/Make.charm >! Makearch
  echo include .rootdir/arch/$ARCH:t.arch >> Makearch
d74 9
a82 4
  echo 'include .rootdir/arch/$(NAMD_ARCH).base' >> Makearch
  if ( $use_tcl ) echo 'include .rootdir/arch/$(NAMD_ARCH).tcl' >> Makearch
  if ( $use_fftw ) echo 'include .rootdir/arch/$(NAMD_ARCH).fftw' >> Makearch
  if ( $use_debug ) then
d87 1
@


1.16
log
@Removed trying to link fftw directory.
@
text
@d80 1
@


1.15
log
@Incorporated AMPI version of FFTW.
@
text
@a81 9
  echo "Creating fftw and linking files"
  (cd $DIR/fftw;find . -name CVS -prune -o -type d -print )|sed -e s@@.@@@@> temp.d
  (cd $DIR/fftw;find . -name CVS -prune -o -type f -print )|sed -e s@@.@@@@> temp.f
  awk '{print "mkdir fftw"$1;}' < temp.d > temp.m
  awk '{print "ln -s ../.rootdir fftw"$1;}' < temp.d >> temp.m
  awk '{print "ln -s .rootdir/fftw"$1" fftw"$1;}' < temp.f > temp.l
  sh temp.m
  sh temp.l
  rm -f temp.d temp.f temp.m temp.l
@


1.14
log
@Makearch now includes Make.charm.
@
text
@d82 9
@


1.13
log
@Now using pvm lib in charm source.
@
text
@d61 2
a62 1
  echo include .rootdir/arch/$ARCH:t.arch >! Makearch
@


1.12
log
@Added 'debug' option to command line.
@
text
@a98 9
  echo "Creating pvm3 and linking files"
  (cd $DIR/pvm3 ; find . -name CVS -prune -o -type d -print )|sed -e s@@.@@@@> temp.d
  (cd $DIR/pvm3 ; find . -name CVS -prune -o -type f -print )|sed -e s@@.@@@@> temp.f
  awk '{print "mkdir pvm3"$1;}' < temp.d > temp.m
  awk '{print "ln -s ../.rootdir pvm3"$1;}' < temp.d >> temp.m
  awk '{print "ln -s .rootdir/pvm3"$1" pvm3"$1;}' < temp.f > temp.l
  sh temp.m
  sh temp.l
  rm -f temp.d temp.f temp.m temp.l
@


1.11
log
@Eliminated use of NAMD_CCS macro.
@
text
@d5 1
a5 1
  echo 'Usage: config [tcl] [fftw] [<build_dir>/]<arch> '
d20 8
d71 6
@


1.10
log
@Revamped config and make system.
@
text
@d5 1
a5 1
  echo 'Usage: config [tcl] [fftw] [ccs] [<build_dir>/]<arch> '
a35 8
  if ( $1 == ccs ) then
    set use_ccs = 1
    shift
  else
    set use_ccs = 0
  endif

  if ($#argv < 1) goto syntax
a62 1
  if ( $use_ccs ) echo 'CCS=-DNAMD_CCS' >> Makearch
@


1.9
log
@Eliminated many links.
@
text
@d5 1
a5 1
  echo 'Usage: config [build_dir/]<arch> '
d7 1
a7 1
  echo 'arch: ' `( cd arch ; ls -1 Makearch.* |sed -e 's/Makearch\.//' | egrep -v 'template' )`
d20 24
d48 1
a48 1
  if ( ! -f arch/Makearch.$ARCH:t ) goto syntax
d60 12
a71 2
  echo "Creating link: Makearch.$ARCH:t to Makearch"
  ln -s .rootdir/arch/Makearch.$ARCH:t ./Makearch
a73 2
  ln -s .rootdir/Make.depends ./Make.depends
  ln -s .rootdir/Make.charm ./Make.charm
@


1.8
log
@No longer lists CVS as a build architecture.
@
text
@d34 2
d37 1
a37 1
  ln -s $ROOTDIR/arch/Makearch.$ARCH:t ./Makearch
d39 5
a43 13
  ln -s $ROOTDIR/Makefile ./Makefile
  ln -s $ROOTDIR/Make.depends ./Make.depends
  ln -s $ROOTDIR/Make.charm ./Make.charm
  ln -s $ROOTDIR .rootdir
  echo "Creating src and linking files"
  (cd $DIR/src ; find . -name CVS -prune -o -type d -print )|sed -e s@@.@@@@> temp.d
  (cd $DIR/src ; find . -name CVS -prune -o -type f -print )|sed -e s@@.@@@@> temp.f
  awk '{print "mkdir src"$1;}' < temp.d > temp.m
  awk '{print "ln -s ../.rootdir src"$1;}' < temp.d >> temp.m
  awk '{print "ln -s .rootdir/src"$1" src"$1;}' < temp.f > temp.l
  sh temp.m
  sh temp.l
  rm -f temp.d temp.f temp.m temp.l
@


1.7
log
@Eliminated warnings about missing efence directory.
@
text
@d7 1
a7 1
  echo 'arch: ' `( cd arch ; ls -1 |sed -e 's/Makearch\.//' | egrep -v 'template' )`
@


1.6
log
@Now allows for builds outside of source directory.
@
text
@a76 9
  echo "Creating efence and linking files"
  (cd $DIR/efence;find . -name CVS -prune -o -type d -print )|sed -e s@@.@@@@> temp.d
  (cd $DIR/efence;find . -name CVS -prune -o -type f -print )|sed -e s@@.@@@@> temp.f
  awk '{print "mkdir efence"$1;}' < temp.d > temp.m
  awk '{print "ln -s ../.rootdir efence"$1;}' < temp.d >> temp.m
  awk '{print "ln -s .rootdir/efence"$1" efence"$1;}' < temp.f > temp.l
  sh temp.m
  sh temp.l
  rm -f temp.d temp.f temp.m temp.l
@


1.5
log
@Added Make.charm to specify common charm directory.
@
text
@d5 1
a5 1
  echo 'Usage: config <arch> '
d24 1
a24 1
  if ( ! -f arch/Makearch.$ARCH ) goto syntax
d31 5
a35 2
  echo "Creating link: Makearch.$ARCH to Makearch"
  ln -s ../arch/Makearch.$ARCH ./Makearch
d37 4
a40 4
  ln -s ../Makefile ./Makefile
  ln -s ../Make.depends ./Make.depends
  ln -s ../Make.charm ./Make.charm
  ln -s .. .rootdir
@


1.4
log
@Cleaned up building process.  Now automatically creates cifiles.
@
text
@d36 1
@


1.3
log
@Switched links from absolute to relative pathnames so directory can move.
@
text
@a81 2
  echo "Translating cifiles"
  make cifiles
@


1.2
log
@config now creates an architecture-specific working directory which links
all the needed files and subdirectories.
@
text
@d36 1
d41 2
a42 1
  awk '{print "ln -s '$DIR'/src"$1" src"$1;}' < temp.f > temp.l
d50 2
a51 1
  awk '{print "ln -s '$DIR'/dpme2"$1" dpme2"$1;}' < temp.f > temp.l
d59 2
a60 1
  awk '{print "ln -s '$DIR'/dpmta-2.6"$1" dpmta-2.6"$1;}' < temp.f > temp.l
d68 2
a69 1
  awk '{print "ln -s '$DIR'/pvm3"$1" pvm3"$1;}' < temp.f > temp.l
d77 2
a78 1
  awk '{print "ln -s '$DIR'/efence"$1" efence"$1;}' < temp.f > temp.l
@


1.1
log
@Restructured the Makefile and Makearch structure.
@
text
@d11 6
d21 1
d25 5
d32 47
a78 3
  rm -f Makearch
  ln -s arch/Makearch.$ARCH ./Makearch
  echo 'You are ready to do a make now.'
@
