Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

running setvars.sh automatically

solarjtk
Beginner
673 Views

Hi,

I am trying to figure out if I can set up my .tcshrc file to source the setvars file every time I launch Terminal.  I read Ron Green's post about how to do this from the command line interactively, which also says not to put the command into your <whatever>rc file (did that, got the infinite loop). Has anyone else figured out how to do this under the tcsh shell, or rewritten the setvars.sh to work under that shell? Sorry but I'm too old to learn another shell, and I have lots of shortcuts that work under tcsh. Thanks!

 

Info: MacOS 12.6.2, oneAPI Base Kit installed.

0 Kudos
1 Reply
Ron_Green
Moderator
613 Views

You can create your own  setvars.csh 

Read this article and get env2

Then it's simply:

perl ./env2 -from bash -to tcsh /opt/intel/oneapi/setvars.sh >> setvars.csh

 

I'd edit the output setvars.csh and add line 1 shell

#!/bin/tcsh

 

Then 'chmod +x setvars.csh' and maybe add to /usr/local/bin, or /opt/intel/oneapi or your own ~/bin and source it from your startup dot file.

 

0 Kudos
Reply