Command not found Error

Command not found Error

Hi

I have problem with compiling my program on MTL through the make file

when i write

  1. $source/opt/intel/bin/compilervars.shintel64
  2. $icpc -lrt-ltbb-Wall-g-oprogprog.c

I get source : command not found

13 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hidid you add the library to the $PATH variableon your linux distrib ?

I think arnaud would say that you also can manually add the environnment variables of compilervars.sh directly to your ~/.bashrc (don't forget to export them).The source command execute the script and update the variables in the shell.
What kind of shell do you use (Bash, Zsh, other) ?

Quoting mah.nabil
$source/opt/intel/bin/compilervars.shintel64
I get source : command not found

"source" is a builtin of your sheel which executes a shell script and add "share" the environment with this script to add variables/functions/aliases to the shell environment.

Most likely, your sheel doesn't have the "source" builtin.

Try using BASH as a shell :

$ bash

Then try your commands :)

who can I use the BASH as a shell?Thanks in advance. :)

I am using putty to connect to the MTL and when I write the source command through puttyit works fine while when I write it in the make file I get source command not found also i tried1-$ bash2-$ Source / opt / intel / bin / compilervars.sh Intel64and it didn't work

Linux is not windows :)
Commands are case sensitive, use "source", and not "Source".

still not working ,sorry .I am a beginner and this is the make file i use

GCC_VERSION = 4.5.1
PREFIX = /opt/gcc/${GCC_VERSION}/bin
CC = ${PREFIX}/gcc
CPP = ${PREFIX}/g++
LD_LIBRARY_PATH = /opt/mpfr/lib:/opt/gmp/lib:/opt/mpc/lib:/opt/intel/bin
all: *.cpp
	$ source /opt/intel/bin/compilervars.sh intel64  
	$ icpc -o run main.cpp -fopenmp

Thanks in advance,

There should not be "$" in the lmast two lines.
Could you print the error message?

I changed it to

GCC_VERSION = 4.5.1
PREFIX = /opt/gcc/${GCC_VERSION}/bin
CC = ${PREFIX}/gcc
CPP = ${PREFIX}/g++
LD_LIBRARY_PATH = /opt/mpfr/lib:/opt/gmp/lib:/opt/mpc/lib:/opt/intel/bin

all: *.cpp
	 source /opt/intel/bin/compilervars.sh intel64  
	 icpc -o run main.cpp -fopenmp

and getting the same message

source /opt/intel/bin/compilervars.sh intel64
make: source: Command not found
make: *** [all] Error 127

Your are not suppose to "source" in a makefile. Do that in your shell and copy the environment variable needed in your makefile.

Thanks megra-one final thing can you give example onthe environment variable needed?

Depending on the library used, you may need to modify your PATH, INCLUDE environment variable.
Check the compilevars.sh for env vars.

Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui