- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page