Opened 8 years ago

Closed 8 years ago

#50616 closed enhancement (fixed)

wannier90 2.0.1 patch for library

Reported by: cram5431@… Owned by: dstrubbe (David Strubbe)
Priority: Normal Milestone:
Component: ports Version: 2.3.4
Keywords: haspatch Cc:
Port: wannier90

Description

Patch to make wannier90 work as a library; tested with abinit. One test changed + 2 memory leaks suppressed.

Attachments (4)

Portfile-wannier90.diff (459 bytes) - added by cram5431@… 8 years ago.
patch-src-parameters.F90.diff (2.4 KB) - added by cram5431@… 8 years ago.
Portfile-wannier90.2.diff (643 bytes) - added by cram5431@… 8 years ago.
revision added
patch-src-10_defs-defs_wannier90.F90.diff (992 bytes) - added by cram5431@… 8 years ago.

Download all attachments as: .zip

Change History (11)

Changed 8 years ago by cram5431@…

Attachment: Portfile-wannier90.diff added

Changed 8 years ago by cram5431@…

comment:1 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: dstrubbe@… removed
Keywords: haspatch added
Owner: changed from macports-tickets@… to dstrubbe@…
Type: updateenhancement

I assume this changes the files installed by the port. As such, the port's revision must be increased.

Is this change from the developers of wannier90, or known to them? If not, please send it to them as well.

comment:2 Changed 8 years ago by cram5431@…

Revision added.

Yes, this patch will be sent to wannier90 developers (I'm in touch with them). This happens every release of the w90 library: it has to be adapted to the codes using it.

Changed 8 years ago by cram5431@…

Attachment: Portfile-wannier90.2.diff added

revision added

comment:3 Changed 8 years ago by dstrubbe (David Strubbe)

Without this patch, all wannier90 and tutoplug tests fail in abinit for me, though vdwxc passes. When I built wannier90 with this patch, and then ran the abinit tests, I found that the only improvement was [wannier90][t03][np=1] now passes. The others all fail with segmentation faults still. Did you have better results than that? I was using variants -libxc -etsf_io -mpich +wannier90 for abinit.

Also, these are two things to fix in abinit for a future version: one wannier90 test requires libxc in practice but does not have a check before running; the word "subpprocesses" is misspelled in the output.

[wannier90][t11][np=1]Test was not expected to fail but subrocesses returned 1
#0  0x10a70c6ed
#1  0x1066ff185
#2  0x1065c94d4
#3  0x1056fc317
#4  0x1056e3be2
#5  0x1067db83e

--- !ERROR
message: |
    LibXC was not linked to this version: 
     recompile with libxc activated to use ixc < 0
src_file: echo_xc_name.F90
src_line: 198
...

comment:4 Changed 8 years ago by cram5431@…

To make Abinit work with wannier90-2.0.1, you need:

  • a patched version of wannier90 (patch previoulsy commited in this ticket)
  • a patch for ABINIT (enclosed patch-src-10_defs-defs_wannier90.F90.diff file for ABINIT)

This works with my version.

Future abinit-v8 test suite has been patched to exclude wannier90#11 test when not compiled with libXC. Thanks for the bug report.

Changed 8 years ago by cram5431@…

comment:5 Changed 8 years ago by dstrubbe (David Strubbe)

Ok, now the wannier90 tests are passed for me.

This change is meaningless (only formatting), isn't it?

-          if(boltz_dos_adpt_smr.eqv.adpt_smr .and. boltz_dos_adpt_smr_fac==adpt_smr_fac .and. boltz_dos_adpt_smr_max==adpt_smr_max &
+          if(boltz_dos_adpt_smr.eqv.adpt_smr .and. boltz_dos_adpt_smr_fac==adpt_smr_fac &
+               .and. boltz_dos_adpt_smr_max==adpt_smr_max &

comment:6 in reply to:  5 Changed 8 years ago by cram5431@…

Yes and no...
For a compilation with gcc --line-length-none, this change is not needed,
For a compilation with a computer not allowing more than 132 chars, it is (checked on my El Capitan)...

comment:7 Changed 8 years ago by dstrubbe (David Strubbe)

Resolution: fixed
Status: newclosed

Committed for abinit and wannier90, r146682.

Note: See TracTickets for help on using tickets.