Computer Setup
[Cygwin & Windows] ifort & icc environment setup
astrodoo
2019. 4. 5. 02:46
1)
먼저 .bashrc 에 다음의 스크립트를 추가한다
in .bashrc
alias ifort='ífort -Qlocation,link,"$VCINSTALLDIR/bin"'
alias icl='icl -Qlocation,link,"$VCINSTALLDIR/bin"'
export PATH="/cygdrive/c/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio\ 14.0/VC/bin:$PATH"
위의 alias 는 링크를 설정하는 것이고 아래 PATH 설정은 Visual studio 의 Link.exe 가 속해 있는 디렉토리가 cywin의 Link.exe 보다 앞에 있어 먼저 읽어 들일 수 있게 하는 것이다. 뒤의 설정을 하지 않으면
link: unknown option -- s
과 같은 에러를 만날 수 있다.
2)
직접 cywin 프롬프트를 열면은 intel compiler를 사용할 수 없다.
인텔 command prompt with intel compiler (visual studio 와 함께 설치됨) 를 아래와 같이 작동하면,
일반 Windows command 처럼 보이는 prompt가 뜨는데,
이 안에서는 intel compiler의 환경이 설정이 되어 있다는 점이 다르다.
이후에 다음과 같이 cywin을 그 prompt 안에서 작동을 하면 cywin 안에서 intel compiler를 사용할 수 있다.
> c:\cygwin64\cygwin.bat