phenix.phaser PATH problem
Dear all, It's long story: At beginning, I have phenix installed. I do not have CCP4 installed. Then I run "phenix.phaser params.eff" to call phenix run phaser from script params.eff. It works well. Then, I installed CCP4 with its own phaser inside. Then I run again "phenix.phaser params.eff". The computer start to import files (should be some libraries and supporting files, not input data) from CCP4 installation directory. It seems so strange for me. And because some of the .so files in CCP4 directory are for 32bit, phenix.phaser gave me error message: wrong ELF class: ELFCLASS32 and refused to keep running. I guess I could solve this problem by copying the same .so file in phenix directory into CCP4's directory. What I really want to know is why this happen. Is that the installation of CCP4 changed some kinds of PATH variables for phenix? How could I fix by giving a right path again? I would appreciate to any help. Thanks a lot guys! Best regards, GP
Hopefully, all you need to do is source phenix_env last.
E.g. look in your .cshrc or .bashrc file with the phenix and ccp4 source
commands.
Reorder the commands so that phenix comes after the ccp4 command.
Then open a new shell and run "phenix.phaser params.eff" again.
Could you try that?
(I recommend against copying files from the phenix to the ccp4 tree.)
Ralf
On Wed, Jul 20, 2011 at 11:21 AM, G P
Dear all,
It's long story:
At beginning, I have phenix installed. I do not have CCP4 installed. Then I run "phenix.phaser params.eff" to call phenix run phaser from script params.eff. It works well. Then, I installed CCP4 with its own phaser inside. Then I run again "phenix.phaser params.eff". The computer start to import files (should be some libraries and supporting files, not input data) from CCP4 installation directory. It seems so strange for me.
And because some of the .so files in CCP4 directory are for 32bit, phenix.phaser gave me error message: wrong ELF class: ELFCLASS32 and refused to keep running. I guess I could solve this problem by copying the same .so file in phenix directory into CCP4's directory.
What I really want to know is why this happen. Is that the installation of CCP4 changed some kinds of PATH variables for phenix? How could I fix by giving a right path again?
I would appreciate to any help. Thanks a lot guys!
Best regards, GP
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
Hi Ralf, Thanks a lot for your help. I changed the order and it works now. But I am wondering why? Is that means the .bashrc script will read lines from down to up which allow it to see the line of source for phenix first? Thanks a lot again! cheers, GP On Wed, Jul 20, 2011 at 10:35 PM, Ralf Grosse-Kunstleve < [email protected]> wrote:
Hopefully, all you need to do is source phenix_env last. E.g. look in your .cshrc or .bashrc file with the phenix and ccp4 source commands. Reorder the commands so that phenix comes after the ccp4 command. Then open a new shell and run "phenix.phaser params.eff" again. Could you try that? (I recommend against copying files from the phenix to the ccp4 tree.) Ralf
On Wed, Jul 20, 2011 at 11:21 AM, G P
wrote: Dear all,
It's long story:
At beginning, I have phenix installed. I do not have CCP4 installed. Then I run "phenix.phaser params.eff" to call phenix run phaser from script params.eff. It works well. Then, I installed CCP4 with its own phaser inside. Then I run again "phenix.phaser params.eff". The computer start to import files (should be some libraries and supporting files, not input data) from CCP4 installation directory. It seems so strange for me.
And because some of the .so files in CCP4 directory are for 32bit, phenix.phaser gave me error message: wrong ELF class: ELFCLASS32 and refused to keep running. I guess I could solve this problem by copying the same .so file in phenix directory into CCP4's directory.
What I really want to know is why this happen. Is that the installation of CCP4 changed some kinds of PATH variables for phenix? How could I fix by giving a right path again?
I would appreciate to any help. Thanks a lot guys!
Best regards, GP
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
I have this in my .bashrc, I use the command phenix_setup only before I start using phenix: --- # to use locally installed phenix function phenix_setup() { PHENIX_ENV=\ /usr/local/phenix-dev/phenix-dev-756/phenix-dev-756/phenix_env.sh if [ -f $PHENIX_ENV ]; then source $PHENIX_ENV fi } --- I use the same kind of trick for CCP4. PS: You need to adapt this code to where your phenix_env.sh is installed. On 07/21/2011 06:20 PM, G P wrote:
Hi Ralf,
Thanks a lot for your help. I changed the order and it works now. But I am wondering why? Is that means the .bashrc script will read lines from down to up which allow it to see the line of source for phenix first?
Thanks a lot again!
cheers, GP
On Wed, Jul 20, 2011 at 10:35 PM, Ralf Grosse-Kunstleve
mailto:[email protected]> wrote: Hopefully, all you need to do is source phenix_env last. E.g. look in your .cshrc or .bashrc file with the phenix and ccp4 source commands. Reorder the commands so that phenix comes after the ccp4 command. Then open a new shell and run "phenix.phaser params.eff" again. Could you try that? (I recommend against copying files from the phenix to the ccp4 tree.) Ralf
On Wed, Jul 20, 2011 at 11:21 AM, G P
mailto:[email protected]> wrote: Dear all,
It's long story:
At beginning, I have phenix installed. I do not have CCP4 installed. Then I run "phenix.phaser params.eff" to call phenix run phaser from script params.eff. It works well. Then, I installed CCP4 with its own phaser inside. Then I run again "phenix.phaser params.eff". The computer start to import files (should be some libraries and supporting files, not input data) from CCP4 installation directory. It seems so strange for me.
And because some of the .so files in CCP4 directory are for 32bit, phenix.phaser gave me error message: wrong ELF class: ELFCLASS32 and refused to keep running. I guess I could solve this problem by copying the same .so file in phenix directory into CCP4's directory.
What I really want to know is why this happen. Is that the installation of CCP4 changed some kinds of PATH variables for phenix? How could I fix by giving a right path again?
I would appreciate to any help. Thanks a lot guys!
Best regards, GP
_______________________________________________ phenixbb mailing list [email protected] mailto:[email protected] http://phenix-online.org/mailman/listinfo/phenixbb
_______________________________________________ phenixbb mailing list [email protected] mailto:[email protected] http://phenix-online.org/mailman/listinfo/phenixbb
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
Thanks, Francois!
To define a permanent variable and source it in bashrc. That's really a good
idea.
But Ralf's suggestion seems more amazing, why and how does the order of
source command in .bashrc affect? I am wondering.
On Thu, Jul 21, 2011 at 11:29 AM, Francois Berenger
I have this in my .bashrc, I use the command phenix_setup only before I start using phenix:
--- # to use locally installed phenix function phenix_setup() { PHENIX_ENV=\ /usr/local/phenix-dev/phenix-**dev-756/phenix-dev-756/phenix_**env.sh if [ -f $PHENIX_ENV ]; then source $PHENIX_ENV fi } ---
I use the same kind of trick for CCP4.
PS: You need to adapt this code to where your phenix_env.sh is installed.
On 07/21/2011 06:20 PM, G P wrote:
Hi Ralf,
Thanks a lot for your help. I changed the order and it works now. But I am wondering why? Is that means the .bashrc script will read lines from down to up which allow it to see the line of source for phenix first?
Thanks a lot again!
cheers, GP
On Wed, Jul 20, 2011 at 10:35 PM, Ralf Grosse-Kunstleve
>> wrote: Hopefully, all you need to do is source phenix_env last. E.g. look in your .cshrc or .bashrc file with the phenix and ccp4 source commands. Reorder the commands so that phenix comes after the ccp4 command. Then open a new shell and run "phenix.phaser params.eff" again. Could you try that? (I recommend against copying files from the phenix to the ccp4 tree.) Ralf
On Wed, Jul 20, 2011 at 11:21 AM, G P
mailto:[email protected]**> wrote: Dear all,
It's long story:
At beginning, I have phenix installed. I do not have CCP4 installed. Then I run "phenix.phaser params.eff" to call phenix run phaser from script params.eff. It works well. Then, I installed CCP4 with its own phaser inside. Then I run again "phenix.phaser params.eff". The computer start to import files (should be some libraries and supporting files, not input data) from CCP4 installation directory. It seems so strange for me.
And because some of the .so files in CCP4 directory are for 32bit, phenix.phaser gave me error message: wrong ELF class: ELFCLASS32 and refused to keep running. I guess I could solve this problem by copying the same .so file in phenix directory into CCP4's directory.
What I really want to know is why this happen. Is that the installation of CCP4 changed some kinds of PATH variables for phenix? How could I fix by giving a right path again?
I would appreciate to any help. Thanks a lot guys!
Best regards, GP
______________________________**_________________ phenixbb mailing list [email protected]
http://phenix-online.org/**mailman/listinfo/phenixbbhttp://phenix-online.org/mailman/listinfo/phenixbb
______________________________**_________________ phenixbb mailing list [email protected]
http://phenix-online.org/**mailman/listinfo/phenixbbhttp://phenix-online.org/mailman/listinfo/phenixbb
______________________________**_________________ phenixbb mailing list [email protected] http://phenix-online.org/**mailman/listinfo/phenixbbhttp://phenix-online.org/mailman/listinfo/phenixbb
______________________________**_________________ phenixbb mailing list [email protected] http://phenix-online.org/**mailman/listinfo/phenixbbhttp://phenix-online.org/mailman/listinfo/phenixbb
G P wrote:
But Ralf's suggestion seems more amazing, why and how does the order of source command in .bashrc affect? I am wondering.
Thanks a lot for your help. I changed the order and it works now. But I am wondering why? Is that means the .bashrc script will read lines from down to up which allow it to see the line of source for phenix first?
No- when you try to execute the command, the path is searched and the first executable instance of command is executed. If the setup scripts add the new directories to the front of the path, then whichever ran last will have its directory first in the path,and it will be used. CCP4 has the option of adding its directories to the end of the path, so it will not take over some command that is already working but if nothing else is available the path is searched to the very end and the ccp4 command is found. in ccp4.setup-bash: # By default, CCP4 directories are prepended to the beginning of paths (PATH, # LD_LIBRARY_PATH, and DYLD_LIBRARY_PATH). If ccp4_first_in_path is set # to 0, then they will be appended to the end of paths. # When deciding local policy, bear in mind the possible existence of # other CCP4 installations, and the possibility of non-CCP4 programs # with conflicting names. ccp4_first_in_path=1 ~~~~~~~~~~~~` if [ $ccp4_first_in_path -eq 1 ]; then setenv PATH ${dir}:${PATH} else setenv PATH ${PATH}:${dir} fi (and likewise for classpath, shared library path, python path etc)
To add to the information provided by Francois and Ed:
The .bashrc file is read only when a new shell is started (not each time you
execute a command).
The source phenix_env.sh command prepends an entry to PATH. To see the
result try:
echo $PATH
This PATH determines the order in which commands are found.
If you have phenix.phaser in PHENIX and another one in CCP4, you can
determine which one is used by the order in which the phenix and ccp4
directories appear in $PATH.
Ralf
On Thu, Jul 21, 2011 at 2:20 AM, G P
Hi Ralf,
Thanks a lot for your help. I changed the order and it works now. But I am wondering why? Is that means the .bashrc script will read lines from down to up which allow it to see the line of source for phenix first?
Thanks a lot again!
cheers, GP
On Wed, Jul 20, 2011 at 10:35 PM, Ralf Grosse-Kunstleve < [email protected]> wrote:
Hopefully, all you need to do is source phenix_env last. E.g. look in your .cshrc or .bashrc file with the phenix and ccp4 source commands. Reorder the commands so that phenix comes after the ccp4 command. Then open a new shell and run "phenix.phaser params.eff" again. Could you try that? (I recommend against copying files from the phenix to the ccp4 tree.) Ralf
On Wed, Jul 20, 2011 at 11:21 AM, G P
wrote: Dear all,
It's long story:
At beginning, I have phenix installed. I do not have CCP4 installed. Then I run "phenix.phaser params.eff" to call phenix run phaser from script params.eff. It works well. Then, I installed CCP4 with its own phaser inside. Then I run again "phenix.phaser params.eff". The computer start to import files (should be some libraries and supporting files, not input data) from CCP4 installation directory. It seems so strange for me.
And because some of the .so files in CCP4 directory are for 32bit, phenix.phaser gave me error message: wrong ELF class: ELFCLASS32 and refused to keep running. I guess I could solve this problem by copying the same .so file in phenix directory into CCP4's directory.
What I really want to know is why this happen. Is that the installation of CCP4 changed some kinds of PATH variables for phenix? How could I fix by giving a right path again?
I would appreciate to any help. Thanks a lot guys!
Best regards, GP
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
_______________________________________________ phenixbb mailing list [email protected] http://phenix-online.org/mailman/listinfo/phenixbb
participants (4)
-
Edward A. Berry
-
Francois Berenger
-
G P
-
Ralf Grosse-Kunstleve