- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
I am trying to compile my code in 32 bit on my Macbook Pro 2016.
I have added the line to the .bashrc
source /opt/intel/bin/compilervars.sh ia32
When I view my look file it shows that it is compiling in 64 bit.
Intel(R) Fortran Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 17.0.1.126 Build 20161013
Copyright (C) 1985-2016 Intel Corporation. All rights reserved.
My ia32 and intel64 folders in the /opt/intel/compilers_and_libraries_2017.1.126/mac/bin folder are different
I have attached pics to show the differences.
링크가 복사됨
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
What is a "look file"?
The directories do not appear out of order. Perhaps the .bashrc change is not accomplishing the setup desired.
In a terminal window can you try executing the following commands to see whether the compiler reports IA-32:
ifort -V
source ./compilervars.sh ia32
ifort -V
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Here are the results
Brians-MacBook-Pro-2:rs40fa.09.25.2014 brian.allison$ source /opt/intel/bin/compilervars.sh ia32
Brians-MacBook-Pro-2:rs40fa.09.25.2014 brian.allison$ ifort -V
Intel(R) Fortran Intel(R) 64 Compiler for applications running on IA-32, Version 17.0.1.126 Build 20161013
Copyright (C) 1985-2016 Intel Corporation. All rights reserved.
Brians-MacBook-Pro-2:rs40fa.09.25.2014 brian.allison$
So it looks like if I type source /opt/intel/bin/compilervars.sh ia32 on the terminal window, IFC runs 32 bit
So why is the line in the .bashrc line being ignored?
Where do I put the source line so that it runs 32 bit when terminal is opened?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
You can keep the source command for the compilervars in .bashrc but need to add to .bash_profile code to source .bashrc. The following minimal setup works on my system. The two files each have a single line in my case as shown below.
.bash_profile:
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi
.bashrc:
source /opt/intel/bin/compilervars.sh ia32
Why it is ignored relates to OS X (macOS). These references have details why:
http://superuser.com/questions/147043/where-to-find-the-bashrc-file-on-mac-os-x-snow-leopard-and-lion
http://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically
http://apple.stackexchange.com/questions/119711/why-doesnt-mac-os-x-source-bashrc
