我要评分
获取效率
正确性
完整性
易理解

Compilation and Installation

Procedure

  1. Go to the installation package directory.
    cd /path/to/duns
  2. Decompress the installation package.
    tar xvf duns-2.7.1-src.tar.bz2
    cd duns-2.7.1
  3. Create an installation directory for future use.
    export DUNSARCH=linux
    export DUNSPATH27=`pwd`
    export PATH=$DUNSPATH27/util:$PATH
  4. Modify the related file.
    sed -i '10s/g77/gfortran/' makesystem/Makesystem_linux
    sed -i "28s#.*#SYSLIBS   = -L/path/to/gcc/9.3.1/lib64 -Wl,-Bdynamic -lgcc_s -lm -lgfortran#" makesystem/Makesystem_linux

    Replace /path/to/gcc/9.3.1/lib64 in the preceding example command with the actual lib64 directory where GCC is installed.

    sed -i '29s#.*#GRAFLIBS  = -lmbgrafic -lgrafic -L/usr/lib -Wl,-Bdynamic -lX11#' makesystem/Makesystem_linux
    sed -i 's/getline/getline1/g' `grep getline -rl --include="*" src/*`
  5. Perform the compilation and installation.
    cd lib
    make
    make install
  6. Perform a 3D program.
    cd ..
    dunssource 3d all
    cd duns-3d-all
    line=`expr $(grep -n -m 1 "^c .*" assemble.f |awk -F: '{print $1}') - 1`
    sed -i "1,${line}d" *.f *.c include/*
    make -j
  7. Check whether duns.e and dunsplot.e are generated.
    ls

    If the following information is displayed, the generation is successful.