# -*- 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 quantum-espresso version 6.0 categories science platforms darwin license GPL-2 maintainers dstrubbe openmaintainer description Plane-wave density-functional theory code long_description An integrated suite of open-source computer codes for electronic-structure \ calculations and materials modeling at the nanoscale. It is based on density-functional \ theory, plane waves, and pseudopotentials. \ This package will build pw, pp, ld1, upf, cp, and ph. homepage http://www.quantum-espresso.org # get link from http://www.qe-forge.org/gf/project/q-e/frs/?action=FrsReleaseBrowse&frs_package_id=18 set url http://www.qe-forge.org/gf/download/frsrelease/224 master_sites ${url}/1044:espresso ${url}/1043:examples distfiles qe-${version}${extract.suffix}:espresso \ qe-${version}-examples${extract.suffix}:examples checksums qe-${version}${extract.suffix} \ rmd160 5e0246fc8e71472783de7a25cac507e2842c147b \ sha256 2481d9291e4f85652af204c1b702caee8900a644fb62c8a510a8127e8571ba9d \ qe-${version}-examples${extract.suffix} \ rmd160 c9fad14013d20dfeec88d9e0e6bf8bd4682d73e2 \ sha256 8f5e6b40fe5fedcbc45b9e039ba5d4fc0d0d51c5d0f81033376c33683f01fdbf depends_lib-append port:fftw-3 distname qe-${version} use_autoconf yes autoconf.args -i autoconf.dir ${worksrcpath}/install patchfiles \ patch-install-m4-x_ac_qe_f90.m4.diff \ patch-install-m4-x_ac_qe_mpif90.m4.diff \ patch-Makefile.diff compilers.choose cc fc # g95 is not compatible with OpenMP mpi.setup default require_fortran -g95 configure.optflags -O3 post-extract { move ${worksrcpath}/../Examples ${worksrcpath} } pre-test { if {[mpi_variant_isset]} { if {![catch {sysctl hw.ncpu} result]} { set njobs $result set n2jobs [expr {$result*2}] } else { set njobs 1 set n2jobs 1 } reinplace -W ${worksrcpath} "s|PARA_PREFIX=\" \"|PARA_PREFIX=\"${mpi.exec} -n ${njobs}\"|" environment_variables reinplace -W ${worksrcpath} "s|PARA_IMAGE_PREFIX=\"mpirun -np 4\"|PARA_IMAGE_PREFIX=\"${mpi.exec} -n ${n2jobs}\"|" environment_variables } } # there is now a testsuite, 'make test-suite' test.run yes # note: this will download some pseudopotentials and maybe other stuff test { ui_msg "Running PW examples" system -W ${worksrcpath}/Examples/PW "./run_all_examples" # some PHonon tests will use gnuplot if available ui_msg "Running PHonon examples" system -W ${worksrcpath}/Examples/PHonon "./run_all_examples" ui_msg "Inspect logfile to see if tests passed." } # error has been found to occur for Examples/PW/vdWDF # :info:test running the graphite cell relaxation...application called MPI_Abort(MPI_COMM_WORLD, 1) - process 3 configure.args-append --prefix=${destroot}${prefix}/bin --with-scalapack=no pre-configure { # using cpp separately does not work because it tries to output .f90 to .F90, which is the same file in OSX configure.args-append FC=${configure.fc} F90FLAGS="${configure.fcflags} -x f95-cpp-input" \ F77="${configure.fc}" FFLAGS="${configure.fflags}" F90="${configure.fc}" \ CC="${configure.cc}" CFLAGS="${configure.cflags}" \ BLAS_LIBS="${linalglib}" LAPACK_LIBS="${linalglib}" FFT_LIBS="${prefix}/lib/libfftw3.dylib" # install anything else? e.g. pseudos? if {[mpi_variant_isset]} { configure.args-append --enable-parallel MPIF90="${configure.fc}" } else { configure.args-append --disable-parallel } } variant scalapack description {Build with ScaLAPACK for parallel linear algebra} { depends_lib-append port:scalapack configure.args-delete --with-scalapack=no configure.args-append SCALAPACK_LIBS="${prefix}/lib/libscalapack.dylib" 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.enforce_variant scalapack } if {[mpi_variant_isset]} { default_variants-append +scalapack } use_parallel_build yes build.target all-j # as patched, builds pw pp ld1 upf ph # threads (including fftw/blas) #BEWARE: you are not using multi-threaded FFTs! #variant threads description {Build with support for OpenMP threads} { # not compatible with g95. What about threaded FFTW3? # configure.args-append --enable-openmp # configure.fcflags-append -fopenmp #} livecheck.type regex livecheck.url ${homepage}/news/ livecheck.regex Version (\[0-9.\]+) of Quantum ESPRESSO is available for download.