代码拉取完成,页面将自动刷新
#!/bin/sh
echo "******************************************";
echo "* Discontinuous galerkin setup. *";
echo "******************************************";
echo
echo "[1] Get depedencies and external libraries.";
module load cmake/3.11.1
module load gcc/4.9.2
dpkg -s cmake > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "mCmake found.";
else
echo "Cmake not found, installing...";
apt-get -y install cmake;
echo "Cmake installed.";
fi
dpkg -s g++ > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "G++ found.";
else
echo "G++ not found, installing...";
apt-get -y install g++;
export CC=gcc;
export CXX=g++;
echo "G++ installed.";
fi
dpkg -s gfortran > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "Gfortran found.";
else
echo "Gfortran not found, installing...";
apt-get -y install gfortran;
echo "Gfortran installed.";
fi
dpkg -s libblas-dev liblapack-dev > /dev/null 2>&1;
if [ $? -eq 0 ]; then
echo "Lapack/Blas found.";
else
echo "Lapack/Blas not found, installing...";
apt-get -y install libblas-dev liblapack-dev;
echo "Lapack/Blas installed.";
fi
if [ ! -d "gmsh-4.1.4-Linux64-sdk" ]; then
echo "Gmsh not found, installing...";
wget http://gmsh.info/bin/Linux/gmsh-4.1.4-Linux64-sdk.tgz
tar -xf gmsh-4.1.4-Linux64-sdk.tgz
rm -rf gmsh-4.1.4-Linux64-sdk.tgz
echo "Gmsh installed."
else
echo "Gmsh found.";
fi
cd gmsh-4.1.4-Linux64-sdk/
export FC=gfortran
export PATH=${PWD}/bin:${PWD}/lib:${PATH}
export INCLUDE=${PWD}/include:${INCLUDE}
export LIB=${PWD}/lib:${LIB}
export PYTHONPATH=${PWD}/lib:${PYTHONPATH}
export DYLD_LIBRARY_PATH=${PWD}/lib:${DYLD_LIBRARY_PATH}
cd ../
if [ ! -d "eigen-eigen-323c052e1731" ]; then
echo "Eigen not found, installing...";
wget http://bitbucket.org/eigen/eigen/get/3.3.7.tar.gz
tar -xf 3.3.7.tar.gz
rm -rf 3.3.7.tar.gz
echo "Eigen installed."
else
echo "Eigen found."
fi
cd eigen-eigen-323c052e1731/
export INCLUDE=${PWD}:${INCLUDE}
cd ../
echo "[2] Build sources.";
rm -rf build/
mkdir build
cd build/
cmake ../ -DCMAKE_BUILD_TYPE=Release -G "Unix Makefiles"
make -j4
if [ $? -eq 0 ]; then
echo "[end] Everything went successfully.";
else
echo "[end] Error!";
fi
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。