Build libmesh in windows under msys2/ mingw64

Indication about the libmesh building in windows in msys2 shell is provided in the libmesh official site. But it doesn't work well in my case: Windows 10 + msys2 with gcc 6.3.0 + mingw64 with gcc 7.2.0. Some additional points should be take into acoount.

For both msys2 and mingw64

1. Symbolic links are not available in both msys2 or mingw64. Those include:
    contrib/eigen/eigen;  contrib/exodusii/v5.09, v5.22; contrib/nemesis/v3.09, v5.22
    contrib/netcdf/v3,v4;  contrib/qhull/qhull
you should build symbolic link by 'ln' (just a hard copy) or by 'mklink' yourself.

Libmesh should be compiled successful under msys2 then. But under mingw64, futher modification should be added.

2. Some optional dependencies are available
   metis: see solution here.
   fparse: operation system dependent 'mkdir' and POSIX 'link' function
   netcdf: some problem in depdents upon hdf5
Disable them by using --disable-netcdf  --disable-metis --disable-fparser

3. Dependent upon netcdf still exists even '--disable-netcdf' is indicated. Comment out line 40558 (subdirs="$subdirs contrib/netcdf/v4") of file 'configure'

4. Inconsistence between 'exodusII_io.h' and 'exodussII_io.C'
    In 'exodusII_io.h' some varaibales are defined under the condition
----------------------------------
    #ifdef LIBMESH_HAVE_EXODUS_API
      UniquePtr<ExodusII_IO_Helper> exio_helper;
      int _timestep;
  #endif
--------------------------------
but are used unconditionedly in 'exodussII_io.C' at 
--------------------------------------------
function ExodusII_IO::write_timestep_discontinuous
--------------------------------------------
"#ifdef LIBMESH_HAVE_EXODUS_API" is also needed here.

Everthing then should be allright!

Build PETSc in windows under mingw64

Installation of PETSc on windows is suggested in the official site of PETSc under cygwin and by specific script 'win32fe' provided. It could be, however, compiled in native windows under mingw64 with a few points should follows,

1. Don't use Windows style git such as TortoiseGit. Use git of msys2.

2. Specify your MPI environment by --with-mpi-include=<your mpi include folder> and --with-mpi-lib=<your mpi library>

3. Don't use ar in /mingw64/bin/ar by specify --with-ar=/usr/bin/ar

4. Set the gfortran compiler option by 'FOPTFLAGS=-fno-range-check'

The python script would something like:

#!/usr/bin/env python2

configure_options = [
  '--with-mpi-include=/mingw64/include',
  '--with-mpi-lib=/mingw64/lib/libmsmpi.a',
  '--with-ar=/usr/bin/ar' ,
  '--with-shared-libraries=0',
  '--with-debugging=0',
  '--with-visibility=0',
  '--prefix=/usr/local/petsc',
  'FOPTFLAGS=-O3 -fno-range-check',
  ]

if __name__ == '__main__':
  import sys,os
  sys.path.insert(0,os.path.abspath('config'))
  import configure
  configure.petsc_configure(configure_options)

5. Don't use python in /usr/bin/python other than /mingw/bin/python
   e.g. runing the above script by type in > /usr/bin/python <your python script name>

Compilation of PETSc3.8.2 tests successfully!

秋意

日本的俳句,川柳,短歌都不长。像俳句只有17个音节,光从容量上来讲也表现不了太多的内容。大约这也是与日本人的性格有关吧。看看中国的诗歌

     看万山红遍, 层林尽染, 漫江碧透
     明月松间照,清泉石上流

这个画面多美,想用俳句来表现大约是不可能的。俳句视乎是用来表现一点,一刻。其他就要靠读者的想象来补充了




看看俳句中表现秋色的代表作

1。 「秋深き 隣は何を する人ぞ松尾芭蕉
 译文:秋深寂,邻人窸窣,在干啥

2. 「柿くえば 鐘が鳴るなり 法隆寺正岡子規
 译文:新柿一口,钟声悠悠法隆寺

3.「白露や 茨の刺に ひとつづつ与謝蕪村
 译文:白雾朦朦,棘尖露珠晶莹








VS Code下cmake, c++编译,调试环境的构成步骤

1   下载必须extension      按[Ctrl+Shift+X]打开extension窗口,选择安装"C/C++", "CMake", "CMake Tools" 2   在VSCode下打开作业目录 ...