Changeset 6880


Ignore:
Timestamp:
01/03/11 09:35:54 (14 years ago)
Author:
Mathieu Morlighem
Message:

New install.sh for petsc3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/externalpackages/petsc/install.sh

    r6863 r6880  
    33#Get number of cpus on current platform
    44NUMCPUS=$1;
    5 
    6 #available versions
    7 #2.3.2-p3
    8 #3.0.0-p11
    95
    106#version of petsc?
     
    139
    1410#Some cleanup
    15 rm -rf install petsc-$version
     11rm -rf install petsc-$version src
    1612
    1713#Create src and install directories
    18 mkdir install
     14mkdir install src
    1915
    2016#Untar
    2117tar -zxvf  petsc-$version.tar.gz
    2218
    23 #Move petsc to install directory
    24 rm -rf install/*
    25 mv petsc-$version/* install/
    26 rm -rf petsc-$version
     19#Move petsc to install directory or src depending on the version
     20if [[ $version == "3.1-p7" ]]
     21then   
     22        mv petsc-$version/* src/
     23        rm -rf petsc-$version
     24        cd src
     25else
     26        mv petsc-$version/* install/
     27        rm -rf petsc-$version
     28        cd install
     29fi
    2730
    28 #Configure petsc
    29 cd install
     31#configure
    3032../configure.sh
    31 
    32 #symlink some missing stuff.
    33 if [[ $version == "3.0.0-p11" ]]
    34 then   
    35         cd conf
    36         ln -s ../$ISSM_ARCH/conf/petscrules petscrules
    37         ln -s ../$ISSM_ARCH/conf/petscvariables petscvariables
    38         cd ../
    39         cd include
    40         ln -s ../$ISSM_ARCH/include/petscconf.h petscconf.h
    41         cd ../
    42 fi
    4333
    4434#Compile petsc and install it
Note: See TracChangeset for help on using the changeset viewer.