name = 'CP2K'
version = '20111205'
versionsuffix = '-psmp'

homepage = 'http://www.cp2k.org'
description = """CP2K is a freely available (GPL) program, written in Fortran 95,
 to perform atomistic and molecular simulations of solid state, liquid, molecular and biological systems.
 It provides a general framework for different methods such as e.g. density functional theory (DFT)
 using a mixed Gaussian and plane waves approach (GPW), and classical pair and many-body potentials. """

toolchain = {'name': 'goalf', 'version': '1.1.0-no-OFED'}

sources = [SOURCE_TAR_GZ]

patches = [
    'fix_compile_date_lastcvs.patch',
    'do_regtest_nocompile.patch',
    'fix_psmp_build.patch'
]

builddependencies = [
    ('flex', '2.5.35'),
    ('Bison', '2.5')
]

dependencies = [('Libint', '1.1.4')]

# don't use parallel make, results in compilation failure
# because Fortran module files aren't created before they are needed
parallel = 1

# SMP build
type = 'psmp'

# only run one CP2K instance at a time during regtesting
maxtasks = 1

# need to set OMP_NUM_THREADS to 1, to avoid failed tests during regression test
# without this, 32 tests (out of 2196) fail
import os
os.environ['OMP_NUM_THREADS'] = '1'

moduleclass = 'chem'
