[Wien] w2web problem

Gavin Abo gsabo at crimson.ua.edu
Thu Apr 25 19:08:23 CEST 2013


Once you set the perl path to something other than "/usr/bin/perl" 
(seems to be "q" in this case), you cannot change it in siteconfig 
because of line 229 in siteconfig_lapw:

sed -e "s^/usr/bin/perl^$perlpath^" $ii >$ii.tmp

The sed command says to replace "/usr/bin/perl" (not "q") with the path 
you input ($perlpath).  So you have to remove SRC_w2web (or Wien2k) and 
install it again from scratch.

or

You can try the attached script written as a potential improvement for 
siteconfig at your own risk, because it has not been thoroughly tested. 
Just place it in your WIENROOT directory /opt/wien and run it in a 
terminal with:

./w2webperl

Then, run w2web again.

On 4/25/2013 5:09 AM, wasim raja Mondal wrote:
> Dear wien2k experts,
>
> I have reinstalled wien2k_12 version in ubuntu 11.0 with ifort 
> compiler (version 13.0) and mkl liberary . I have compiled all the 
> programmes with no error . In the last step of ./siteconfigure_lapw I 
> have chosen the perl path as /usr/bin/perl. After I did the 
> userconfig_lapw > when I am trying to connect w2web I am getting this 
> error
>
> -bash: /opt/wien/w2web: q: bad interpreter: No such file or directory
>
> I am in root directory.
>
> My bashrc in directory is
>
> # added by WIEN2k: BEGIN
> # --------------------------------------------------------
> alias lsi="ls -aslp *.in*"
> alias lso="ls -aslp *.ou*"
> alias lsd="ls -aslp *.def"
> alias lsc="ls -aslp *.cl*"
> alias lss="ls -aslp *.sc*"
> alias lse="ls -aslp *.error"
> alias pslapw="ps -ef |grep "lapw""
> alias cdw="cd /root/WIEN2k"
> export OMP_NUM_THREADS=1
> #export LD_LIBRARY_PATH=.....
> export EDITOR="emacs"
> export SCRATCH=./
> export WIENROOT=/opt/wien
> export W2WEB_CASE_BASEDIR=/root/WIEN2k
> export STRUCTEDIT_PATH=$WIENROOT/SRC_structeditor/bin
> export PDFREADER=acroread
> export PATH=$PATH:$WIENROOT:$STRUCTEDIT_PATH:.
> export OCTAVE_EXEC_PATH=${PATH}::
> export OCTAVE_PATH=${STRUCTEDIT_PATH}::
>
> export PATH=$PATH:$WIENROOT:.
> ulimit -s unlimited
> alias octave="octave -p $OCTAVE_PATH"
> # --------------------------------------------------------
> # added by WIEN2k: END
>
> Please help me.
>
> Regards
> wasim
>

-------------- next part --------------
#!/bin/csh -f
#
# w2webperl
#
# Use this script at your own risk
#
# This script should be placed and ran in base directory of Wien2k 12.1 ($WIENROOT).
#
# It tries to change the perl paths in SRC_w2web
#
set name  = $0
set bin         = $name:h       #default directory for WIEN-executables
if !(-d $bin) set bin = .
cd $bin
set bin   = `pwd`	        #directory of WIEN-executables

# The section below is a potential replacement for the ":perl" section in .siteconfig_lapw 
#perl:
clear
set oldperlpath=`head -1 $bin/SRC_w2web/w2web | tr -d "#!"`
cat <<EOF

Specify the path of the perl program. The default is 

		    /usr/bin/perl

Current path: $oldperlpath

EOF

echo -n " Please enter the full path of the perl program: "

set input = ($<)
if !("$input" == "") then
    set perlpath = "$input"
else
    set perlpath='/usr/bin/perl'
endif

set oldperlpath = "#\!$oldperlpath"
set perlpath = "#\!$perlpath"

          cd $bin/SRC_w2web
          foreach ii ( w2web bin/w2web */*.pl */*/*.pl */*.cgi */*/*.cgi */*/*.wml )
            sed -e "s^$oldperlpath^$perlpath^" $ii >$ii.tmp
            mv $ii.tmp $ii
            chmod +x $ii
          end
        echo "The perlpath has been changed in all perl and cgi scripts of SRC_w2web "
        cd $bin
wait
#goto main




More information about the Wien mailing list