# -*- 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 name octopus version 4.1.0 categories science platforms darwin license GPL-2+ maintainers gmail.com:dstrubbe description A real-space (time-dependent) density-functional theory code. long_description Octopus is a scientific program aimed at ab initio virtual experimentation \ on a hopefully ever-increasing range of system types. \ Electrons are described quantum-mechanically within density-functional \ theory (DFT), in its time-dependent form (TDDFT) when doing simulations \ in time. Nuclei are described classically as point particles. Electron-nucleus \ interaction is described within the pseudopotential approximation. homepage http://www.tddft.org/programs/octopus master_sites ${homepage}/download/${version} checksums rmd160 636cf345f53a8d558a79258a257ed68a17488b76 \ sha256 e367b2e594d8344085c8c424c8a31b4a7210b80e83c2d331ee602cc6fc7c838a depends_lib port:atlas port:libxc port:fftw-3 port:gsl configure.args --with-libxc-prefix=${prefix} --with-blas=-lsatlas \ --disable-gdlib --without-sparskit --with-netcdf-prefix=no \ --with-etsf-io-prefix=no --with-berkeleygw-prefix=no \ --with-arpack=no --with-libfm=no --with-pfft-prefix=no \ --with-pspio-prefix=no --with-nfft=no --with-blacs=no \ --with-scalapack=no FCCPP="${configure.cc} -E -ansi" \ --enable-utils # configure will find and use these other libraries unless they are explicitly disabled configure.optflags -O3 default_variants +newuoa if {![variant_isset gcc46] && ![variant_isset gcc48] && ![variant_isset openmpi] && ![variant_isset mpich]} { default_variants +gcc47 } pre-fetch { set fortran unknown set fortrans { gcc42 gcc43 gcc44 gcc45 gcc46 gcc47 gcc48 g95 } foreach fc_name ${fortrans} { if { [variant_isset ${fc_name}] } { set fortran ${fc_name} } elseif { [variant_isset openmpi] } { if { [active_variants openmpi ${fc_name}] } { set fortran ${fc_name} } } elseif { [variant_isset mpich] } { if { [_portnameactive mpich] } { if { [active_variants mpich ${fc_name}] } { set fortran ${fc_name} } } elseif { [_portnameactive mpich-devel] } { if { [active_variants mpich-devel ${fc_name}] } { set fortran ${fc_name} } } } } if { ${fortran} == "unknown" } { if { [variant_isset openmpi] } { ui_error "Variant +openmpi requires openmpi to have been built with Fortran support." return -code error "Variant +openmpi requires openmpi to have been built with Fortran support." } elseif { [variant_isset mpich] } { ui_error "Variant +mpich requires mpich/mpich-devel to have been built with Fortran support." return -code error "Variant +mpich requires mpich/mpich-devel to have been built with Fortran support." } else { ui_error "Internal error: cannot determine Fortran compiler." return -code error "Internal error: cannot determine Fortran compiler." } } ui_msg "Fortran compiler is ${fortran}." if { ![active_variants libxc ${fortran}] } { ui_error "libxc must have been built with +${fortran}." return -code error "libxc must have been built with +${fortran}." } if { [variant_isset netcdf-fortran] } { if {![active_variants netcdf-fortran ${fortran}] } { ui_error "netcdf-fortran must have been built with +${fortran}." return -code error "netcdf-fortran must have been built with +${fortran}." } } if { [variant_isset etsf_io] } { if {![active_variants etsf_io ${fortran}] } { ui_error "etsf_io must have been built with +${fortran}." return -code error "etsf_io must have been built with +${fortran}." } } # use of the same Fortran compiler as the one being used here does not seem necessary set fftw_fortran no foreach fc_name ${fortrans} { if { [active_variants fftw-3 ${fc_name}] } { set fftw_fortran yes } } if { ${fftw_fortran} == "no" } { ui_error "fftw-3 must have been built with a Fortran variant" return -code error "fftw-3 must have been built with a Fortran variant" } } # More options that could be added: # variants: berkeleygw, openmp, threads (for fftw, atlas?), scalapack, arpack # no way to turn off PAPI. # libxc does not have universal variant, so octopus cannot either universal_variant no test.run yes test.target check-full variant gcc46 conflicts gcc47 gcc48 openmpi mpich description {Build with GCC 4.6} { configure.compiler macports-gcc-4.6 } variant gcc47 conflicts gcc46 gcc48 openmpi mpich description {Build with GCC 4.7} { configure.compiler macports-gcc-4.7 } variant gcc48 conflicts gcc46 gcc47 openmpi mpich description {Build with GCC 4.8} { configure.compiler macports-gcc-4.8 } variant openmpi conflicts gcc46 gcc47 gcc48 mpich description {Build with OpenMPI} { configure.cc openmpicc configure.fc openmpif90 configure.args-delete --disable-mpi # an in-place allreduce of lxyz_inv in mesh_init.F90 leads to zeroes afterwards with MPI2 configure.args-append --enable-mpi --without-external_zoltan --disable-mpi2 depends_lib-append port:openmpi test.env-append MPIEXEC=${prefix}/bin/openmpiexec } variant mpich conflicts gcc46 gcc47 gcc48 openmpi description {Build with MPICH} { configure.cc mpicc-mp configure.fc mpif90-mp configure.args-delete --disable-mpi configure.args-append --enable-mpi --without-external_zoltan test.env-append MPIEXEC=${prefix}/bin/mpiexec.hydra-mp depends_lib-append path:bin/mpif90-mp:mpich-default } variant newuoa description {Build with internal newuoa library for optimal control} { configure.args-append --enable-newuoa } variant netcdf description {Build with support for NetCDF output} { configure.args-delete --with-netcdf-prefix=no configure.args-append --with-netcdf-prefix=${prefix} depends_lib-append port:netcdf-fortran require_active_variants netcdf-fortran {} universal } variant etsf_io requires netcdf description {Build with support for ETSF_IO output} { configure.args-delete --with-etsf-io-prefix=no configure.args-append --with-etsf-io-prefix=${prefix} depends_lib-append port:etsf_io } variant sparskit description {Build with support for SPARSKIT propagators} { configure.args-delete --without-sparskit depends_lib-append port:sparskit } variant gdlib description {Build with support for definition of domain by 2D image} { configure.args-delete --disable-gdlib depends_lib-append port:gd2 } livecheck.type regex livecheck.url ${homepage}/wiki/index.php/Main_Page livecheck.regex ${name} (\[0-9.\]+)