1775 |
|
|
1776 |
|
|
1777 |
printf "\n=== Setting defaults ===\n" |
printf "\n=== Setting defaults ===\n" |
1778 |
printf " Adding MODS directories: " |
printf " Adding MODS directories: " |
1779 |
|
MPI_LNKF= |
1780 |
for d in $MODS ; do |
for d in $MODS ; do |
1781 |
if test ! -d $d ; then |
if test ! -d $d ; then |
1782 |
echo |
echo |
1783 |
echo "Error: MODS directory \"$d\" not found!" |
echo "Error: MODS directory \"$d\" not found!" |
1784 |
exit 1 |
exit 1 |
1785 |
else |
else |
1786 |
printf " $d" |
printf "$d " |
1787 |
SOURCEDIRS="$SOURCEDIRS $d" |
SOURCEDIRS="$SOURCEDIRS $d" |
1788 |
INCLUDEDIRS="$INCLUDEDIRS $d" |
INCLUDEDIRS="$INCLUDEDIRS $d" |
1789 |
|
#------------------------------------------------------- |
1790 |
|
# Put special links so that MPI specific files are used |
1791 |
|
MPI_FILES=`(cd $d ; find . -name "*_mpi" -print)` |
1792 |
|
for i in $MPI_FILES ; do |
1793 |
|
ii=`echo $i | sed 's:^\./::'` |
1794 |
|
name=`echo $ii | sed 's:_mpi::' ` |
1795 |
|
if test "x$MPI" = x ; then |
1796 |
|
# NO: We undo an _mpi symbolically linked file |
1797 |
|
if test -L $name ; then |
1798 |
|
cmp $name "$d/$ii" > /dev/null 2>&1 |
1799 |
|
RETVAL=$? |
1800 |
|
if test "x$RETVAL" = x0 ; then |
1801 |
|
printf "Un-linking $name ; " |
1802 |
|
rm -f $name |
1803 |
|
fi |
1804 |
|
fi |
1805 |
|
else |
1806 |
|
# YES: We symbolically link this file (with conditions if already there) |
1807 |
|
if test -L $name ; then |
1808 |
|
cmp $d/$ii $name > /dev/null 2>&1 |
1809 |
|
RETVAL=$? |
1810 |
|
yy=0 ; |
1811 |
|
for xx in $MPI_LNKF ; do if test $xx = $name ; then yy=1 ; fi ; done |
1812 |
|
if test "x$RETVAL" != x0 -a $yy = 0 ; then |
1813 |
|
# remove sym-link if different and has not just been linked |
1814 |
|
printf "Un-link + " |
1815 |
|
rm -f $name |
1816 |
|
fi |
1817 |
|
if test "x$RETVAL" = x0 ; then |
1818 |
|
# if identical, keep sym-link and keep record of it |
1819 |
|
MPI_LNKF="$MPI_LNKF $name" |
1820 |
|
fi |
1821 |
|
fi |
1822 |
|
if ! test -f $name ; then |
1823 |
|
# make sym-link and keep record of it |
1824 |
|
printf "Linking $ii to $name ; " |
1825 |
|
ln -sf $d/$ii $name |
1826 |
|
MPI_LNKF="$MPI_LNKF $name" |
1827 |
|
fi |
1828 |
|
fi |
1829 |
|
done |
1830 |
|
#------------------------------------------------------- |
1831 |
fi |
fi |
1832 |
done |
done |
1833 |
echo |
echo |
1834 |
|
#echo "MPI_LNKF='$MPI_LNKF'" |
1835 |
|
|
1836 |
if test "x${PLATFORM}" = x ; then |
if test "x${PLATFORM}" = x ; then |
1837 |
PLATFORM=$p_PLATFORM |
PLATFORM=$p_PLATFORM |
2771 |
#=== Automatic Differentiation Rules === |
#=== Automatic Differentiation Rules === |
2772 |
#=== for TAMC/TAF ====================== |
#=== for TAMC/TAF ====================== |
2773 |
|
|
2774 |
if test "x$OPENAD" == x ; then |
if test "x$OPENAD" = x ; then |
2775 |
|
|
2776 |
cat >>$MAKEFILE <<EOF |
cat >>$MAKEFILE <<EOF |
2777 |
|
|