-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.xml
80 lines (38 loc) · 32.9 KB
/
search.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<?xml version="1.0" encoding="utf-8"?>
<search>
<entry>
<title>NEMO海洋模型的安装、搭建与运行</title>
<link href="/2024/04/02/nemo-hai-yang-mo-xing-de-an-zhuang-da-jian-yu-yun-xing/"/>
<url>/2024/04/02/nemo-hai-yang-mo-xing-de-an-zhuang-da-jian-yu-yun-xing/</url>
<content type="html"><![CDATA[<p>笔者在安装构建NEMO(<strong>N</strong>ucleus for<strong>E</strong>uropean<strong>M</strong>odelling of the<strong>O</strong>cean)的时候苦于资料太少,花费了不少时间和精力,踩了不少坑。因此笔者将安装过程进行总结,以供大家参考。</p><h2 id="1-系统信息"><a href="#1-系统信息" class="headerlink" title="1. 系统信息"></a>1. 系统信息</h2><p>OS信息:Linux black 5.15.0-89-generic #99-Ubuntu x86_64 GNU/Linux</p><p>安装路径:软件安装包放在: /home/czhang/softwarepkg</p><p>相关依赖软件安装在:/home/czhang/local</p><p>NEMO安装在:/home/czhang/NEMO</p><p>XIOS安装在:/home/czhang/xios</p><blockquote><p>各软件安装版本如下:<br>curl-7.81.0<br>hdf5-1.14.3<br>mpich-4.2.0<br>netcdf-c-4.7.4<br>netcdf-fortran-4.5.3<br>pnetcdf-1.12.3<br>szip-2.1.1<br>zlib-1.2.11</p></blockquote><h2 id="2-安装MPICH"><a href="#2-安装MPICH" class="headerlink" title="2. 安装MPICH"></a>2. 安装MPICH</h2><p>在/home/czhang/local下创建mpich文件夹</p><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf mpich-4.2.0.tar.gz</span><br><span class="line">$ <span class="built_in">cd</span> mpich-4.2.0</span><br><span class="line">$ ./configure –prefix=/home/czhang/local/mpich</span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><p>安装后需要将mpich的相应路径添加到环境变量当中。</p><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line"><span class="built_in">export</span> LD_LIBRARY_PATH=/home/czhang/local/mpich/lib</span><br><span class="line"><span class="built_in">export</span> PATH=<span class="variable">$PATH</span>:/home/czhang/local/mpich/bin</span><br></pre></td></tr></tbody></table></figure><p>也可以在.bashrc中,添加随后 source ~/.bashrc</p><h2 id="3-安装NetCDF"><a href="#3-安装NetCDF" class="headerlink" title="3. 安装NetCDF"></a>3. 安装NetCDF</h2><p>在/home/czhang/local下创建netcdf文件夹。安装的每一个依赖软件均需在其源代码目录下进行</p><h3 id="1-安装zlib"><a href="#1-安装zlib" class="headerlink" title="(1)安装zlib"></a>(1)安装zlib</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf zlib-1.2.11.tar.gz</span><br><span class="line">$ <span class="built_in">cd</span> zlib-1.2.11</span><br><span class="line">$ ./configure --prefix=/home/czhang/local/netcdf</span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><h3 id="2-安装szip"><a href="#2-安装szip" class="headerlink" title="(2)安装szip"></a>(2)安装szip</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf szip-2.1.1.tar.gz</span><br><span class="line">$ <span class="built_in">cd</span> szip-2.1.1</span><br><span class="line">$ ./configure --prefix=/home/czhang/local/netcdf</span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><h3 id="3-安装curl"><a href="#3-安装curl" class="headerlink" title="(3)安装curl"></a>(3)安装curl</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf curl-7.81.0.tar.gz</span><br><span class="line">$ <span class="built_in">cd</span> curl-7.81.0</span><br><span class="line">$ ./configure --prefix=/home/czhang/local/netcdf -with-openssl <span class="comment"># 这里要看自己系统上用的什么ssl</span></span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><h3 id="4-安装HDF5"><a href="#4-安装HDF5" class="headerlink" title="(4)安装HDF5"></a>(4)安装HDF5</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf hdf5-1.14.3.tar.gz</span><br><span class="line">$ <span class="built_in">cd</span> hdf5-1.14.3</span><br><span class="line">$ <span class="built_in">export</span> CPPFLAGS=-I /home/czhang/local/netcdf/include</span><br><span class="line">$ <span class="built_in">export</span> LDFLAGS=-L /home/czhang/local/netcdf/lib</span><br><span class="line">$ <span class="built_in">export</span> LD_LIBRARY_PATH=/home/czhang/local/netcdf/lib</span><br><span class="line">$ ./configure --prefix=/home/czhang/local/netcdf --enable-parallel --enable-fortran</span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><h3 id="5-安装PNetCDF"><a href="#5-安装PNetCDF" class="headerlink" title="(5)安装PNetCDF"></a>(5)安装PNetCDF</h3><p>在/home/czhang/local下创建pnetcdf文件夹,pnetcdf安装在该文件夹中</p><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf pnetcdf-1.12.3.tar.gz</span><br><span class="line">$ <span class="built_in">cd</span> pnetcdf-1.12.3</span><br><span class="line">$ ./configure --prefix=/home/czhang/local/pnetcdf --enable-fortran --enable-large-file-test --enable-shared</span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><h3 id="6-安装NetCDF-C"><a href="#6-安装NetCDF-C" class="headerlink" title="(6)安装NetCDF-C"></a>(6)安装NetCDF-C</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf netcdf-c-4.7.4.tar.gz</span><br><span class="line">$ <span class="built_in">cd</span> netcdf-c-4.7.4</span><br><span class="line">$ ./configure --prefix=/home/czhang/local/netcdf --enable-pnetcdf --enable-large-file-tests --enable-largefile --enable-parallel-tests --enable-shared --with-pic --disable-doxygen --enable-netcdf-4 </span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><p>成功后会有 congratulations</p><h3 id="7-安装NetCDF-Fortran"><a href="#7-安装NetCDF-Fortran" class="headerlink" title="(7)安装NetCDF-Fortran"></a>(7)安装NetCDF-Fortran</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ tar -zxvf netcdf-fortran-4.5.3.tar.gz <span class="comment"># 注意:该版本需要netcdf-c在4.7.4及以上</span></span><br><span class="line">$ <span class="built_in">cd</span> netcdf-fortran-4.5.3</span><br><span class="line">$ <span class="built_in">export</span> LIBS=-lnetcdf</span><br><span class="line">$ ./configure --prefix=/home/czhang/local/netcdf --disable-static --enable-shared --with-pic --enable-parallel-tests --enable-large-file-tests --enable-largefile </span><br><span class="line">$ make</span><br><span class="line">$ make install</span><br></pre></td></tr></tbody></table></figure><p>成功后会有 congratulations</p><p><strong>安装完成后需要配置环境变量</strong>,笔者在 .bashrc 文件添加的内容如下:</p><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line"><span class="built_in">export</span> DIR=/home/czhang/local</span><br><span class="line"><span class="built_in">export</span> NETCDF=<span class="variable">$DIR</span>/netcdf</span><br><span class="line"><span class="built_in">export</span> MPI=<span class="variable">$DIR</span>/mpich</span><br><span class="line"><span class="built_in">export</span> PNETCDF=<span class="variable">$DIR</span>/pnetcdf</span><br><span class="line"></span><br><span class="line"><span class="built_in">export</span> CPPFLAGS=<span class="string">"-I<span class="variable">$MPI</span>/include -I<span class="variable">$NETCDF</span>/include -I<span class="variable">$PNETCDF</span>/include"</span></span><br><span class="line"><span class="built_in">export</span> LDFLAGS=<span class="string">"<span class="variable">$LDFLAGS</span> -L<span class="variable">$NETCDF</span>/lib -L<span class="variable">$MPI</span>/lib -L<span class="variable">$PNETCDF</span>/lib -I<span class="variable">$NETCDF</span>/include"</span></span><br><span class="line"><span class="built_in">export</span> FCFLAGS=<span class="string">"-fallow-argument-mismatch"</span></span><br><span class="line"><span class="built_in">export</span> FFLAGS=<span class="string">"-I<span class="variable">$MPI</span>/include -L<span class="variable">$MPI</span>/lib -I<span class="variable">$NETCDF</span>/include -fallow-argument-mismatch"</span></span><br><span class="line"></span><br><span class="line"><span class="built_in">export</span> NCDF_F_HOME=<span class="variable">$NETCDF</span></span><br><span class="line"><span class="built_in">export</span> NCDF_C_HOME=<span class="variable">$NETCDF</span></span><br><span class="line"><span class="built_in">export</span> HDF5_HOME=<span class="variable">$NETCDF</span></span><br><span class="line"></span><br><span class="line"><span class="built_in">export</span> LD_LIBRARY_PATH=<span class="variable">$MPI</span>/lib:<span class="variable">$NETCDF</span>/lib:<span class="variable">$PNETCDF</span>/lib:<span class="variable">$LD_LIBRARY_PATH</span></span><br><span class="line"><span class="built_in">export</span> PATH=<span class="variable">$PATH</span>:<span class="variable">$MPI</span>/bin:<span class="variable">$NETCDF</span>/bin:<span class="variable">$NETCDF</span>/include</span><br><span class="line"></span><br><span class="line"><span class="built_in">export</span> CC=mpicc <span class="comment">#gcc</span></span><br><span class="line"><span class="built_in">export</span> CXX=mpicxx <span class="comment">#g++</span></span><br><span class="line"><span class="built_in">export</span> FC=mpif90 <span class="comment">#gfortran</span></span><br><span class="line"><span class="built_in">export</span> FCFLAGS=<span class="string">"-m64 <span class="variable">$FCFLAGS</span>"</span> </span><br><span class="line"><span class="built_in">export</span> F77=mpif77 <span class="comment">#gfortran</span></span><br><span class="line"><span class="built_in">export</span> FFLAGS=<span class="string">"-m64 <span class="variable">$FFLAGS</span>"</span></span><br></pre></td></tr></tbody></table></figure><p>配置好了之后,检查一下版本和路径</p><h2 id="4-安装XIOS"><a href="#4-安装XIOS" class="headerlink" title="4. 安装XIOS"></a>4. 安装XIOS</h2><p>提取并解析XIOS源代码,并将安装文件夹命名为xios。</p><figure class="highlight text"><table><tbody><tr><td class="code"><pre><span class="line">svn co http://forge.ipsl.jussieu.fr/ioserver/svn/XIOS2/trunk xios</span><br></pre></td></tr></tbody></table></figure><p>在 xios/arch 目录下找到相应的架构配置文件并修改。笔者这里是用的GCC_LINUX,需要修改 .path, .env, .fcm 文件。</p><figure class="highlight text"><table><tbody><tr><td class="code"><pre><span class="line"># arch-GCC_LINUX.env</span><br><span class="line"></span><br><span class="line">export HDF5_INC_DIR=$HOME/local/netcdf/include #根据自己情况修改</span><br><span class="line">export HDF5_LIB_DIR=$HOME/local/netcdf/lib #根据自己情况修改</span><br><span class="line"></span><br><span class="line">export NETCDF_INC_DIR=$HOME/local/netcdf/include #根据自己情况修改</span><br><span class="line">export NETCDF_LIB_DIR=$HOME/local/netcdf/lib #根据自己情况修改</span><br><span class="line"></span><br><span class="line">export BOOST_INC_DIR=$HOME/boost</span><br><span class="line">export BOOST_LIB_DIR=$HOME/boost</span><br></pre></td></tr></tbody></table></figure><p>具体路径需要根据自己的安装路径做相应修改。</p><figure class="highlight text"><table><tbody><tr><td class="code"><pre><span class="line"># arch-GCC_LINUX.fcm</span><br><span class="line"></span><br><span class="line">################################################################################</span><br><span class="line">################### Projet XIOS ###################</span><br><span class="line">################################################################################</span><br><span class="line"></span><br><span class="line">%CCOMPILER /home/czhang/local/mpich/bin/mpicc #根据自己情况修改</span><br><span class="line">%FCOMPILER /home/czhang/local/mpich/bin/mpif90 #根据自己情况修改</span><br><span class="line">%LINKER /home/czhang/local/mpich/bin/mpif90 #根据自己情况修改</span><br><span class="line"></span><br><span class="line">%BASE_CFLAGS -w -std=c++11 -D__XIOS_EXCEPTION -D_GLIBCXX_USE_CXX11_ABI=0 -ffree-line-length-none #这个标志需要在原基础上添加一些东西</span><br><span class="line">%PROD_CFLAGS -O3 -DBOOST_DISABLE_ASSERTS</span><br><span class="line">%DEV_CFLAGS -g -O2</span><br><span class="line">%DEBUG_CFLAGS -g</span><br><span class="line"></span><br><span class="line">%BASE_FFLAGS -D__NONE__</span><br><span class="line">%PROD_FFLAGS -O3</span><br><span class="line">%DEV_FFLAGS -g -O2</span><br><span class="line">%DEBUG_FFLAGS -g</span><br><span class="line"></span><br><span class="line">%BASE_INC -D__NONE__</span><br><span class="line">%BASE_LD -lstdc++</span><br><span class="line"></span><br><span class="line">%CPP cpp</span><br><span class="line">%FPP cpp -P</span><br><span class="line">%MAKE make</span><br></pre></td></tr></tbody></table></figure><p>具体路径需要根据自己的安装路径做相应修改,FLAGS按照上述修改即可。</p><figure class="highlight text"><table><tbody><tr><td class="code"><pre><span class="line"># arch-GCC_LINUX.path</span><br><span class="line"></span><br><span class="line">NETCDF_INCDIR="-I $NETCDF_INC_DIR"</span><br><span class="line">NETCDF_LIBDIR="-L $NETCDF_LIB_DIR"</span><br><span class="line">NETCDF_LIB="-lnetcdff -lnetcdf"</span><br><span class="line"></span><br><span class="line">MPI_INCDIR=""</span><br><span class="line">MPI_LIBDIR=""</span><br><span class="line">MPI_LIB=""</span><br><span class="line"></span><br><span class="line">HDF5_INCDIR="-I $HDF5_INC_DIR"</span><br><span class="line">HDF5_LIBDIR="-L $HDF5_LIB_DIR"</span><br><span class="line">HDF5_LIB="-lhdf5_hl -lhdf5 -lhdf5 -lz"</span><br></pre></td></tr></tbody></table></figure><p>以上只展示到了 HDF5 的设置,后面的不用改变。去除 lcurl 标志即可。</p><p>配置完成后就可以在xios源代码目录下进行编译了。输入命令:</p><figure class="highlight shell"><table><tbody><tr><td class="code"><pre><span class="line">./make_xios --full --arch GCC_LINUX -j 160 |& tee compile_log.txt</span><br></pre></td></tr></tbody></table></figure><p>选用GCC_LINUX架构配置进行编译。-j 表示使用多少个线程进行编译,tee compile_log.txt 表示将编译产生的信息存储在txt文件中,这是为了出问题时方便查看。</p><p>XIOS编译的时间很长,同时编译完成后不会有成功或恭喜信息,看到 finished 并且没有 error 报错就说明完成了。</p><h2 id="5-安装并编译NEMO"><a href="#5-安装并编译NEMO" class="headerlink" title="5. 安装并编译NEMO"></a>5. 安装并编译NEMO</h2><p>创建NEMO文件夹,并将压缩包解压。编译NEMO之前同样需要修改架构配置文件。笔者这里使用的是linux_gfortran架构</p><p>在arch文件夹下找到 arch-linux_gfortran.fcm文件并修改</p><figure class="highlight text"><table><tbody><tr><td class="code"><pre><span class="line">%NCDF_HOME /home/czhang/local/netcdf</span><br><span class="line">%HDF5_HOME /home/czhang/local/netcdf</span><br><span class="line">%NCDF_C_HOME /home/czhang/local/netcdf</span><br><span class="line">%NCDF_F_HOME /home/czhang/local/netcdf</span><br><span class="line">%XIOS_HOME /home/czhang/xios</span><br><span class="line"></span><br><span class="line">%NCDF_INC -I%NCDF_F_HOME/include -I%NCDF_C_HOME/include -I%HDF5_HOME/include</span><br><span class="line">%NCDF_LIB -L%NCDF_F_HOME/lib -lnetcdff -L%NCDF_C_HOME/lib -lnetcdf -lstdc++</span><br><span class="line">%XIOS_INC -I%XIOS_HOME/inc</span><br><span class="line">%XIOS_LIB -L%XIOS_HOME/lib -lxios -lstdc++</span><br><span class="line"></span><br><span class="line">%OASIS_INC -I%OASIS_HOME/build/lib/mct -I%OASIS_HOME/build/lib/psmile.MPI1</span><br><span class="line">%OASIS_LIB -L%OASIS_HOME/lib -lpsmile.MPI1 -lmct -lmpeu -lscrip</span><br><span class="line"></span><br><span class="line">%CPP cpp -Dkey_nosignedzero</span><br><span class="line">%FC mpif90 -c -cpp</span><br><span class="line">%FCFLAGS -I/home/czhang/local/netcdf/include $(FCFLAGS) -fdefault-real-8 -O3 -funroll-all-loops -fcray-pointer -ffree-line-length-none -fallow-argument-mismatch -cpp</span><br><span class="line">%FFLAGS %FCFLAGS</span><br><span class="line">%LD mpif90</span><br><span class="line">%LDFLAGS</span><br><span class="line">%FPPFLAGS -P -C -traditional</span><br><span class="line">%AR ar</span><br><span class="line">%ARFLAGS rs</span><br><span class="line">%MK make</span><br><span class="line">%USER_INC %XIOS_INC %NCDF_INC</span><br><span class="line">%USER_LIB %XIOS_LIB %NCDF_LIB</span><br><span class="line"></span><br><span class="line">%CC cc</span><br><span class="line">%CFLAGS -O0</span><br></pre></td></tr></tbody></table></figure><p>在该配置文件中需要指明netcdf,hdf5,xios的路径</p><p>之后就可以进行NEMO 的编译。在源代码根目录进行:</p><figure class="highlight shell"><table><tbody><tr><td class="code"><pre><span class="line">./makenemo -m linux_gfortran -r GYRE_PISCES -n test1</span><br></pre></td></tr></tbody></table></figure><p>之后就可以在cfgs文件夹下看到test1文件夹,其中包含 BLD, EXP00, MY_SRC, WORK, cpp_test1.fcm,在EXP00文件夹下有nemo执行程序</p><h2 id="6-运行NEMO"><a href="#6-运行NEMO" class="headerlink" title="6. 运行NEMO"></a>6. 运行NEMO</h2><p>在EXP00文件夹下,有一些初始化的输入文件(namelist,用于输入的*.xml文件等),如果需要使用其他输入文件需要将他们放在这个文件夹中</p><figure class="highlight shell"><table><tbody><tr><td class="code"><pre><span class="line"><span class="meta prompt_">$ </span><span class="language-bash"><span class="built_in">cd</span> cfgs/test1/EXP00/ <span class="comment"># 进入EXP00文件夹中</span></span></span><br><span class="line"><span class="meta prompt_">$ </span><span class="language-bash">mpirun -n <span class="variable">$NPROCS</span> ./nemo <span class="comment"># $NPROCS 是指要运行的线程数 , mpirun是自己系统的MPI的封装接口</span></span></span><br></pre></td></tr></tbody></table></figure><h2 id="7-对于NEMO的一些配置"><a href="#7-对于NEMO的一些配置" class="headerlink" title="7. 对于NEMO的一些配置"></a>7. 对于NEMO的一些配置</h2><h3 id="7-1-更改输入输出文件路径"><a href="#7-1-更改输入输出文件路径" class="headerlink" title="7.1 更改输入输出文件路径"></a>7.1 更改输入输出文件路径</h3><p>在<strong>namelist_ref</strong>文件中</p><figure class="highlight fortran"><table><tbody><tr><td class="code"><pre><span class="line">cn_ocerst_indir = <span class="string">"./input"</span> <span class="comment">! directory from which to read input ocean restarts</span></span><br><span class="line">cn_ocerst_outdir = <span class="string">"./output_ocean_restart"</span> <span class="comment">! directory in which to write output ocean restarts</span></span><br></pre></td></tr></tbody></table></figure><p>在<strong>namelist_top_ref</strong>文件中</p><figure class="highlight fortran"><table><tbody><tr><td class="code"><pre><span class="line">cn_trcrst_outdir = <span class="string">"./output_restart_trcrst"</span> <span class="comment">! directory to which to write output passive tracer restarts</span></span><br></pre></td></tr></tbody></table></figure><p>在<strong>file_def_nemo.xml</strong>文件中</p><figure class="highlight xml"><table><tbody><tr><td class="code"><pre><span class="line"><span class="tag"><<span class="name">file_definition</span> <span class="attr">type</span>=<span class="string">"multiple_file"</span> <span class="attr">name</span>=<span class="string">"output_time/@expname@_@freq@_@startdate@_@enddate@"</span> <span class="attr">sync_freq</span>=<span class="string">"1mo"</span> <span class="attr">min_digits</span>=<span class="string">"4"</span>></span></span><br></pre></td></tr></tbody></table></figure><p>mesh_mask文件 和 ocean_output文件无法更改输出目录,除非修改NEMO源代码</p><h3 id="7-2-部分参数的作用"><a href="#7-2-部分参数的作用" class="headerlink" title="7.2 部分参数的作用"></a>7.2 部分参数的作用</h3><figure class="highlight fortran"><table><tbody><tr><td class="code"><pre><span class="line"><span class="comment">! 在namelist_cfg文件中,调整分辨率</span></span><br><span class="line"><span class="comment">! jpiglo, jpjglo参数不应该出现在该文件中,不用调整</span></span><br><span class="line">nn_GYRE = <span class="number">25</span> <span class="comment">! GYRE resolution [1/degrees] 。分辨率(度)的倒数</span></span><br><span class="line">ln_bench = .true. <span class="comment">! ! =T benchmark with gyre: the gridsize is kept constant。将NEMO用于作为Benchmark</span></span><br><span class="line">jpkglo = <span class="number">31</span> <span class="comment">! number of model levels。模拟时的模型层数或深度</span></span><br><span class="line">rn_Dt = <span class="number">7200.</span> <span class="comment">! time step for the dynamics。设置模拟的时间步长</span></span><br><span class="line"></span><br><span class="line"></span><br><span class="line"><span class="comment">! 在namelist_ref文件中,调整用于MPI并行计算的网格点,将两个参数设置为0使得系统自动调整网格</span></span><br><span class="line">jpni = <span class="number">0</span> <span class="comment">! number of processors following i (set automatically if < 1), see also ln_listonly = T</span></span><br><span class="line">jpnj = <span class="number">0</span> <span class="comment">! number of processors following j (set automatically if < 1), see also ln_listonly = T</span></span><br></pre></td></tr></tbody></table></figure><p>模型运行的信息在 ocean.output 文件中,通过该文件展示的信息来判断应该用多少MPI进程</p><p><strong>References:</strong></p>]]></content>
<categories>
<category> 系统性能优化 </category>
</categories>
<tags>
<tag> HPC </tag>
<tag> 工作负载 </tag>
<tag> 分布式 </tag>
<tag> 环境搭建 </tag>
</tags>
</entry>
<entry>
<title>IntelliJ IDEA 常用快捷键一览表</title>
<link href="/2024/04/02/intellij-idea-chang-yong-kuai-jie-jian-yi-lan-biao/"/>
<url>/2024/04/02/intellij-idea-chang-yong-kuai-jie-jian-yi-lan-biao/</url>
<content type="html"><![CDATA[<h2 id="1-IDEA的日常快捷键"><a href="#1-IDEA的日常快捷键" class="headerlink" title="1-IDEA的日常快捷键"></a><strong>1-IDEA的日常快捷键</strong></h2><h3 id="第1组:通用型"><a href="#第1组:通用型" class="headerlink" title="第1组:通用型"></a><strong>第1组:通用型</strong></h3><table><thead><tr><th>说明</th><th>快捷键</th></tr></thead><tbody><tr><td>复制代码-copy</td><td>ctrl + c</td></tr><tr><td>粘贴-paste</td><td>ctrl + v</td></tr><tr><td>剪切-cut</td><td>ctrl + x</td></tr><tr><td>撤销-undo</td><td>ctrl + z</td></tr><tr><td>反撤销-redo</td><td>ctrl + shift + z</td></tr><tr><td>保存-save all</td><td>ctrl + s</td></tr><tr><td>全选-select all</td><td>ctrl + a</td></tr></tbody></table><h3 id="第2组:提高编写速度(上)"><a href="#第2组:提高编写速度(上)" class="headerlink" title="第2组:提高编写速度(上)"></a><strong>第2组:提高编写速度(上)</strong></h3><table><thead><tr><th>说明</th><th>快捷键</th></tr></thead><tbody><tr><td>智能提示-edit</td><td>alt + enter</td></tr><tr><td>提示代码模板-insert live template</td><td>ctrl+j</td></tr><tr><td>使用xx块环绕-surround with …</td><td>ctrl+alt+t</td></tr><tr><td>调出生成getter/setter/构造器等结构-generate …</td><td>alt+insert</td></tr><tr><td>自动生成返回值变量-introduce variable …</td><td>ctrl+alt+v</td></tr><tr><td>复制指定行的代码-duplicate line or selection</td><td>ctrl+d</td></tr><tr><td>删除指定行的代码-delete line</td><td>ctrl+y</td></tr><tr><td>切换到下一行代码空位-start new line</td><td>shift + enter</td></tr><tr><td>切换到上一行代码空位-start new line before current</td><td>ctrl +alt+ enter</td></tr><tr><td>向上移动代码-move statement up</td><td>ctrl+shift+↑</td></tr><tr><td>向下移动代码-move statement down</td><td>ctrl+shift+↓</td></tr><tr><td>向上移动一行-move line up</td><td>alt+shift+↑</td></tr><tr><td>向下移动一行-move line down</td><td>alt+shift+↓</td></tr><tr><td>方法的形参列表提醒-parameter info</td><td>ctrl+p</td></tr></tbody></table><h3 id="第3组:提高编写速度(下)"><a href="#第3组:提高编写速度(下)" class="headerlink" title="第3组:提高编写速度(下)"></a><strong>第3组:提高编写速度(下)</strong></h3><table><thead><tr><th>说明</th><th>快捷键</th></tr></thead><tbody><tr><td>批量修改指定的变量名、方法名、类名等-rename</td><td>shift+f6</td></tr><tr><td>抽取代码重构方法-extract method …</td><td>ctrl+alt+m</td></tr><tr><td>重写父类的方法-override methods …</td><td>ctrl+o</td></tr><tr><td>实现接口的方法-implements methods …</td><td>ctrl+i</td></tr><tr><td>选中的结构的大小写的切换-toggle case</td><td>ctrl+shift+u</td></tr><tr><td>批量导包-optimize imports</td><td>ctrl+alt+o</td></tr></tbody></table><h3 id="第4组:类结构、查找和查看源码"><a href="#第4组:类结构、查找和查看源码" class="headerlink" title="第4组:类结构、查找和查看源码"></a><strong>第4组:类结构、查找和查看源码</strong></h3><table><thead><tr><th>说明</th><th>快捷键</th></tr></thead><tbody><tr><td>如何查看源码-go to class…</td><td>ctrl + 选中指定的结构 或 ctrl+n</td></tr><tr><td>显示当前类结构,支持搜索指定的方法、属性等-file structure</td><td>ctrl+f12</td></tr><tr><td>退回到前一个编辑的页面-back</td><td>ctrl+alt+←</td></tr><tr><td>进入到下一个编辑的页面-forward</td><td>ctrl+alt+→</td></tr><tr><td>打开的类文件之间切换-select previous/next tab</td><td>alt+←/→</td></tr><tr><td>光标选中指定的类,查看继承树结构-Type Hierarchy</td><td>ctrl+h</td></tr><tr><td>查看方法文档-quick documentation</td><td>ctrl+q</td></tr><tr><td>类的UML关系图-show uml popup</td><td>ctrl+alt+u</td></tr><tr><td>定位某行-go to line/column</td><td>ctrl+g</td></tr><tr><td>回溯变量或方法的来源-go to implementation(s)</td><td>ctrl+alt+b</td></tr><tr><td>折叠方法实现-collapse all</td><td>ctrl+shift+ -</td></tr><tr><td>展开方法实现-expand all</td><td>ctrl+shift+ +</td></tr></tbody></table><h3 id="第5组:查找、替换与关闭"><a href="#第5组:查找、替换与关闭" class="headerlink" title="第5组:查找、替换与关闭"></a><strong>第5组:查找、替换与关闭</strong></h3><table><thead><tr><th>说明</th><th>快捷键</th></tr></thead><tbody><tr><td>查找指定的结构</td><td>ctlr+f</td></tr><tr><td>快速查找:选中的Word快速定位到下一个-find next</td><td>ctrl+l</td></tr><tr><td>查找与替换-replace</td><td>ctrl+r</td></tr><tr><td>直接定位到当前行的首位-move caret to line start</td><td>home</td></tr><tr><td>直接定位到当前行的末位 -move caret to line end</td><td>end</td></tr><tr><td>查询当前元素在当前文件中的引用,然后按 F3 可以选择</td><td>ctrl+f7</td></tr><tr><td>全项目搜索文本-find in path …</td><td>ctrl+shift+f</td></tr><tr><td>关闭当前窗口-close</td><td>ctrl+f4</td></tr></tbody></table><h3 id="第6组:调整格式"><a href="#第6组:调整格式" class="headerlink" title="第6组:调整格式"></a><strong>第6组:调整格式</strong></h3><table><thead><tr><th>说明</th><th>快捷键</th></tr></thead><tbody><tr><td>格式化代码-reformat code</td><td>ctrl+alt+l</td></tr><tr><td>使用单行注释-comment with line comment</td><td>ctrl + /</td></tr><tr><td>使用/取消多行注释-comment with block comment</td><td>ctrl + shift + /</td></tr><tr><td>选中数行,整体往后移动-tab</td><td>tab</td></tr><tr><td>选中数行,整体往前移动-prev tab</td><td>shift + tab</td></tr></tbody></table><h2 id="2-Debug快捷键"><a href="#2-Debug快捷键" class="headerlink" title="2-Debug快捷键"></a><strong>2-Debug快捷键</strong></h2><table><thead><tr><th>说明</th><th>快捷键</th></tr></thead><tbody><tr><td>单步调试(不进入函数内部)- step over</td><td>F8</td></tr><tr><td>单步调试(进入函数内部)- step into</td><td>F7</td></tr><tr><td>强制单步调试(进入函数内部) - force step into</td><td>alt+shift+f7</td></tr><tr><td>选择要进入的函数 - smart step into</td><td>shift + F7</td></tr><tr><td>跳出函数 - step out</td><td>shift + F8</td></tr><tr><td>运行到断点 - run to cursor</td><td>alt + F9</td></tr><tr><td>继续执行,进入下一个断点或执行完程序 - resume program</td><td>F9</td></tr><tr><td>停止 - stop</td><td>Ctrl+F2</td></tr><tr><td>查看断点 - view breakpoints</td><td>Ctrl+Shift+F8</td></tr><tr><td>关闭 - close</td><td>Ctrl+F4</td></tr></tbody></table><p><strong>转载来源:</strong></p>]]></content>
<categories>
<category> 开发工具 </category>
</categories>
<tags>
<tag> IDE </tag>
<tag> IntelliJ IDEA </tag>
<tag> 快捷键 </tag>
</tags>
</entry>
<entry>
<title>Hello World</title>
<link href="/2024/04/01/hello-world/"/>
<url>/2024/04/01/hello-world/</url>
<content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></tbody></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></tbody></table></figure><p>More info: <a href="https://hexo.io/docs/server.html">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></tbody></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tbody><tr><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></tbody></table></figure><p>More info: <a href="https://hexo.io/docs/one-command-deployment.html">Deployment</a></p>]]></content>
</entry>
</search>