# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id$ PortSystem 1.0 PortGroup mpi 1.0 PortGroup linear_algebra 1.0 name abinit version 8.0.8b categories science platforms darwin license GPL-3 maintainers gmail.com:cram5431 \ openmaintainer description Full-featured atomic-scale first-principles simulation software long_description ABINIT is a package whose main program allows one to find the total energy, \ charge density and electronic structure of systems made of electrons and nuclei \ (molecules and periodic solids) within Density Functional Theory (DFT), \ using pseudopotentials and a planewave or wavelet basis. \ ABINIT also includes options to optimize the geometry according to the DFT forces \ and stresses, or to perform molecular dynamics simulations using these forces, \ or to generate dynamical matrices, Born effective charges, and dielectric tensors, \ based on Density-Functional Perturbation Theory, and many more properties. \ Excited states can be computed within the Many-Body Perturbation Theory \ (the GW approximation and the Bethe-Salpeter equation), and \ Time-Dependent Density Functional Theory (for molecules). \ In addition to the main ABINIT code, different utility programs are provided. \ ABINIT is a project that favours development and collaboration. homepage http://www.abinit.org master_sites http://ftp.abinit.org/ checksums rmd160 e35b7546d6927f920176d5dba8130c5982a30962 \ sha256 37ad5f0f215d2a36e596383cb6e54de3313842a0390ce8d6b48a423d3ee25af2 # abinit-8.0.8b.tar.gz extracts to "abinit-8.0.8". worksrcdir ${name}-8.0.8 compilers.choose cc cxx fc # g95 is no longer supported by abinit mpi.setup default require_fortran -g95 configure.args-append --enable-gw-dpc configure.fcflags-append -ffree-line-length-none configure.optflags -O3 use_parallel_build yes # We do not need to use ABINIT's own approach to parallel builds, which only is relevant if # the "fallbacks" are used, namely if we asked for etsf_io, libxc, wannier90, etc. support # but did not provide the libraries. That situation should never happen for this port. #build.target multi multi_nprocs=4 default_variants +etsf_io +libxc +wannier90 pre-configure { if { [variant_isset etsf_io] } { configure.args-append --with-trio-flavor="netcdf+etsf_io" if { [variant_isset g95] } { configure.args-append --with-etsf-io-incs="-I${prefix}/include/g95" } else { configure.args-append --with-etsf-io-incs="-I${prefix}/include/gcc" } } elseif { [variant_isset netcdf] } { configure.args-append --with-trio-flavor="netcdf" } else { configure.args-append --with-trio-flavor="none" } set dft-flavor "none" if { [variant_isset libxc] } { if { ${dft-flavor} eq "none" } { set dft-flavor libxc } else { 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 bigdft] } { # if { ${dft-flavor} eq "none" } { # set dft-flavor bigdft # } else { # set dft-flavor ${dft-flavor}+bigdft # } # } # if { [variant_isset atompaw] } { # if { ${dft-flavor} eq "none" } { # set dft-flavor atompaw # } else { # set dft-flavor ${dft-flavor}+atompaw # } # } configure.args-append --with-dft-flavor="${dft-flavor}" set linalg-flavor "none" if { [variant_isset atlas] } { set linalg-flavor atlas } else { set linalg-flavor netlib } if { [variant_isset scalapack] } { set linalg-flavor ${linalg-flavor}+scalapack set linalglib "${linalglib} -lscalapack" } configure.args-append --with-linalg-flavor="${linalg-flavor}" configure.args-append --with-linalg-libs="${linalglib}" } # 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 universal_variant no test.run yes test.cmd tests/runtests.py # 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 # for +scalapack +atlas -libxc: # hang in test [v2][t79]. # :info:test [tutorial][tspin_6][np=1]: failed: absolute error 2.7e-08 > 2.5e-08 # other config options to add: # --enable-mpi-inplace # --with-atompaw-libs; --with-atompaw-incs pre-test { if {[mpi_variant_isset]} { test.target-append paral mpiio tutoparal reinplace "s|mpirun -np|${mpi.exec} -np|" ${worksrcpath}/tests/pymods/jobrunner.py test.args-append -n 1 } else { test.target-append seq } } pre-configure { configure.args-append FCCPP="${configure.cc} -E -ansi" if {[mpi_variant_isset]} { configure.args-append --enable-mpi="yes" --enable-mpi-io="yes" } else { configure.args-append --enable-mpi="no" } } variant fftw3 description {Build with support for fftw-3 FFT library} { depends_lib-append port:fftw-3 port:fftw-3-single compilers.enforce_some_fortran fftw-3 fftw-3-single if { [variant_isset threads] } { configure.args-append --with-fft-flavor="fftw3-threads" configure.args-append --with-fft-libs="-lfftw3_threads -lfftw3 -lfftw3f" } else { configure.args-append --with-fft-flavor="fftw3" configure.args-append --with-fft-libs="-lfftw3 -lfftw3f" } } variant threads description {Build with support for OpenMP threads} { configure.args-append --enable-openmp configure.fcflags-append -fopenmp } variant netcdf description {Build with support for NetCDF transferable I/O} { depends_lib-append port:netcdf-fortran compilers.enforce_fortran netcdf-fortran configure.args-append --with-netcdf-incs="-I${prefix}/include" configure.args-append --with-netcdf-libs="-L${prefix}/lib -lnetcdf -lnetcdff" # check compatibility with MPI? } variant etsf_io requires netcdf description {Build with support for ETSF_IO transferable I/O} { depends_lib-append port:etsf_io compilers.enforce_fortran etsf_io test.target-append etsf_io } # add support for gsl, yaml? variant libxc description {Build with support for libXC exchange-correlation library} { depends_lib-append port:libxc compilers.enforce_fortran libxc configure.args-append --with-libxc-incs="-I${prefix}/include" configure.args-append --with-libxc-libs="-L${prefix}/lib -lxc -lxcf90" test.target-append libxc } variant scalapack description {Build with ScaLAPACK for parallel linear algebra} { depends_lib-append port:scalapack if {![mpi_variant_isset]} { ui_error "+scalapack requires an MPI variant. Choose +mpich, +mpich_devel, +openmpi, or +openmpi_devel." return -code error "+scalapack requires an MPI variant." } mpi.setup require mpi.enforce_variant scalapack } 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. # There is an error compiling anyway, which could be fixed with a patch, # but it is unpatchable since the download occurs after the patch phase. #variant bigdft description {Build with support for the wavelet BigDFT library} { # avoid this error (and equivalent with OpenCL) # :info:build ar cru libCUDA.a # :info:build ar: no archive members specified # patchfiles-append patch-fallbacks-sources-bigdft-1.7.0.93-src-Makefile.in.diff #} # FIXME: same problem as for BigDFT, it gets downloaded. Make a separate port. #variant atompaw description {Build including AtomPAW atomic dataset generator} { #} livecheck.type regex livecheck.url ${homepage}/downloads/abinit-packages livecheck.regex ABINIT v (\[0-9.\]+)