转 from http://blog.sina.com.cn/s/blog_700ab4bd0102wxuy.html
Finally failed
- All packages: (1) HDF5, (2) CMAKE, (3) ALPS
- Some commends need sudo
- Director alps* need to put in Downloads director. Or it will cannot be installed
all steps are done at $HOME directory; except alps*
-
Install hdf5-dependent libriries // skiped in my installation //
1.1 zlib:
wget http://zlib.net/zlib-1.2.8.tar.gz | gunzip | tar xf # http://zlib.net/fossils/ mkdir -p $HOME/local/zlib cd zlib-1.2.8 sh configure --prefix=$HOME/local/zlib --libdir=$HOME/lib/ --includedir=$HOME/lib/ --sharedir=$HOME/share make make check make install
1.2 szip :
wget https://support.hdfgroup.org/ftp/lib-external/szip/2.1/src/szip-2.1.tar | tar xf mkdir -p $HOME/local/szip cd szip-2.1 sh configure --prefix=$HOME/local/szip --libdir=$HOME/lib/ --includedir=$HOME/lib/ --sharedstatedir=$HOME/share/ make make check make install
-
Install hdf5
2.1 download hdf5:wget https://support.hdfgroup.org/ftp/HDF5/current18/src/hdf5-1.8.18.tar
2.2 unpack
tar xf hdf5-1.8.18.tar
2.3 install it to $HOME/opt/; // Some times, sudo is needed in the following commends //
mkdir -p $HOME/opt cd hdf5-1.8.18/ sh configure --prefix=$HOME/opt/ --enable-fortran --enable-cxx --with-szlib=$HOME/local make make check make install make check-install
-
Install cmake
3.1 download cmakewget https://cmake.org/files/v3.7/cmake-3.7.0.tar.gz | gunzip | tar xf
3.2 install cmake
mkdir -p $HOME/cmake cd cmake sh bootstrap --prefix=$HOME/cmake/ make make install
-
Build ALPS
4.1 downloadwget http://alps.comp-phys.org/static/software/releases/alps-2.2.b4-src-with-boost.tar.gz | gunzip |tar xf
4.2 configure
cd $HOME/alps-2.2.b4-src-with-boost/ # Director alps\* need to put in **Downloads** director. Or it will cannot be installed CXX=g++ $HOME/cmake/bin/cmake -D BLAS_LIBRARY=/usr/lib/libblas.so. -D LAPACK_LIBRARY=/usr/lib/liblapack.so -D CMAKE_INSTALL_PREFIX=$HOME/ALPS -D LAPACK_64_BIT=ON -D HDF5_LIBRARIES=$HOME/opt/lib/libhdf5.so. -D HDF5_INCLUDE_DIR=$HOME/opt/include/ $HOME/alps-2.2.b4-src-with-boost/alps/ # Here CMAKE_INSTALL_PREFIX might be $HOME/Downloads/ALPS to install alps in Downloads director. Similarly, the last commend $HOME/alps-2.2.b4-src-with-boost/alps/ might also be $HOME/alps-2.2.b4-src-with-boost/alps/ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opt/lib
4.3 make (it takes 2h)
make # finally failed in this step with error: make[2]: *** No rule to make target `/home/yfren/opt/lib/libhdf5.so.', needed by `src/alps /libalps.so.2.2.b4'. Stop. make[1]: *** [src/alps/CMakeFiles/alps.dir/all] Error 2 make: *** [all] Error 2 make test make install
-
Job script file
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/opt/lib $HOME/alps/bin/pyalps Your_Code.py
网友评论