Ejemplo n.º 1
0
def decompress():
    nodes = getNodeInfo()
    ncore = min(nodes.values())
    if os.path.isfile('CHGCAR.gz'):
        print('Decompressing CHGCAR.gz in ' + os.getcwd() + '.')
        execute('pigz -f -d -6 -p' + str(ncore) + ' CHGCAR.gz')

    if os.path.isfile('WAVECAR.gz'):
        print('Decompressing WAVECAR.gz in ' + os.getcwd() + '.')
        execute('pigz -f -d -6 -p' + str(ncore) + ' WAVECAR.gz')
Ejemplo n.º 2
0
def run(ratio = 1,cwd = None):
    global vasp
    #could move hybrid to parallel setup
    if cwd == None:
        cwd = os.getcwd();
    nodes = getNodeInfo()

    #cores = mysql_query('SELECT `cores` FROM `clusters` WHERE `name` = ' + str(os.getenv('VSC_INSTITUTE_CLUSTER')))
    hybrid = str(int(min(nodes.values())/int(ratio)))
    return execute('mympirun -h ' + hybrid + ' --output ' + cwd + '/tempout ' + vasp)
Ejemplo n.º 3
0
def parallelSetup(settings):
    numKP = getIBZKPT()
    nodes = getNodeInfo()
    ncore = min(nodes.values())
    kpar = min(len(nodes),numKP)
    settings['INCAR']['NCORE'] = ncore
    if 'LHFCALC' in settings['INCAR'].keys():
        if settings['INCAR']['LHFCALC'] == '.TRUE.':
            settings['INCAR']['NCORE'] = 1

    #unsure about HFc
    if 'ALGO' in settings['INCAR'].keys():
        if settings['INCAR']['ALGO'][0:2] == 'GW' or settings['INCAR']['ALGO'] == 'ACFDT' or settings['INCAR']['ALGO'] == 'HFc':
            settings['INCAR']['NCORE'] = 1

    settings['INCAR']['KPAR'] = kpar
    return settings