********>Bugfix 2:
Author: Scott Brozell
Date: 04/12/2004

Programs: sander, sander.LES

Description: the configure option -scali does not produce MPI executables;
             the combination of -static and -scali does not work;
             notification of an undefined SCALI_HOME environment variable
             could be improved.

Fix:  apply the following patch to amber8/src/configure

------------------------------------------------------------------------------
*** configure  12 Mar 2004 00:19:15 -0000 1.224
--- configure  12 Apr 2004 22:19:36 -0000
***************
*** 282,287 ****
--- 282,289 ----
      scali_root='/opt/scali'
      if [ -z "$SCALI_HOME" ] ; then
          if [ -d $scali_root ]; then
+            echo "Warning: the SCALI_HOME environment variable is not defined !"
+            SCALI_HOME="$scali_root"
             echo "Caution: Setting SCALI_HOME to $scali_root (guessed)"
          else
              PAR="SCALI"
***************
*** 289,296 ****
              EXAMPLE="/usr/local/scali"
              par_error
          fi
      fi
!     if [ ! -d $SCALI_HOME/lib ] ||[ ! -d $SCALI_HOME/include ]
          then echo " missing dirs"; missingfiles ; fi
      if [ ! -f $SCALI_HOME/include/mpif.h ] ;
          then echo " missing include"; missingfiles ; fi
--- 291,301 ----
              EXAMPLE="/usr/local/scali"
              par_error
          fi
+     else
+         echo "SCALI_HOME is set to $SCALI_HOME"
      fi
! 
!     if [ ! -d $SCALI_HOME/lib ] || [ ! -d $SCALI_HOME/include ]
          then echo " missing dirs"; missingfiles ; fi
      if [ ! -f $SCALI_HOME/include/mpif.h ] ;
          then echo " missing include"; missingfiles ; fi
***************
*** 300,308 ****
              then echo " missing libs"; missingfiles; fi
      done
  
!     echo " SCALI_HOME is set to $SCALI_HOME"
!     loadlib="$loadlib -lm -L$SCALI_HOME/lib -lfmpi -lmpi -lscasci -lscirtl"
!     fppflags="-I$SCALI_HOME/include $fppflags"
      ;;
  
  none) # Nothing to do
--- 305,321 ----
              then echo " missing libs"; missingfiles; fi
      done
  
!     if [ $static = "yes" ]; then
!         # scali/doc/ScaMPI/FAQ item 20 (Version: 1.20 Date: Oct 15th 2001):
!         #loadlib="$loadlib -L$SCALI_HOME/lib -lfmpi -lmpi -Wl,-Bdynamic -lpthread -ldl -Wl,-Bstatic"
!         # builds but does not execute. 
!         # Neither does static linking of -lpthread -ldl.
!         echo "Error: static linking with SCALI is not supported !"
!         exit 1
!     else
!         loadlib="$loadlib -L$SCALI_HOME/lib -lfmpi -lmpi"
!     fi
!     fppflags="-I$SCALI_HOME/include $fppflags -DMPI"
      ;;
  
  none) # Nothing to do
------------------------------------------------------------------------------

Temporary workarounds: use a different MPI implementation.