# -*- 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 active_variants 1.1 PortGroup mpi 1.0 name abinit version 7.4.3 revision 1 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 6e3629a94721440f8afacbcaf2b046b5c6e9b23d \ sha256 3593dc96c124c0e1ad29a5ec13e9e8f8dc391b328cf06ed461e34f5a9298b246 #Restrict to gcc/clang because of dependencies compilers.choose fc cc cxx cpp compilers.setup -clang -dragonegg -llvm mpi.setup depends_lib port:atlas configure.args --with-linalg-flavor="atlas" --enable-gw-dpc configure.optflags -O3 build.cmd make build.target multi multi_nprocs=4 use_parallel_build no default_variants +etsf_io +libxc +wannier90 #Select mpi/gcc default set current_mpi "none" if { ![variant_isset no_mpi] } { if { [mpi_variant_isset] } { set current_mpi [mpi_variant_name] } else { if {![catch {set current_mpi [file link ${prefix}/etc/select/mpi/current]}]} { if { ${current_mpi} eq "base" } { set current_mpi "none" } } if { ${current_mpi} eq "none"} { default_variants-append +mpich } } } else { default_variants-append +gcc48 } pre-fetch { if { [variant_isset libxc] } { if { ![active_variants libxc [c_variant_name]] } { ui_error "\nlibxc must have been built with +[c_variant_name]\n" return -code error "libxc must have been built with +[c_variant_name]" } } if { [variant_isset netcdf] } { if {![active_variants netcdf-fortran [c_variant_name]] } { ui_error "\nnetcdf-fortran must have been built with +[c_variant_name]\n" return -code error "netcdf-fortran must have been built with +[c_variant_name]" } } if { [variant_isset etsf_io] } { if {![active_variants etsf_io [fortran_variant_name]] } { ui_error "\netsf_io must have been built with +[fortran_variant_name]\n" return -code error "etsf_io must have been built with +[fortran_variant_name]" } } if { [variant_isset fftw3] } { if {![active_variants fftw-3 gfortran] || \ ![active_variants fftw-3-single gfortran]} { ui_error "\nfftw-3 and nfftw-3-single must have been built with +gfortran:" ui_error "This can be achieved by : sudo port -f install fftw-3-single +gfortran\n" return -code error "fftw-3/fftw-3-single must have been built with +gfortran" } } } pre-configure { if { [variant_isset etsf_io] } { configure.args-append --with-trio-flavor="netcdf+etsf_io" } 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}" configure.args-append FCCPP="${configure.cpp} -ansi" if { ${current_mpi} ne "none"} { configure.args-append --enable-mpi="yes" --enable-mpi-io="yes" if {[string match *openmpi* ${current_mpi}]} { configure.args-append --with-mpi-level="1" } if { ![mpi_variant_isset] } { configure.fc ${mpi.fc} configure.cc ${mpi.cc} configure.cxx ${mpi.cxx} } if { ${mpi.exec} ne "" } { configure.args-append MPI_RUNNER=${mpi.exec} test.env-append MPIEXEC=${mpi.exec} } } else { configure.args-append --enable-mpi="no" --enable-mpi-io="no" } } destroot { xinstall -W ${worksrcpath}/src/98_main \ abinit aim anaddb band2eps bsepostproc conducti cut3d \ fftprof ioprof kss2wfk lapackprof lwf macroave mrgddb \ mrggkk mrgscr optic ujdet vdw_kernelgen \ ${destroot}${prefix}/bin if { [variant_isset atompaw] } { xinstall -W ${worksrcpath}/fallbacks/exports/bin \ atompaw-abinit ${destroot}${prefix}/bin } } #universal variant not allowed for libxc/etsf_io universal_variant no test.run yes test.target check-full variant fftw3 description {Build with support for fftw-3 FFT library} { depends_lib-append port:fftw-3 depends_lib-append port:fftw-3-single # require_active_variants fftw-3 gfortran # require_active_variants fftw-3-single gfortran 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 multi-thread support (openMP)} { configure.args-append --enable-openmp configure.fcflags-append -fopenmp configure.args-append --with-linalg-libs="-L"${prefix}"/lib -ltatlas" configure.args-append --with-linalg-incs="-I"${prefix}"/include" } variant netcdf description {Build with support for NetCDF transferable I/O} { depends_lib-append port:netcdf-fortran configure.args-append --with-netcdf-incs="-I"${prefix}"/include" configure.args-append --with-netcdf-libs="-L"${prefix}"/lib -lnetcdf -lnetcdff" } variant etsf_io description {Build with support for ETSF_IO transferable I/O} { depends_lib-append port:etsf_io configure.args-append --with-etsf-io-incs="-I"${prefix}"/include/gcc" configure.args-append --with-netcdf-incs="-I"${prefix}"/include" configure.args-append --with-netcdf-libs="-L"${prefix}"/lib -lnetcdf -lnetcdff" } variant libxc description {Build with support for libXC exchange-correlation library} { depends_lib-append port:libxc configure.args-append --with-libxc-incs="-I"${prefix}"/include" } variant wannier90 description {Build with support for Wannier90} { depends_lib-append port:wannier90 } variant bigdft description {Build with support for the wavelet BigDFT library} { # Patch bigdft-abi-1.0.4 (missing config.sub and config.guess) patchfiles-append patch-bigdft-config.diff } variant atompaw description {Build including AtomPAW atomic dataset generator} { } variant no_mpi conflicts mpich mpich_devel openmpi openmpi_devel description {Build without MPI support} { } livecheck.type regex livecheck.url ${homepage}/downloads/source-packages/abinit-1/releases/index.html livecheck.regex ABINIT (\[0-9.\]+)