[Wien] WIEN2k Version 19.1

Laurence Marks laurence.marks at gmail.com
Fri Jun 14 11:20:10 CEST 2019


While splitting it in two might work, you are relying upon variables such
as $ELPAROOT only being a certain length, so there is the possibility that
it might still break. A code such as (schematically)

cp Makefile.orig Makefile.tmp1
for i in FOPT FPOPT ...
do
A=_${i}_
B=\$I
sed s/$A/$B/ Makefile.tmp1 > Makefile.tmp2
mv Makefile.tmp2 Makefile.tmp1
done
cp Makefile.tmp1 Makefile

should be safe in 99.9999999% of cases. (I almost certainly did not
construct A & B right, but hopefully the general idea is clear.) There are
other ways to do this via a loop, or even a small fortran code.


On Fri, Jun 14, 2019 at 9:47 AM Gavin Abo <gsabo at crimson.ua.edu> wrote:

> FYI, it looks like the string cannot go much longer than from "sed -e
> "s^_FOPT_^$FOPT^" < Makefile.orig" to "sed -e "s^_ELPA_LIB_^$ELPA_LIB^"".
>
> If you can split the string in half over two alias, then that would
> likely allow csh to work on Ubuntu 18.04.2 just fine:
>
> username at computername:~/Desktop/test$ lsb_release -a
> No LSB modules are available.
> Distributor ID:    Ubuntu
> Description:    Ubuntu 18.04.2 LTS
> Release:    18.04
> Codename:    bionic
> username at computername:~/Desktop/test$ dpkg -l csh
> Desired=Unknown/Install/Remove/Purge/Hold
> |
>
> Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
> |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
> ||/ Name           Version      Architecture Description
>
> +++-==============-============-============-=================================
> ii  csh            20110502-3   amd64        Shell with C-like syntax
>
> username at computername:~/Desktop/test$ cat test
> #!/bin/csh -f
> alias update_makefiles 'sed -e "s^_FOPT_^$FOPT^" < Makefile.orig |\\
>   sed -e "s^_FOPT_^$FOPT^" |\\
>   sed -e "s^_FPOPT_^$FPOPT^" |\\
>   sed -e "s^_OMP_SWITCH_^$OMP_SWITCH^" |\\
>   sed -e "s^_LDFLAGS_^$LDFLAGS^" |\\
>   sed -e "s^_DPARALLEL_^$DPARALLEL^" |\\
>   sed -e "s^_R_LIBS_^$R_LIBS^" |\\
>   sed -e "s^_RP_LIBS_^$RP_LIBS^" |\\
>   sed -e "s^_SCALAPACKROOT_^$SCALAPACKROOT^" |\\
>   sed -e "s^_SCALAPACK_LIBNAME_^$SCALAPACK_LIBNAME^" |\\
>   sed -e "s^_BLACSROOT_^$BLACSROOT^" |\\
>   sed -e "s^_BLACS_LIBNAME_^$BLACS_LIBNAME^" |\\
>   sed -e "s^_MKL_TARGET_ARCH_^$MKL_TARGET_ARCH^" |\\
>   sed -e "s^_LIBXCROOT_^$LIBXCROOT^" |\\
>   sed -e "s^_LIBXC_LIBNAME_^$LIBXC_LIBNAME^" |\\
>   sed -e "s^_LIBXC_LIBDNAME_^$LIBXC_LIBDNAME^" |\\
>   sed -e "s^_LIBXC_FORTRAN_^$LIBXC_FORTRAN^" |\\
>   sed -e "s^_FFTW_VERSION_^$FFTW_VERSION^" |\\
>   sed -e "s^_FFTWROOT_^$FFTWROOT^" |\\
>   sed -e "s^_FFTW_LIB_^$FFTW_LIB^" |\\
>   sed -e "s^_FFTW_LIBNAME_^$FFTW_LIBNAME^" |\\
>   sed -e "s^_ELPAROOT_^$ELPAROOT^" |\\
>   sed -e "s^_ELPA_VERSION_^$ELPA_VERSION^" |\\
>   sed -e "s^_ELPA_LIB_^$ELPA_LIB^" |\\
>   sed -e "s^_ELPA_LIBNAME_^$ELPA_LIBNAME^" |\\
>   sed -e "s^_FC_^$f77^" |\\
>   sed -e "s^_MPF_^$MPF^" |\\
>   sed -e "s^_CC_^$c77^"> Makefile'
> username at computername:~/Desktop/test$ ./test
> Word too long.
>
> username at computername:~/Desktop/test$ cat test
> #!/bin/csh -f
> alias update_makefiles 'sed -e "s^_FOPT_^$FOPT^" < Makefile.orig |\\
>   sed -e "s^_FOPT_^$FOPT^" |\\
>   sed -e "s^_FPOPT_^$FPOPT^" |\\
>   sed -e "s^_OMP_SWITCH_^$OMP_SWITCH^" |\\
>   sed -e "s^_LDFLAGS_^$LDFLAGS^" |\\
>   sed -e "s^_DPARALLEL_^$DPARALLEL^" |\\
>   sed -e "s^_R_LIBS_^$R_LIBS^" |\\
>   sed -e "s^_RP_LIBS_^$RP_LIBS^" |\\
>   sed -e "s^_SCALAPACKROOT_^$SCALAPACKROOT^" |\\
>   sed -e "s^_SCALAPACK_LIBNAME_^$SCALAPACK_LIBNAME^" |\\
>   sed -e "s^_BLACSROOT_^$BLACSROOT^" |\\
>   sed -e "s^_BLACS_LIBNAME_^$BLACS_LIBNAME^" |\\
>   sed -e "s^_MKL_TARGET_ARCH_^$MKL_TARGET_ARCH^" |\\
>   sed -e "s^_LIBXCROOT_^$LIBXCROOT^" |\\
>   sed -e "s^_LIBXC_LIBNAME_^$LIBXC_LIBNAME^" |\\
>   sed -e "s^_LIBXC_LIBDNAME_^$LIBXC_LIBDNAME^" |\\
>   sed -e "s^_LIBXC_FORTRAN_^$LIBXC_FORTRAN^" |\\
>   sed -e "s^_FFTW_VERSION_^$FFTW_VERSION^" |\\
>   sed -e "s^_FFTWROOT_^$FFTWROOT^" |\\
>   sed -e "s^_FFTW_LIB_^$FFTW_LIB^" |\\
>   sed -e "s^_FFTW_LIBNAME_^$FFTW_LIBNAME^" |\\
>   sed -e "s^_ELPAROOT_^$ELPAROOT^" |\\
>   sed -e "s^_ELPA_VERSION_^$ELPA_VERSION^" |\\
>   sed -e "s^_ELPA_LIB_^$ELPA_LIB^"'
>
> alias update_makefiles1 'sed -e "s^_ELPA_LIBNAME_^$ELPA_LIBNAME^" |\\
>   sed -e "s^_FC_^$f77^" |\\
>   sed -e "s^_MPF_^$MPF^" |\\
>   sed -e "s^_CC_^$c77^"> Makefile'
> username at computername:~/Desktop/test$ ./test
>
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
>
> https://urldefense.proofpoint.com/v2/url?u=http-3A__zeus.theochem.tuwien.ac.at_mailman_listinfo_wien&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=SMPuExcKLCCqO98BW74LTAZmg0qDEm7uoKu9TJE_BuI&s=V6selw5shY-E3xWN0Aw2xw42toDEtw3wmeoACFCkPnc&e=
> SEARCH the MAILING-LIST at:
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.mail-2Darchive.com_wien-40zeus.theochem.tuwien.ac.at_index.html&d=DwIGaQ&c=yHlS04HhBraes5BQ9ueu5zKhE7rtNXt_d012z2PA6ws&r=U_T4PL6jwANfAy4rnxTj8IUxm818jnvqKFdqWLwmqg0&m=SMPuExcKLCCqO98BW74LTAZmg0qDEm7uoKu9TJE_BuI&s=RKJ2N4Pbo5KQ1suX2WuITrfLZMh2ZyDQFUtqNX6olU0&e=
>


-- 
Professor Laurence Marks
Department of Materials Science and Engineering
Northwestern University
www.numis.northwestern.edu
Corrosion in 4D: www.numis.northwestern.edu/MURI
Co-Editor, Acta Cryst A
"Research is to see what everybody else has seen, and to think what nobody
else has thought"
Albert Szent-Gyorgi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20190614/5e37bdef/attachment.html>


More information about the Wien mailing list