easyblock = 'ConfigureMake'

name = 'DMTCP'
version = '2.5.2'

homepage = "http://dmtcp.sourceforge.net/index.html"
description = """DMTCP (Distributed MultiThreaded Checkpointing)
transparently checkpoints a single-host or distributed local_computation
in user-space -- with no modifications to user code or to the O/S."""

toolchain = SYSTEM

source_urls = ['https://github.com/dmtcp/dmtcp/archive/']
sources = ['%(version)s.tar.gz']

configopts = '--enable-infiniband-support'

postinstallcmds = [
    'cp test/ %(installdir)s/test -R',
    '(cd %(installdir)s/test; make -j 8)',
]

sanity_check_paths = {
    'files': [
        'bin/dmtcp_command',
        'bin/dmtcp_discover_rm',
        'bin/dmtcp_nocheckpoint',
        'bin/dmtcp_srun_helper',
        'bin/dmtcp_sshd',
        'bin/dmtcp_coordinator',
        'bin/dmtcp_launch',
        'bin/dmtcp_restart',
        'bin/dmtcp_ssh'],
    'dirs': [],
}

moduleclass = 'tools'
