<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello all,<div class=""><br class=""></div><div class="">If I understand correctly, sed is the main problem. So, isn’t there an alternative to sed? (e.g. awk, perl, python,…).</div><div class=""><br class=""></div><div class="">Best regards,</div><div class="">Pascal</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"><span class="" style="font-size: 16pt; font-family: Mistral;">Pascal Boulet</span></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"><font face="Lucida Handwriting" class=""><span class="" style="font-size: 21px;">—</span></font></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"><em class="" style="color: rgb(34, 187, 234); font-family: verdana; font-size: 11px; line-height: 22px;">Professor in computational chemistry - DEPARTMENT OF CHEMISTRY</em></div><div class=""><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 15px; line-height: 22px;"><span class="" style="font-size: 11px; font-family: verdana;">Aix-Marseille University </span><span class="" style="font-size: 11px; font-family: verdana;">- Avenue Escadrille Normandie Niemen - F-13013 Marseille - FRANCE</span></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; font-size: 15px; line-height: 22px;"><span class="" style="font-size: 11px; font-family: verdana;">Tél: +33(0)4 13 55 18 10 - Fax : +33(0)4 13 55 18 50</span></div><div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px;"><font face="verdana" class=""><span class="" style="font-size: 12px; line-height: 22px;">Email : </span></font><font color="#22bbea" face="verdana" class=""><span style="font-size: 12px; line-height: 20px;" class=""><a href="mailto:pascal.boulet@univ-amu.fr" class="">pascal.boulet@univ-amu.fr</a></span></font></div><div class="" style="font-size: 14px;"><br class=""></div></div></div></div></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<div><br class=""><blockquote type="cite" class=""><div class="">Le 15 juin 2019 à 19:39, Gavin Abo <<a href="mailto:gsabo@crimson.ua.edu" class="">gsabo@crimson.ua.edu</a>> a écrit :</div><br class="Apple-interchange-newline"><div class="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">
<div text="#000000" bgcolor="#FFFFFF" class=""><p class=""><b class="">tcsh solution</b></p><p class="">If this solution is adopted, I suggest only changing the
siteconfig_lapw script with csh to tcsh.<br class="">
</p><p class="">Advantages:</p><p class="">1. Simple KISS solution of changing csh to tcsh</p><p class="">2. Developers (e.g. [1]) using csh symbolic link to tcsh do not
introduce tcsh code into a csh script<br class="">
</p><p class="">3. WIEN2k contains a few tcsh scripts [2], which have been there
since at least 2016 [3]. Perhaps it is better for users that an
uninstall tcsh problem is noticed earlier [4] and not later during
running of the the program were it might be overlooked [5,6].<br class="">
</p><p class="">Disadvantages:</p><p class="">1. On Linux systems with only csh installed as part of the
default installation, the install script will not work until tcsh
is installed<br class="">
</p><p class="">2. The /bin/tcsh path might be different between Linux
distributions (e.g., /usr/bin/tcsh [7]). As I think was
previously mentioned, siteconfig script likely could be updated in
the future so a user can enter a path and have the scripts updated
with the path so that users do not have to do it manually similar
to what siteconfig_lapw does for perl or rsh/ssh.<br class="">
</p><p class=""><b class="">csh solution</b></p><p class="">Advantages:</p><p class="">1. For Linux systems with only csh installed as part of the
default installation, siteconfig_lapw should work as it has in the
past<br class="">
</p><p class="">Disadvantages:<br class="">
</p><p class="">1. I think I came up with a simple solution that might work, but
it may be less convenient for software maintenance since if the
number of sed lines grows, then additional alias and
update_makefilesN lines need to be made.</p><p class="">There currently are four places in siteconfig_lapw of WIEN2k 19.1
with execution of update_makefiles [8].</p><p class="">Change lines:</p><p class="">update_makefiles</p><p class="">to</p>
update_makefiles01<br class="">
update_makefiles02
<p class="">Then, breaking the 'alias update_makefiles' into two different
alias while using a Makefile.tmp1 file seems to work:<br class="">
</p><p class="">alias update_makefiles01 'sed -e "s^_FOPT_^$FOPT^" <
Makefile.orig |\\<br class="">
sed -e "s^_FOPT_^$FOPT^" |\\<br class="">
sed -e "s^_FPOPT_^$FPOPT^" |\\<br class="">
sed -e "s^_OMP_SWITCH_^$OMP_SWITCH^" |\\<br class="">
sed -e "s^_LDFLAGS_^$LDFLAGS^" |\\<br class="">
sed -e "s^_DPARALLEL_^$DPARALLEL^" |\\<br class="">
sed -e "s^_R_LIBS_^$R_LIBS^" |\\<br class="">
sed -e "s^_RP_LIBS_^$RP_LIBS^" |\\<br class="">
sed -e "s^_SCALAPACKROOT_^$SCALAPACKROOT^" |\\<br class="">
sed -e "s^_SCALAPACK_LIBNAME_^$SCALAPACK_LIBNAME^" |\\<br class="">
sed -e "s^_BLACSROOT_^$BLACSROOT^" |\\<br class="">
sed -e "s^_BLACS_LIBNAME_^$BLACS_LIBNAME^" |\\<br class="">
sed -e "s^_MKL_TARGET_ARCH_^$MKL_TARGET_ARCH^" |\\<br class="">
sed -e "s^_LIBXCROOT_^$LIBXCROOT^" |\\<br class="">
sed -e "s^_LIBXC_LIBNAME_^$LIBXC_LIBNAME^" |\\<br class="">
sed -e "s^_LIBXC_LIBDNAME_^$LIBXC_LIBDNAME^" |\\<br class="">
sed -e "s^_LIBXC_FORTRAN_^$LIBXC_FORTRAN^" |\\<br class="">
sed -e "s^_FFTW_VERSION_^$FFTW_VERSION^"> Makefile.tmp1'<br class="">
alias update_makefiles02 'sed -e "s^_FFTWROOT_^$FFTWROOT^" <
Makefile.tmp1 |\\<br class="">
sed -e "s^_FFTW_LIB_^$FFTW_LIB^" |\\<br class="">
sed -e "s^_FFTW_LIBNAME_^$FFTW_LIBNAME^" |\\<br class="">
sed -e "s^_ELPAROOT_^$ELPAROOT^" |\\<br class="">
sed -e "s^_ELPA_VERSION_^$ELPA_VERSION^" |\\<br class="">
sed -e "s^_ELPA_LIB_^$ELPA_LIB^" |\\<br class="">
sed -e "s^_ELPA_LIBNAME_^$ELPA_LIBNAME^" |\\<br class="">
sed -e "s^_FC_^$f77^" |\\<br class="">
sed -e "s^_MPF_^$MPF^" |\\<br class="">
sed -e "s^_CC_^$c77^"> Makefile'<br class="">
</p><p class="">Though, Prof. Marks' solution to change "alias update_makefiles"
to a loop might work better [9]. It would likely take more
adjustment and testing to get that right, though.</p><p class="">I'm thinking the code to do that would be similar to following,
but I'm missing some code like an if statement to handle the FC
and CC cases which are unique in that they use $f77 and $c77 for
the sed replacement, respectively.<br class="">
</p>
alias update_makefiles 'cp Makefile.orig Makefile.tmp1; \\<br class="">
foreach i (FOPT FPOPT OMP_SWITCH \\<br class="">
LDFLAGS LDFLAGS DPARALLEL R_LIBS \\<br class="">
R_LIBS RP_LIBS SCALAPACKROOT SCALAPACK_LIBNAME \\<br class="">
BLACSROOT BLACS_LIBNAME MKL_TARGET_ARCH \\<br class="">
LIBXCROOT LIBXC_LIBNAME LIBXC_FORTRAN FFTW_VERSION \\ <br class="">
FFTW_LIB FFTW_LIBNAME ELPAROOT ELPA_VERSION \\<br class="">
ELPA_LIB ELPA_LIBNAME FC MPF CC) \\<br class="">
sed -e "s^_$i_^$i^" Makefile.tmp1 > Makefile.tmp2 \\<br class="">
mv Makefile.tmp2 Makefile.tmp1 \\<br class="">
end; \\<br class="">
cp Makefile.tmp1 Makefile'
<p class="">[1]
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16028.html">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16028.html</a><br class="">
</p><p class="">[2]</p><p class=""><a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/WIEN2k19.1$">username@computername:~/WIEN2k19.1$</a> grep -R /bin/tcsh *<br class="">
oldvec2vec:#!/bin/tcsh -f<br class="">
oldvec2vec_lapw:#!/bin/tcsh -f<br class="">
opticcopy:#!/bin/tcsh -f<br class="">
opticcopy_lapw:#!/bin/tcsh -f<br class="">
qsub-job0-sge:#!/bin/tcsh<br class="">
qsub-job0-sge:#$ -S /bin/tcsh<br class="">
qsub-job0-sge_lapw:#!/bin/tcsh<br class="">
qsub-job0-sge_lapw:#$ -S /bin/tcsh<br class="">
SRC/vec2old_lapw:#!/bin/tcsh -f<br class="">
SRC/vec2pratt_lapw:#!/bin/tcsh -f<br class="">
SRC/qsub-job0-sge_lapw:#!/bin/tcsh<br class="">
SRC/qsub-job0-sge_lapw:#$ -S /bin/tcsh<br class="">
SRC/oldvec2vec_lapw:#!/bin/tcsh -f<br class="">
SRC/opticcopy_lapw:#!/bin/tcsh -f<br class="">
SRC_structeditor/bin/xncm:#!/bin/tcsh -f<br class="">
SRC_structeditor/install:#!/bin/tcsh -f<br class="">
Binary file SRC_structeditor.tar matches<br class="">
Binary file SRC.tar matches<br class="">
SRC_vecpratt/vec2pratt_lapw:#!/bin/tcsh -f<br class="">
Binary file SRC_vecpratt.tar matches<br class="">
vec2old:#!/bin/tcsh -f<br class="">
vec2old_lapw:#!/bin/tcsh -f<br class="">
vec2pratt:#!/bin/tcsh -f<br class="">
vec2pratt_lapw:#!/bin/tcsh -f</p><p class="">[3]
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg14969.html">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg14969.html</a></p><p class="">[4]
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg17845.html">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg17845.html</a></p><p class="">[5]
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg11180.html">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg11180.html</a></p><p class="">[6]
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien%40zeus.theochem.tuwien.ac.at/msg10649.html">https://www.mail-archive.com/wien%40zeus.theochem.tuwien.ac.at/msg10649.html</a></p><p class="">[7]
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg17846.html">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg17846.html</a></p><p class="">[8] <br class="">
</p><p class=""><a class="moz-txt-link-abbreviated" href="mailto:username@computername:~/WIEN2k19.1$">username@computername:~/WIEN2k19.1$</a> grep update_makefiles
siteconfig_lapw<br class="">
alias update_makefiles 'sed -e "s^_FOPT_^$FOPT^" <
Makefile.orig |\\<br class="">
update_makefiles<br class="">
update_makefiles<br class="">
update_makefiles<br class="">
update_makefiles</p><p class="">[9]
<a class="moz-txt-link-freetext" href="https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18732.html">https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18732.html</a><br class="">
</p>
<div class="moz-cite-prefix">On 6/14/2019 1:25 AM, Peter Blaha
wrote:<br class="">
</div>
<blockquote type="cite" cite="mid:55cdfe1c-9e36-2a00-7f15-af3bb16da5c3@theochem.tuwien.ac.at" class="">I'm
aware of the basic problem.
<br class="">
<br class="">
The point is:
<br class="">
<br class="">
Ubuntu (any other Linux system ??) does not set this link making
csh and tcsh the same.
<br class="">
<br class="">
Should we therefore change all scripts to /bin/tcsh ???
<br class="">
<br class="">
Would there be some Linux systems where this would introduce
problems (with their default installations), for instance because
a tcsh is NOT installed by default (while a csh is) ?
<br class="">
<br class="">
If all Linux (Mac !!! ???) systems understand /bin/tcsh, this
change would be fine with me.
<br class="">
<br class="">
Any response from "Linux gurus" with experience with different
Linux versions (I only have Suse and Redhat) would be appreciated.
<br class="">
<br class="">
Peter
<br class="">
</blockquote>
</div>
_______________________________________________<br class="">Wien mailing list<br class=""><a href="mailto:Wien@zeus.theochem.tuwien.ac.at" class="">Wien@zeus.theochem.tuwien.ac.at</a><br class="">http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien<br class="">SEARCH the MAILING-LIST at: http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html<br class=""></div></blockquote></div><br class=""></div></body></html>