SIESTA-3.1
Webpage
http://www.icmab.es/dmmis/leem/siesta/

Version3.1

Tools for CompilingIntel Composer XE 2011 sp1.8.273
Intel MPI 4.0.2.003

Necessary Files for Compiling
netcdf-4.2.tar.gz
netcdf-fortran-4.2.tar.gz
siesta-3.1.tgz

Procedure of Compiling#!/bin/csh -f
umask 022
set file_netcdf=/home/users/${USER}/build/siesta31/netcdf-4.2.tar.gz
set file_netcdf_f=/home/users/${USER}/build/siesta31/netcdf-fortran-4.2.tar.gz
set file_siesta=/home/users/${USER}/build/siesta31/siesta-3.1.tgz
set work=/work/users/${USER}#---------------------------------------------------------------------------setenv FC ifort
setenv FCFLAGS "-O3 -xHost"setenv CC icc
setenv CFLAGS "-O3 -xHost"setenv MPIFC mpiifort#---------------------------------------------------------------------------cd ${work}
if (-d netcdf-4.2) then
mv netcdf-4.2 netcdf-erase
rm -rf netcdf-erase &endifrm -rf ${work}/netcdf
tar xzf ${file_netcdf}
cd netcdf-4.2./configure --prefix=${work}/netcdf --disable-netcdf-4
make
make install#---------------------------------------------------------------------------cd ${work}
setenv CPPFLAGS "-I/work/users/ms0/netcdf/include"
if (-d netcdf-fortran-4.2) then
mv netcdf-fortran-4.2 netcdf-fortran-erase
rm -rf netcdf-fortran-erase &endif
tar xzf ${file_netcdf_f}
cd netcdf-fortran-4.2./configure --prefix=${work}/netcdf
makemake install
unsetenv CPPFLAGS#---------------------------------------------------------------------------cd ${work}
if (-d siesta-3.1) thenmv siesta-3.1 siesta-erase
rm -rf siesta-erase &endif

tar xzf ${file_siesta}
patch -p0 <<_PATCH--- siesta-3.1-single/Src/configure 2011-08-26 23:16:50.000000000 +0900+++ siesta-3.1/Src/configure 2012-06-25 16:20:02.561207000 +0900@@ -5104,7 +5104,9 @@echo "\$as_me:\$LINENO: checking for MPI_Init" >&5echo \$ECHO_N "checking for MPI_Init... \$ECHO_C" >&6cat >conftest.\$ac_ext <<_ACEOF+
program main
call MPI_Init+
end_ACEOF
rm -f conftest.\$ac_objext conftest\$ac_exeext
if { (eval echo "\$as_me:\$LINENO: \"\$ac_link\"") >&5@@ -6000,7 +6002,7 @@withval="\$with_netcdf"
fi;-if test x\$with_netcdf != xno; then
+if test "x\$with_netcdf" != xno; thentw_netcdf_ok=noac_ext=\${FC_SRCEXT-f}@@ -6071,7 +6073,7 @@if test \$tw_netcdf_ok = yes; then
DEFS="\$DEFS CDF";NETCDF_INTERFACE="libnetcdf_f90.a"else- NETCDF_LIBS="";tw_netcdf_ok=no;if test ! -z \$with_netcdf; then { { echo "\$as_me:\$LINENO: error: Could not find
NetCDF library." >&5+ NETCDF_LIBS="";tw_netcdf_ok=no;if test ! -z "\$with_netcdf"; then { { echo "\$as_me:\$LINENO: error: Could not find
NetCDF library." >&5echo "\$as_me: error: Could not find NetCDF library." >&2;}{ (exit 1); exit 1; }; }; fifi_PATCH
cd siesta-3.1/Objsh ../Src/obj_setup.sh../Src/configure --enable-mpi --with-netcdf="-I${work}/netcdf/include ${work}/netcdf/lib/libnetcdff.a${work}/netcdf/lib/libnetcdf.a -lcurl" --with-blacs="-L/opt/intel/composer_xe_2011_sp1/mkl/lib/intel64 lmkl_blacs_intelmpi_lp64 -mkl" --with-scalapack="-L/opt/intel/composer_xe_2011_sp1/mkl/lib/intel64 -lmkl_scalapack_lp64-lmkl_blacs_intelmpi_lp64 -mkl" --with-blas="-mkl" --with-lapack="-mkl"
echo "NETCDF_INCFLAGS=-I/work/users/${USER}/netcdf/include" >> arch.make# Don't use option "-j N" to avoid compilation error.
make