다음은 인텔포트란 10.0.023을 설치할때 제가 설치하면서 인터넷에서 갈무리했던 내용입니다.
인텔포트란은 인텔사이트에서 non-commercial 버전을 공짜로 받으면됩니다. 우분투 버전에 따라 구버전은 라이브러리가 안맞아서 새버전을 받아야할 수도 있습니다. 10.0.023버전은 우분투 8.04와 8.10에서 잘 돌아갑니다.
Some other packages are need to complete the installation of the compiler:
sudo apt-get install alien g++-multilib libstdc++5 build-essential
For some strange reason Ubuntu uses dash and not bash as the shell /bin/sh. This creates problems since dash does not have the same functions as bash which is needed by the Intel programs (and programs others too). So I remove the link from sh to dash and replace it with a link to bash instead.
sudo rm /bin/sh
sudo ln -s /bin/bash /bin/sh
After this I unpacked the tar "l_fc_p_10.1.012_intel64.tar.gz" I downloaded earlier and created a .deb file from the .rpm files included in the tar ball and install the .deb file.
cd data
sudo alien -cv intel-iforte101012-10.1.012-1.em64t.rpm
sudo dpkg -i intel-iforte101012_10.1.012-2_amd64.deb
sudo alien -cv intel-iidbe101012-10.1.012-1.em64t.rpm
sudo dpkg -i intel-iidbe101012_10.1.012-2_amd64.deb
Even though the program is now installed all the files refer to <INSTALLDIR> and not /opt/intel/fce/10.1.012 as it should. So I use sed to replace all occurences of <INSTALLDIR> with /opt/intel/fce/10.1.012 . This has to be done at least with ifort and ifortvars.sh. I ran the following command as root
sudo gedit /opt/intel/fce/10.1.012/bin/ifort
sudo gedit /opt/intel/fce/10.1.012/bin/ifortvars.sh
sudo gedit /opt/intel/idbe/10.1.012/bin/idbvars.sh
Next I copied the license file (.lic) to the license folder created by the Intel compiler installer:
sudo cp *.lic /opt/intel/fce/10.1.012/licenses/
The final step was to add a line in the file ~/.bashrc to make the shell inherit some intel variables:
source /opt/intel/fce/10.1.012/bin/ifortvars.sh
source /opt/intel/idbe/10.1.012/bin/idbvars.sh
The final exercise is to test whether or not the compiler works. So I made a simple program and saved it as helloworld.f90
PROGRAM HelloWorld
PRINT *, "Hello World"
END PROGRAM HelloWorld
Then I tried to compile the code to see if it worked
ifort -o hello helloworld.f90
./hello
ps. 이 게시판에 이렇게 열심히 쓸것이 생기는 날도 있네요. 질문 말고는 첨쓰는듯… ^^;;