cannot execute binary file

Questions regarding the compilation of VASP on various platforms: hardware, compilers and libraries, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
linglin

cannot execute binary file

#1 Post by linglin » Tue Apr 15, 2008 12:52 pm

I copy the compiled VASP to my Linux bin folder. But when I type "./vasp" in my working filefolder, it said "cannot execute binary file" I'm not familiar with Linux. But I see the vasp is rwx property. Can you tell me why?
Last edited by linglin on Tue Apr 15, 2008 12:52 pm, edited 1 time in total.

admin
Administrator
Administrator
Posts: 2921
Joined: Tue Aug 03, 2004 8:18 am
License Nr.: 458

cannot execute binary file

#2 Post by admin » Wed Apr 16, 2008 10:02 am

you have to run vasp with the correct address, ./vasp assumes that vasp is in your working directory (the current directory where you start the calculation from).
either
-- give the complete correct path ....../bin/vasp
or
-- if the directory where you have stored vasp is in your $PATH, simply give vasp (without ./)
-- make a soft link to vasp from your working directory
ln -s ....../bin/vasp vasp
and start with vasp in your current directory
(....../bin/vasp denotes the path here, please find it out by typing 'which vasp' or 'whereis vasp' )
Last edited by admin on Wed Apr 16, 2008 10:02 am, edited 1 time in total.

linglin

cannot execute binary file

#3 Post by linglin » Thu Apr 17, 2008 11:46 am

I don't think it's the problem. Because I copied the vasp to my working directory,and run it, it also said"cannot execute binary file". My tutor compiled the vasp in his comupter, then I copied to my computer, maybe the problem is the PATH? And do need to compile the vasp in my computer again?
Last edited by linglin on Thu Apr 17, 2008 11:46 am, edited 1 time in total.

admin
Administrator
Administrator
Posts: 2921
Joined: Tue Aug 03, 2004 8:18 am
License Nr.: 458

cannot execute binary file

#4 Post by admin » Mon Apr 21, 2008 11:53 am

maybe you simply do not have execution permission of the executable (if someone else has compiled it on a different computer, this may be the case)
please check by giving ls -l vasp :
1) if you are the owner and you are in the group of the owner.
If you are not, please change the owner by using the chown command (have a look at the man-pages)
Furthermore, you should have execute permission: have a look at the ls -l output should give
-rwxr-xr-x as the first column. if the x are missing, please change the access permissions using the chmod command

Another reason for the error might be that the architecture of the computer on which vasp was compiled is not the same as the one on your computer. please ask your tutor concerning this.
Last edited by admin on Mon Apr 21, 2008 11:53 am, edited 1 time in total.

Post Reply