Win7: 
-Be sure to use an account name that does not have spaces in it, as this could be an 
issue with Cygwin. 


Installing Matlab: 

-Make sure that when you install Matlab, you choose C:\MATLAB\R2011b as directory 
for the installation. Failing to do so could preclude the sdk compiler from 
finding the Matlab header files. 

-Also pay attention to what version of Matlab you are using, 32 or 64 bits, 
as this will need to be reflected onto the sdk compiler settings. 



Cygwin: 

-You will need cygwin installed on your Windows platform to manage the compilation. 
The compilation will still be carried out by the windows sdk compiler, but the 
environment driving the compilation will be the unix-like cygwin. When you download
cygwin, make sure that you install it in the C:\Cygwin directory. 

-You will find the cygwin setup executable on the www.cygwin.com webpage. Here is a link
to it: http://cygwin.com/setup.exe. Download this file to C:\Cygwin and be sure to reuse 
it when you want to update your current cygwin installation. Do not download setup.exe 
twice! 

- You will need the following packages downloaded to carry out the compilation of ISSM
 successfully, so be sure to include them in your cygwin install: 

subversion
autotools
automake
vim (or any other editor)
patchutils
make: The GNU version of the 'make' utility
automake 1.11 and automake:Wrapper scripts
autoconf
python: Python language interpreter
unzip



Compiler: 

You need Visual Studio Express 2010 for C++, which you can find here: 
http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express

you will also need the Windows SDK 7.1 compiler, which you can find at the following link
http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=8279
This compiler is compatible with Matlab, as detailed in the following webpage: 
http://www.mathworks.com/support/compilers/R2011b/win64.html#n2

Be careful not to download the sdk before Visual Studio Express, as this could lead to 
environment setup issues. 


Before you do anything related to ISSM! You have to capture the settings of your compiler.
This is by far the most tricky part. 

Follow Figure 2 for more details. You have to launch sdk 7.1 command prompt, go to the 
cygwin directory and fire up Cygwin by executing Cygwin.bat. Once this is done,dump the 
results of the export command onto a file, called  sdk7.1.win7.64.sh 
you will need this file later in the ISSM install. 



Downloading issm: 

Download issm onto the C:\ directory. Do not download it in your Documents or Desktop
folder. 

In cygwin: 
cd /cygdrive/c/
svn co http://issm.ess.uci.edi/svn/issm/issm

Once you download it, in your home directory, edit .bashrc: 
and add the following lines:
export ISSM_DIR=/cygdrive/c/issm
export ISSM_TIER=$ISSM_DIR/trunk-jpl
export ISSM_ARCH=cygwin-intel

#source
source $ISSM_TIER/etc/environment.sh


Getting the cl.exe compiler to work: 
before trying to compile the externalpackages, you need to be sure that your compiler cl.exe 
(the sdk compiler)works. To make sure, create a simple hello world file: 

hello.cpp

#include <stdio.h>
int main(){
printf("%s\n","hello");
return 1;
}

and try to compile it by doing: 
cl hello.cpp

If this does not work, do not go any further! The settings of your cl compiler are found 
in externalpackages/windows/configs/ 
if there is a significant different between you sdk7.1.win7.64.sh file (see above section Compiler) 
and the file that is being sourced in the windows/configs directory, place your new file in 
the configs directory. Relaunch bash, and try to run cl hello.cpp again. Beware, you might 
have to erase some lines in your file, as cygwin might not like some of the stuff that your 
Windows platform is trying to define. 




Once the cl.exe compiler works, you can start installing the following packages: 
petsc   metis triangle and cccl

For petsc, use install-3.1-win7.sh 
For metis, use install-4.0-win7.sh
For cccl, use install-win7.sh
For triangle, use install-win7.sh

Once these externlapackages have been compiled, you can compile issm: 

./scripts/autoremakererun.sh
./configs/config-win7-64.sh
make install

This should compile both parallel and serial versions of ISSM. Beware though, the parallel
version cannot be run on multi-core platforms yet! We are actively working on it. 





One note about 32 vs 64 bit compile: 
depending on your Matlab version, you will need to do a 32 or 64 bit compile. The only 
difference between both compiles is the setup of the cl.exe compiler. For ease of use, 
you will find in externalpackages/windows/windows_environment.sh a switch to go from 32 
to 64 bit compile. When you type cl.exe \help at the command prompt, cl.exe should report 
what system it is compiling for. 
Beware, switching 32 to 64 or vice-versa implies recompiling everything from scratch. 






 