Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
2 Views

32-bit option does not work on IFC 2017 on Mac OS 10

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.

IMG_3520.jpg

IMG_3521.jpg

0 Kudos
3 Replies
Highlighted
Employee
2 Views

What is a "look file"?

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

0 Kudos
Highlighted
Beginner
2 Views

Here are the results

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?

 

 

 

 

0 Kudos
Highlighted
Employee
2 Views

You can keep the source

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-lio...
http://apple.stackexchange.com/questions/12993/why-doesnt-bashrc-run-automatically
http://apple.stackexchange.com/questions/119711/why-doesnt-mac-os-x-source-bashrc

0 Kudos