[Wien] WIEN2k Version 19.1

Gavin Abo gsabo at crimson.ua.edu
Sat Jun 15 19:39:34 CEST 2019


*tcsh solution*

If this solution is adopted, I suggest only changing the siteconfig_lapw 
script with csh to tcsh.

Advantages:

1. Simple KISS solution of changing csh to tcsh

2. Developers (e.g. [1]) using csh symbolic link to tcsh do not 
introduce tcsh code into a csh script

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].

Disadvantages:

1. On Linux systems with only csh installed as part of the default 
installation, the install script will not work until tcsh is installed

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.

*csh solution*

Advantages:

1. For Linux systems with only csh installed as part of the default 
installation, siteconfig_lapw should work as it has in the past

Disadvantages:

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.

There currently are four places in siteconfig_lapw of WIEN2k 19.1 with 
execution of update_makefiles [8].

Change lines:

update_makefiles

to

update_makefiles01
update_makefiles02

Then, breaking the 'alias update_makefiles' into two different alias 
while using a Makefile.tmp1 file seems to work:

alias update_makefiles01 '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^"> Makefile.tmp1'
alias update_makefiles02 'sed -e "s^_FFTWROOT_^$FFTWROOT^" < 
Makefile.tmp1 |\\
  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'

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.

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.

alias update_makefiles 'cp Makefile.orig Makefile.tmp1; \\
foreach i (FOPT FPOPT OMP_SWITCH \\
LDFLAGS LDFLAGS DPARALLEL R_LIBS \\
R_LIBS RP_LIBS SCALAPACKROOT SCALAPACK_LIBNAME \\
BLACSROOT BLACS_LIBNAME MKL_TARGET_ARCH \\
LIBXCROOT LIBXC_LIBNAME LIBXC_FORTRAN FFTW_VERSION \\
FFTW_LIB FFTW_LIBNAME ELPAROOT ELPA_VERSION \\
ELPA_LIB ELPA_LIBNAME FC MPF CC) \\
sed -e "s^_$i_^$i^" Makefile.tmp1 > Makefile.tmp2 \\
mv Makefile.tmp2 Makefile.tmp1 \\
end; \\
cp Makefile.tmp1 Makefile'

[1] 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg16028.html

[2]

username at computername:~/WIEN2k19.1$ grep -R /bin/tcsh *
oldvec2vec:#!/bin/tcsh -f
oldvec2vec_lapw:#!/bin/tcsh -f
opticcopy:#!/bin/tcsh -f
opticcopy_lapw:#!/bin/tcsh -f
qsub-job0-sge:#!/bin/tcsh
qsub-job0-sge:#$ -S /bin/tcsh
qsub-job0-sge_lapw:#!/bin/tcsh
qsub-job0-sge_lapw:#$ -S /bin/tcsh
SRC/vec2old_lapw:#!/bin/tcsh -f
SRC/vec2pratt_lapw:#!/bin/tcsh -f
SRC/qsub-job0-sge_lapw:#!/bin/tcsh
SRC/qsub-job0-sge_lapw:#$ -S /bin/tcsh
SRC/oldvec2vec_lapw:#!/bin/tcsh -f
SRC/opticcopy_lapw:#!/bin/tcsh -f
SRC_structeditor/bin/xncm:#!/bin/tcsh -f
SRC_structeditor/install:#!/bin/tcsh -f
Binary file SRC_structeditor.tar matches
Binary file SRC.tar matches
SRC_vecpratt/vec2pratt_lapw:#!/bin/tcsh -f
Binary file SRC_vecpratt.tar matches
vec2old:#!/bin/tcsh -f
vec2old_lapw:#!/bin/tcsh -f
vec2pratt:#!/bin/tcsh -f
vec2pratt_lapw:#!/bin/tcsh -f

[3] 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg14969.html

[4] 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg17845.html

[5] 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg11180.html

[6] 
https://www.mail-archive.com/wien%40zeus.theochem.tuwien.ac.at/msg10649.html

[7] 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg17846.html

[8]

username at computername:~/WIEN2k19.1$ grep update_makefiles siteconfig_lapw
alias update_makefiles 'sed -e "s^_FOPT_^$FOPT^" < Makefile.orig |\\
          update_makefiles
       update_makefiles
         update_makefiles
         update_makefiles

[9] 
https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg18732.html

On 6/14/2019 1:25 AM, Peter Blaha wrote:
> I'm aware of the basic problem.
>
> The point is:
>
> Ubuntu (any other Linux system ??) does not set this link making csh 
> and tcsh the same.
>
> Should we therefore change all scripts to /bin/tcsh   ???
>
> 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) ?
>
> If all Linux (Mac !!! ???) systems understand /bin/tcsh, this change 
> would be fine with me.
>
> Any response from "Linux gurus" with experience with different Linux 
> versions (I only have Suse and Redhat) would be appreciated.
>
> Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://zeus.theochem.tuwien.ac.at/pipermail/wien/attachments/20190615/17adff9a/attachment.html>


More information about the Wien mailing list