[146682] trunk/dports/science

dstrubbe at macports.org dstrubbe at macports.org
Tue Mar 15 07:15:33 PDT 2016


Revision: 146682
          https://trac.macports.org/changeset/146682
Author:   dstrubbe at macports.org
Date:     2016-03-15 07:15:33 -0700 (Tue, 15 Mar 2016)
Log Message:
-----------
abinit, wannier90: Add patch to Wannier90 for use as library. Add patch to Abinit to enable use of Wannier90 version 2.x. Re-enable variant +wannier90. Closes ticket #50616.

Modified Paths:
--------------
    trunk/dports/science/abinit/Portfile
    trunk/dports/science/wannier90/Portfile

Added Paths:
-----------
    trunk/dports/science/abinit/files/patch-src-10_defs-defs_wannier90.F90.diff
    trunk/dports/science/wannier90/files/patch-src-parameters.F90.diff

Modified: trunk/dports/science/abinit/Portfile
===================================================================
--- trunk/dports/science/abinit/Portfile	2016-03-15 13:44:49 UTC (rev 146681)
+++ trunk/dports/science/abinit/Portfile	2016-03-15 14:15:33 UTC (rev 146682)
@@ -54,6 +54,8 @@
 
 default_variants +etsf_io +libxc
 
+patchfiles patch-src-10_defs-defs_wannier90.F90.diff
+
 pre-configure {
     if {[fortran_variant_name] eq "g95"} {
         configure.fcflags-append -ffree-line-length-huge
@@ -86,13 +88,13 @@
             set dft-flavor ${dft-flavor}+libxc
         }
     }
-#    if { [variant_isset wannier90] } {
-#        if { ${dft-flavor} eq "none" } {
-#            set dft-flavor wannier90
-#        } else {
-#            set dft-flavor ${dft-flavor}+wannier90
-#        }
-#    }
+    if { [variant_isset wannier90] } {
+        if { ${dft-flavor} eq "none" } {
+            set dft-flavor wannier90
+        } else {
+            set dft-flavor ${dft-flavor}+wannier90
+        }
+    }
 #    if { [variant_isset bigdft] } {
 #        if { ${dft-flavor} eq "none" } {
 #            set dft-flavor bigdft
@@ -133,7 +135,7 @@
     configure.args-append   --with-linalg-libs="${linalg_libs}"
 }
 
-# install binaries and pkgconfig but the very large number of test files
+# install binaries and pkgconfig but not the very large number of test files
 destroot.target   install-exec install-data-local
 
 #universal variant not allowed for libxc/etsf_io
@@ -144,7 +146,6 @@
 # args -t0 for no timeout since it cannot be found anyway; or: set depends_build-append port:timeout
 test.target         built-in fast tutorespfn tutorial unitary
 #test.target         built-in fast tutorespfn tutorial unitary v1 v2 v3 v4 v5 v6 v67mbpt v7
-# wannier90 test will probably fail, version 2.0.x is not supported anyway
 
 # for +scalapack +atlas -libxc:
 # hang in test [v2][t79].
@@ -249,10 +250,10 @@
 }
 
 # abinit does not work with Wannier90 version 2.0.x currently
-#variant wannier90 description {Build with support for Wannier90} {
-#    depends_lib-append      port:wannier90
-#    test.target-append      wannier90 tutoplugs vdwxc
-#}
+variant wannier90 description {Build with support for Wannier90} {
+    depends_lib-append      port:wannier90
+    test.target-append      wannier90 tutoplugs vdwxc
+}
 
 # FIXME: the code's build system will download BigDFT itself, which is contrary to the
 # way MacPorts should work. Make a bigdft port to support this.

Added: trunk/dports/science/abinit/files/patch-src-10_defs-defs_wannier90.F90.diff
===================================================================
--- trunk/dports/science/abinit/files/patch-src-10_defs-defs_wannier90.F90.diff	                        (rev 0)
+++ trunk/dports/science/abinit/files/patch-src-10_defs-defs_wannier90.F90.diff	2016-03-15 14:15:33 UTC (rev 146682)
@@ -0,0 +1,22 @@
+--- src/10_defs/defs_wannier90.F90.orig	2016-03-07 18:33:53.664633000 +0100
++++ src/10_defs/defs_wannier90.F90	2016-03-07 18:36:15.827013000 +0100
+@@ -31,7 +31,9 @@
+      gamma_only_loc,spinors_loc, &
+      nntot_loc,nnlist_loc,nncell_loc,num_bands_loc,num_wann_loc, &
+      proj_site_loc,proj_l_loc,proj_m_loc,proj_radial_loc,proj_z_loc, &
+-     proj_x_loc,proj_zona_loc,exclude_bands_loc)
++     proj_x_loc,proj_zona_loc,exclude_bands_loc, &
++&    proj_s_loc,proj_s_qaxis_loc)
++
+   use defs_basis
+   implicit none
+   character(len=*), intent(in) :: seed__name
+@@ -59,6 +61,8 @@
+   real(dp), dimension(3,num_bands_tot), intent(out) :: proj_x_loc
+   real(dp), dimension(num_bands_tot), intent(out) :: proj_zona_loc
+   integer, dimension(num_bands_tot), intent(out) :: exclude_bands_loc
++  integer, dimension(num_bands_tot), optional, intent(out) :: proj_s_loc
++  real(dp), dimension(3,num_bands_tot), optional, intent(out) :: proj_s_qaxis_loc
+   end subroutine wannier_setup
+  end interface
+ 

Modified: trunk/dports/science/wannier90/Portfile
===================================================================
--- trunk/dports/science/wannier90/Portfile	2016-03-15 13:44:49 UTC (rev 146681)
+++ trunk/dports/science/wannier90/Portfile	2016-03-15 14:15:33 UTC (rev 146682)
@@ -6,6 +6,7 @@
 
 name                wannier90
 version             2.0.1
+revision            1
 categories          science
 platforms           darwin
 license             GPL-2+
@@ -28,7 +29,8 @@
 depends_lib         port:atlas
 
 # fixes dependencies to enable parallel build
-patchfiles          patch-utility-w90pov-Makefile.diff
+patchfiles          patch-utility-w90pov-Makefile.diff \
+                    patch-src-parameters.F90.diff
 
 configure {
     file copy ${worksrcpath}/config/make.sys.macosx ${worksrcpath}/make.sys

Added: trunk/dports/science/wannier90/files/patch-src-parameters.F90.diff
===================================================================
--- trunk/dports/science/wannier90/files/patch-src-parameters.F90.diff	                        (rev 0)
+++ trunk/dports/science/wannier90/files/patch-src-parameters.F90.diff	2016-03-15 14:15:33 UTC (rev 146682)
@@ -0,0 +1,41 @@
+--- src/parameters.F90.orig	2016-02-13 01:01:54.000000000 +0100
++++ src/parameters.F90	2016-02-13 01:01:54.000000000 +0100
+@@ -1387,7 +1387,7 @@
+     dis_spheres_first_wann = 1
+     call param_get_keyword('dis_spheres_first_wann',found,i_value=dis_spheres_first_wann)
+     if ( dis_spheres_first_wann < 1 )  call io_error('Error: dis_spheres_first_wann must be greater than 0')
+-    if ( dis_spheres_first_wann > num_bands-num_wann+1 )  &
++    if ( dis_spheres_first_wann > num_bands-num_wann+1 .and. num_bands > 0 )  &
+          call io_error('Error: dis_spheres_first_wann is larger than num_bands-num_wann+1')
+     dis_spheres_num = 0
+     call param_get_keyword('dis_spheres_num',found,i_value=dis_spheres_num)
+@@ -2744,7 +2744,8 @@
+           write(stdout,'(1x,a46,10x,f8.3,13x,a1)') '|  Minimum energy range for DOS plot         :',boltz_dos_energy_min,'|'
+           write(stdout,'(1x,a46,10x,f8.3,13x,a1)') '|  Maximum energy range for DOS plot         :',boltz_dos_energy_max,'|'
+           write(stdout,'(1x,a46,10x,f8.3,13x,a1)') '|  Energy step for DOS plot                  :',boltz_dos_energy_step,'|'
+-          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 &
+                .and. boltz_dos_smr_fixed_en_width==smr_fixed_en_width .and. smr_index==boltz_dos_smr_index) then
+              write(stdout,'(1x,a78)') '|  Using global smearing parameters                                          |'
+           else
+@@ -3004,7 +3005,18 @@
+        deallocate( dos_project, stat=ierr  )
+        if (ierr/=0) call io_error('Error in deallocating dos_project in param_dealloc')
+     endif
+-
++    if( allocated( fermi_energy_list ) ) then
++       deallocate( fermi_energy_list, stat=ierr  )
++       if (ierr/=0) call io_error('Error in deallocating fermi_energy_list in param_dealloc')
++    endif
++    if( allocated( kubo_freq_list ) ) then
++       deallocate( kubo_freq_list, stat=ierr  )
++       if (ierr/=0) call io_error('Error in deallocating kubo_freq_list in param_dealloc')
++    endif
++    if( allocated( dis_spheres ) ) then
++       deallocate( dis_spheres, stat=ierr  )
++       if (ierr/=0) call io_error('Error in deallocating dis_spheres in param_dealloc')
++    endif
+ 
+     return
+ 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20160315/82752800/attachment-0001.html>


More information about the macports-changes mailing list