Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
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
Archives
Today
Total
관리 메뉴

Astro Coke

[Cygwin & Windows] ifort & icc environment setup 본문

Computer Setup

[Cygwin & Windows] ifort & icc environment setup

astrodoo 2019. 4. 5. 02:46

source: https://software.intel.com/en-us/articles/alias-method-for-using-intel-windows-compilers-under-cygwin-bash-shell/

 

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