[Q-e-developers] Recent changes to XSpectra

Kane O'Donnell kane.odonnell at curtin.edu.au
Wed Oct 14 16:02:07 CEST 2015

Dear Developers,

The recent update to Spectra permitting the calculation of L edges has reintroduced an old character read bug, at least when using the gfortran compiler. The reintroduction has occurred because mygetK.f90 functionality has been replaced by the rough equivalent in gaunt_mod.f90. The latter is much less cautious about string comparison, and therefore one gets the good old "Could not find the element  X in the table of edge energies!” error. This is easily fixed using the legacy solution in mygetK, as diff’d below.

This has been tested on a 4-core darwin i5 (gfortran 5.2), and a 35000-odd core Cray XC40 with PrgEnv-gnu. I can’t check whether  this is a problem for ifort because XSpectra doesn’t run properly when compiled with ifort on our Cray (a separate issue!).

As an aside, if it was up to me I’d completely cut the edge-energy code. Speaking as someone who does both experiments and theory in this area, the database transitions are essentially useless. Users really should be computing transition energies directly to take into account relevant chemical shifts between inequivalent absorber sites.

Best regards,


Kane O'Donnell
Postdoctoral Research Fellow | Department of Physics, Astronomy and Medical Radiation Science

Curtin University
Tel | +61 8 9266 1381
Fax | +61 8 9266 2377

Email | kane.odonnell at curtin.edu.au<file:///D/Documents%20and%20Settings/216283I/Local%20Settings/Temporary%20Internet%20Files/Content.Outlook/LSWE2GO4/yournamehere@curtin.edu.au>

[cid:4CD740AC-83D0-4A77-A87E-894CA87380DF at curtin.edu.au]
Curtin University is a trademark of Curtin University of Technology
CRICOS Provider Code 00301J

--- gaunt_mod_old.f90 2015-10-14 21:07:34.000000000 +0800
+++ gaunt_mod.f90 2015-10-14 21:09:42.000000000 +0800
@@ -612,19 +612,22 @@
         seuil('Pa', 16733.0),&
         seuil('U' , 17166.0) /)

+   character (len=2) :: sym1
     integer :: i
+    sym1 = trim(adjustl(symbol))

     do i = 1, Size_tab
-       if (symbol.eq.seuilK1_tab(i)%name .and. edge.eq.'K1' ) then
+       if (sym1.eq.trim(adjustl(seuilK1_tab(i)%name)) .and. edge.eq.'K1' ) then
           getE = seuilK1_tab(i)%seuil_en
-       else if (symbol.eq.seuilL1_tab(i)%name .and. edge.eq.'L1' ) then
+       else if (sym1.eq.trim(adjustl(seuilL1_tab(i)%name)) .and. edge.eq.'L1' ) then
           getE = seuilL1_tab(i)%seuil_en
-       else if (symbol.eq.seuilL2_tab(i)%name .and. edge.eq.'L2' ) then
+       else if (sym1.eq.trim(adjustl(seuilL2_tab(i)%name)) .and. edge.eq.'L2' ) then
           getE = seuilL2_tab(i)%seuil_en
-       else if (symbol.eq.seuilL3_tab(i)%name .and. edge.eq.'L3' ) then
+       else if (sym1.eq.trim(adjustl(seuilL3_tab(i)%name)) .and. edge.eq.'L3' ) then
           getE = seuilL3_tab(i)%seuil_en
        end if

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20151014/2ea8d848/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sigCurtin.png
Type: image/png
Size: 4353 bytes
Desc: sigCurtin.png
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20151014/2ea8d848/attachment.png>

More information about the developers mailing list