使用Intel编译器编译OpenFOAM

  1. $WM_PROJECT_DIR/etc/bashrc中的编译器选项选为设置为Icc:

    export WM_COMPILER=Icc
    
  2. $WM_PROJECT_DIR/etc/bashrc中的MPI选项设置为INTELMPI:

    export WM_MPILIB=INTELMPI
    
  3. ~/.bashrc中添加Intel编译器安装路径

    例如:

    # Intel Parallel Studio
    export I_MPI_FABRICS=dapl
    source /opt/intel/composer_xe_2013_sp1.0.080/bin/compilervars.sh intel64
    source /opt/intel/impi/4.1.1.036/intel64/bin/mpivars.sh
    #export I_MPI_MIC=enable
    export MPI_ROOT=/opt/intel/impi/4.1.1.036
    

    或者:

    # Intel Parallel Studio
    # export I_MPI_FABRICS=dapl
    export I_MPI_PIN=0
    export I_MPI_PIN_DOMAIN=omp
    source /opt/intel/bin/compilervars.sh intel64
    source /opt/intel/impi/2019.6.163/intel64/bin/mpivars.sh
    #export I_MPI_MIC=enable
    export MPI_ROOT=/opt/intel/impi/2019.6.163
    

    这里需要根据Intel编译器的不同版本来自行修改安装路径名。

你可能感兴趣的:(OpenFOAM,#,OpenFOAM技术总结,OpenFOAM)