Index: /issm/trunk/externalpackages/adic/install.sh
===================================================================
--- /issm/trunk/externalpackages/adic/install.sh	(revision 9707)
+++ /issm/trunk/externalpackages/adic/install.sh	(revision 9707)
@@ -0,0 +1,33 @@
+#!/bin/bash
+
+#get number of CPUS
+NUMCPUS=$1;
+
+
+#Erase install
+rm -rf source build install
+
+#Download code
+hg clone http://mercurial.mcs.anl.gov/ad/ADIC -r 631 source
+
+#Then update to -r 631
+cd source 
+hg update -r 631
+
+cd source
+./autogen.sh
+./aclocal
+cd ..
+
+mkdir build
+cd build
+../source/configure --with-rose=$ISSM_TIER/externalpackages/rose/install \
+					--with-openanalysis=$ISSM_TIER/externalpackages/openanalysis/openanalysis/x86_64-Linux \
+					--with-boost=$ISSM_TIER/externalpackages/boost/install \
+					--with-xerces=$ISSM_TIER/externalpackages/xerces/src \
+					--with-xaifbooster=$ISSM_TIER/externalpackages/xaifbooster/xaifBooster \
+					--with-colpack=$ISSM_TIER/externalpackages/colpack/install\
+					--prefix=$ISSM_TIER/externalpackages/adic/install 
+
+make  -j $NUMCPUS
+make -j $NUMCPUS install
Index: /issm/trunk/externalpackages/adic/tests/notes
===================================================================
--- /issm/trunk/externalpackages/adic/tests/notes	(revision 9707)
+++ /issm/trunk/externalpackages/adic/tests/notes	(revision 9707)
@@ -0,0 +1,143 @@
+mini1.c is:
+7:37 PM
+#include <math.h>
+
+void mini1(double *y, double *x)
+{
+ int i;
+  for (i = 0; i < 2; i=i+1) {
+    y[i] = x[i] + sin(x[i]*x[i]);
+	 }
+	 }
+	 Eric Larour 7:37 PM 
+	 ok
+	 Sri Hari Krishna Narayanan 7:37 PM 
+	 If you cat any of  mini1_grad_length.ad.c mini1_dense_forward.ad.c mini1_sparse_forward.ad.c
+	 7:37 PM
+	 You should be able to see the forward mode output
+	 Eric Larour 7:38 PM 
+	 ok
+	 Sri Hari Krishna Narayanan 7:38 PM 
+	 First the makefile compiles mini1_grad_length.ad.c with a runtime library to estimate the number of columns in the Jacobian.
+	 Eric Larour 7:39 PM 
+	 ok, makes sense
+	 Sri Hari Krishna Narayanan 7:39 PM 
+	 That generates the output : ADIC_GRADVEC_LENGTH 2
+	 Eric Larour 7:39 PM 
+	 where?
+	 7:39 PM
+	 ok, sorry, got it
+	 Sri Hari Krishna Narayanan 7:40 PM 
+	 The value is also written to : runtime_dense/adic_gradvec_length.h
+	 Eric Larour 7:40 PM 
+	 where is the main for this?
+	 7:40 PM
+	 oh, it creates a .h directly
+	 Sri Hari Krishna Narayanan 7:40 PM 
+	 mini1_driver.c
+	 7:40 PM
+	 yes.
+	 7:40 PM
+	 The runtime library takes care of that
+	 7:40 PM
+	 There is alot or #defined compilation going on
+	 Eric Larour 7:41 PM 
+	 wraps around mini1_forward_array.exe ?
+	 Sri Hari Krishna Narayanan 7:41 PM 
+	 /*intermediary: */ creates mini1_grad_length.exe
+	 Eric Larour 7:41 PM 
+	 Isn't that the Makefile? what is the runtime library ?
+	 7:42 PM
+	 ok, the Makefile launches the runtime library
+	 Sri Hari Krishna Narayanan 7:42 PM 
+	 Makefile copies versions of the runtime library (bunch of macros in most cases)
+	 Eric Larour 7:42 PM 
+	 what is the name of the runtime library?
+	 Sri Hari Krishna Narayanan 7:43 PM 
+	 form $adicsrc/runtime/
+	 7:43 PM
+	 There are multiple versions
+	 Eric Larour 7:44 PM 
+	 ah, I see the grad_length dir
+	 7:44 PM
+	 is all that stuff compiled into adic2?
+	 Sri Hari Krishna Narayanan 7:44 PM 
+	 The one used to estimate the grad_lengh is :  $adicinstall/grad_length
+	 7:44 PM
+	 yes
+	 Eric Larour 7:44 PM 
+	 ok, makes sense
+	 Sri Hari Krishna Narayanan 7:45 PM 
+	 For the next step though
+	 7:45 PM
+	 the 'dense' case
+	 7:45 PM
+	 the runtime library cannot be precompiled
+	 7:45 PM
+	 the .h file has been created in the previous step
+	 7:46 PM
+	 So we copy the runtime/dense to the local directory
+	 Eric Larour 7:46 PM 
+	 because we can't guess the size of the gradient right?
+	 Sri Hari Krishna Narayanan 7:46 PM 
+	 and copy the .h into it
+	 7:46 PM
+	 correct
+	 Eric Larour 7:46 PM 
+	 nice
+	 Sri Hari Krishna Narayanan 7:46 PM 
+	 Then we compile it and create a .la file
+	 7:46 PM
+	 which is then linked to create mini1_dense_forward.exe
+	 7:47 PM
+	 When we run this, it also happens to run the analyticla derivates (the driver is built this way)
+	 7:47 PM
+	 Also diveded differences
+	 7:47 PM
+	 So you get the output:
+	 7:47 PM
+	 Analytic result is:       [1.968912]
+	 Analytic result is:     [1.968912]  
+	 DD result is:           [1.968997]      error {-8.45e-05}
+	 DD result is:           [1.968997]      error {-8.45e-05}
+	 AD result is:           [1.968912]      error {0.000000}
+	 AD result is:           [1.968912]      error {0.000000}
+	 7:48 PM
+	 The next step is to detect sparsity in the Jacobian and possibly compress it using Colpack (create a seed matrix).
+	 7:49 PM
+	 The gradient computation takes place on the compressed matrix.
+	 7:49 PM
+	 The output : ADIC_GRADVEC_LENGTH 1
+	 7:49 PM
+	 means that the seed matrix  has one column.
+	 7:50 PM
+	 After the calculation of the elements of the compressed matrix, it is then extracted to form the 'full Jacobian' (sorry if these tems are inexact).
+	 7:51 PM
+	 The extracted output is then printed out:
+	 7:51 PM
+	 AD result is:           [1.968912]
+	 AD result is:           [1.968912]
+	 7:51 PM
+	 And we are done!
+	 Eric Larour 7:51 PM 
+	 This is a lot for me to take in at once  I'm going to have to look through the makefile,
+	 7:51 PM
+	 and your explanations, and figure it out
+	 Sri Hari Krishna Narayanan 7:51 PM 
+	 Sure.
+	 Eric Larour 7:52 PM 
+	 I'll get back to you as soon as I have injested all of this
+	 Sri Hari Krishna Narayanan 7:52 PM 
+	 No problem.
+	 Eric Larour 7:52 PM 
+	 I'll probably have a million questions 
+	 Sri Hari Krishna Narayanan 7:52 PM 
+	 This is an exhaustive test
+	 7:52 PM
+	 FOr m ost purposes, we wil not need all of this
+	 Eric Larour 7:52 PM 
+	 this is really nice, I'm pretty exited !
+	 Sri Hari Krishna Narayanan 7:52 PM 
+	 Jean belives for example the the grad_length version is pointless. I find it interesting though.
+	 7:53 PM
+	 Okay. There are more interesting examples we can try
