12월, 2017의 게시물 표시

Module symbol file for module mpi is in a format not recognized by this compiler error message

Module symbol file for module mpi is in a format not recognized by this compiler error message   Technote (troubleshooting) Problem(Abstract) Compilation of Fortran code that uses Parallel Environment (PE) Fortran 90 type-checking module mpi.mod (via USE MPI statement) fails with XL Fortran Enterprise Edition for AIX, V11.1 and earlier versions. Symptom Consider Fortran source code that includes Parallel Environment (PE) Fortran 90 type-checking module mpi.mod:       program test                 use mpi                       print *, 'testing mpi'         stop                         end program test       Compiling this source code with XL Fortran Enterprise Edition for AIX, V11.1 or earlier version will cause compile time error: 1514-220 (S) Module symb...

Compiling GCC 7 on macOS

In this tutorial, I will show you how to compile from source and install the current stable version of GCC with Graphite loop optimizations on your macOS computer. The instructions from this tutorial were tested with Xcode 8 and Sierra (macOS 10.12). Clang, the default compiler for macOS, supports only C, C++, Objective-C and Objective-C++. If you are interested in a modern Fortran compiler, e.g. you will need  gfortran  that comes with GCC. Another reason to have the latest stable version of GCC on your macOS is that it provides you with an alternative C and C++ compiler. Testing your code with two different compilers is always a good idea. In order to compile GCC from sources you will need a working C++ compiler. In the remaining of this article I will assume that you have installed the Command Line Tools for Xcode. At the time of this writing Apple’s Command Line Tools maps the  gcc  and  g++  to  clang  and  clang++ . If you don’t ha...

[Vi/Vim] File explorer

이미지
The command  :Explore  opens the file explorer window. Select a file or directory name and press Enter to open that file or directory. (For example  :e /home/user displays the contents of that directory.) To return to the explorer window, press Ctrl-^ (usually Ctrl-6). You can also "edit" a directory to explore that directory. For example,  :e ..  lists files in the parent directory. Other approaches Edit In normal mode, type  :e  then press Space and Ctrl-D. That will list file names in the current directory. You can type a name and press Enter to edit that file. If, for example, you want a name that starts with "get" type  :e get  then press Tab repeatedly, or Ctrl-D to list all matches. Another possibility is to use a mapping like this: map <F2> :!ls<CR>:e 출처 - http://vim.wikia.com/wiki/File_explorer

[Vi/Vim] Using tab pages

이미지
This tip provides an introduction to opening, navigating, and working with tab pages. In Vim, each file is loaded into a buffer, which can be displayed in any number of windows, in any number of tabs. The easiest way to think about tab pages in Vim is to consider them to be viewports, layouts, or workspaces. In many editors (not Vim), each file is opened in a new tab, and one tab can show only one file, and one file cannot appear in more than one tab. Vim's tab pages do not have these limitations, and tabs are a convenient way to organize your work. See Quick tips for using tab pages for examples of how tabs can be used to their full potential. Trying to configure Vim to always have one file per tab will not be successful, and would remove much of the power of Vim. However, when you want to edit a file, it is easy to use :tabe instead of :e so that usually there is one file per tab. You can also launch files in new tabs under Windows and Unix . An alternative to one file p...

[Vi/Vim] Copy, cut and paste

이미지
Here is how to cut-and-paste or copy-and-paste text using a visual selection in Vim. See Cut/copy and paste using visual selection for the main article. Cut and paste: Position the cursor where you want to begin cutting. Press v to select characters, or uppercase V to select whole lines, or Ctrl-v to select rectangular blocks (use Ctrl-q if Ctrl-v is mapped to paste). Move the cursor to the end of what you want to cut. Press d to cut (or y to copy). Move to where you would like to paste. Press P to paste before the cursor, or p to paste after. Copy and paste is performed with the same steps except for step 4 where you would press y instead of d : d stands for delete in Vim, which in other editors is usually called cut y stands for yank in Vim, which in other editors is usually called copy Copying and cutting in normal mode . In normal mode, one can copy (yank) with y{motion} , where {motion} is a Vim motion. For example, yw copies to the beginning...

유용한 VI 명령어

이미지
저장 및 파일 읽기 명령 vi -r <파일명> : VI가 비정상 종료되었을 때, 작성중이던 파일을 복구한다. (Vi가 아닌 Shell명령) :1,4w <파일명> : 1부터 4줄까지를 지정된 파일명으로 저장한다. :r <파일명>    : 현재 편집중인 내용에 <파일명> 파일의 내용을 읽어서 덧붙인다. 라인 삭제 d1G : 문서의 첫번째 줄부터 현재 이전 줄까지 삭제 dG  : 문서의 현재 줄부터 끝까지 삭제 문서의 영역 선택 및 위치 마킹 m x  : 현재 라인을 "x" 라는 이름으로 마킹 ('m' 다음 문자의 이름으로 현재 라인을 마킹) v   : Visual 영역 선택 명령 반복 .   : 마지막 실행했던 명령 재실행 대소문자 전환 ' v ' 명령으로 Visual 영역을 선택한 후, ' ~ ' 키를 입력하면 대문자를 소문자로 소문자를 대문자로 전환 :%s/.*/L&/ : 문서 전체를 소문자로 변환 :%s/.*/U&/ : 문서 전체를 대문자로 변환 들여쓰기 >>  : 명령을 입력하면 현재 줄만 들여쓰기 실행 n >> : 명령을 입력하면 현재 줄부터 n 번째 줄까지 들여쓰기 실행 >%  : 괄호가 시작되는 부분에 커서를 옮기고 실행해야 하며, 괄호의 짝이 쌍으로 끝나는 부분까지 들여쓰기 실행 (소괄호, 중괄호, 대괄호 모두 적용되며, 괄호가 포함된 라인까지 들여쓰기 함) >}  : 한 문단을 들여쓰기 실행 내어쓰기 <<  : 명령을 입력하면 현재 줄만 내어쓰기 실행 n << : 명령을 입력하면 현재 줄부터 n 번째 줄까지 내어쓰기 실행 <%  : 괄호가 시작되는 부분에 커서를 옮기고 실행해야 하며, 괄호의 짝이 쌍으로 끝나는 부분까지 내어쓰기 실행 (소괄호, 중괄호...