Tuesday, May 2, 2017

在Linux下搭建Fortran开发环境 zz

在Linux下搭建Fortran开发环境 zz


Fortran???????????????????40?????????????Fortran 66?Fortran 77? Fortran 90?Fortran 95?Fortran 200x??????????????????Fortran????????????? ??????????HPF?High Performance Fortran???

???Fortran 90/95????PGI Fortran?HP Fortran Compiler??Fortran PowerStation???????Intel Fortran Compiler??

??????????????Linux??????Intel Fortran Compiler 8.0?F Compiler?????????? ?????Intel??????Non-Commercial???????Fortran 90/95??????????????????

Intel Fortran Compiler 8.0

Intel Fortran Compiler????????????????Windows?Linux???????????Non-Commercial???????????????????????????

1.??Non-commercial?Fortran??????????????http://www.intel.com/software/products/global/eval.htm??? Intel(r) Fortran Compiler for Linux*?????Non-Commercial Unsupported Version????????????http://www.intel.com/software/products/compilers/flin/noncom.htm? ????????????????�Continue�???????????????????????????????????????????? �Accept�???????????????????E?mail????????????�Submit�??????????????????? ?????Intel???????????????????????

?????????????????????????? ??????????l_fc_p_8.0.034.tar.gz???84MB?????????????????????????????????? ????l_for_70909049.lic??????????????????????
????root????????????????????????/usr/src/intel???????????????

2.????????????
#tar xzvf l_fc_p_8.0.034.tar.gz

3.???????????????/opt/intel_fc_80?????????????licenses???????????licenses???????????
#mkdir -p /opt/intel_fc_80/licenses
#cp /usr/src/intel/*.lic /opt/intel_fc_80/licenses
# export INTEL_LICENSE_FILE=opt/intel_fc_80/licenses

4.??????????
#cd /usr/src/intel/l_fc_p_8.0.034
#./install.sh

??????????????
The following Intel(R) products and related products are installed.

Intel(R) Fortran Compiler for 32-bit applications, Version 8.0Linux Application Debugger for 32-bit applications, Version 7.3.1

Which of the following would you like to install?
1. Intel(R) Fortran Compiler for 32-bit applications, Version 8.0
2. Linux Application Debugger for 32-bit applications, Version 7.3.1
x. Exit

???�1�???Intel Fortran Compiler??????????????/opt/intel_fc_80?

????????????????Linux Application Debugger for 32-bit applications, Version 7.3.1???�2�?????????/opt/intel_idb_73??????�x�???????

5.??????????????????
#cd /usr/src#rm -rf intel

6.?????????????????????.bash_profile???????????????
. /opt/intel_fc_80/bin/ifortvars.sh

???????????????????????????????? $source .bash_profile

??????????????????????????????????first.f90??????
program first
print *, "Hello World!"
print *, sin(123.4)
end program first

???????????????Intel Fortran Compiler?????????�ifc�???????????????????
#ifort first.f90 -o first

??????????
#./first

???????
Hello World!
-0.7693915

?????????????????????????�ifort�????????�ifort -help�????????/opt/intel_fc_80/doc??????????

7.??Intel Fortran Compiler
#/opt/intel/Compiler/11.0/083/bin/ia32/uninstall_cprof.sh

F???

F ????Fortran Company / NAGWare F Compiler???Fortran 90/95??????????? Fortran 95?HPF??????????Fortran 77??????F??????Fortran 77??????????????? ??F????????http://www.fortran.com/F???

??F?????F?Windows?Linux?Solaris????????????GCC??????????????????GCC???

???????????????Linux???????ftp://ftp.swcp.com/pub/walt/F????f_linux_031017.tar.gz???2MB???????????/usr/src???????????????root????????????????????????????????????????????
#tar xzvf f_linux_031017.tar.gz
# cd F_031017
# cp bin/* /usr/local/bin
# mkdir /usr/local/lib/F
# cp -d -p lib/* /usr/local/lib/F
#mkdir /usr/local/man/man1
#cp doc/*.1 /usr/local/man/man1

????????examples????????????
#cd examples
#F sieve.f95 -o sieve

?????????????????sieve??????????????
#./sieve

There are 25 prime numbers less than 100
2 3 5 7 11
13 17 19 23 29
31 37 41 43 47��

?????????????????????????examples??????????????????doc???????????????F???????
get
 

Copyright © Video game tester Design by Free CSS Templates | Blogger Theme by BTDesigner | Powered by Blogger