<commit_before>import numpy as np

import util.batch.universal.system

from simulation.model.constants import JOB_MEMORY_GB

COST_FUNCTION_DIRNAME = 'cost_functions'
COST_FUNCTION_F_FILENAME = 'f.npy'
COST_FUNCTION_F_NORMALIZED_FILENAME = 'f_normalized.npy'
COST_FUNCTION_DF_FILENAME = 'df_-_{derivative_kind}.npy'

CONCENTRATION_MIN_VALUE = 10**(-6)


if util.batch.universal.system.IS_RZ:
    COST_FUNCTION_NODES_SETUP_SPINUP = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='f_ocean2', nodes=6, cpus=16, total_cpus_max=9*16, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_DERIVATIVE = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='f_ocean2', nodes=3, cpus=16, total_cpus_max=9*16, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_TRAJECTORY = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='f_ocean2', nodes=1, cpus=12, nodes_max=1, walltime=2, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_JOB = util.batch.universal.system.NodeSetup(memory=30, node_kind='f_ocean2', nodes=1, cpus=1, total_cpus_max=1, walltime=48, check_for_better=True)

if util.batch.universal.system.IS_NEC:
    COST_FUNCTION_NODES_SETUP_SPINUP = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='clmedium', nodes=4, cpus=16, total_cpus_max=8*24, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_DERIVATIVE = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='clmedium', nodes=4, cpus=16, total_cpus_max=8*24, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_TRAJECTORY = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='clexpress', nodes=1, cpus=1, nodes_max=1, total_cpus_max=16, walltime=2, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_JOB = util.batch.universal.system.NodeSetup(memory=30, node_kind='clmedium', nodes=1, cpus=1, total_cpus_max=1, walltime=48, check_for_better=True)
<commit_msg>MAINT: simulation.optimization.constants: node setups updated<commit_after>import util.batch.universal.system

from simulation.model.constants import JOB_MEMORY_GB

COST_FUNCTION_DIRNAME = 'cost_functions'
COST_FUNCTION_F_FILENAME = 'f.npy'
COST_FUNCTION_F_NORMALIZED_FILENAME = 'f_normalized.npy'
COST_FUNCTION_DF_FILENAME = 'df_-_{derivative_kind}.npy'

CONCENTRATION_MIN_VALUE = 10**(-6)


if util.batch.universal.system.IS_RZ:
    COST_FUNCTION_NODES_SETUP_SPINUP = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='f_ocean2', nodes=6, cpus=16, nodes_max=9, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_DERIVATIVE = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='f_ocean2', nodes=3, cpus=16, nodes_max=9, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_TRAJECTORY = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='f_ocean2', nodes=1, cpus=12, nodes_max=1, walltime=2, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_JOB = util.batch.universal.system.NodeSetup(memory=30, node_kind='f_ocean2', nodes=1, cpus=1, total_cpus_max=1, walltime=48, check_for_better=True)

if util.batch.universal.system.IS_NEC:
    COST_FUNCTION_NODES_SETUP_SPINUP = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='clmedium', nodes=4, cpus=32, nodes_max=8, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_DERIVATIVE = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='clmedium', nodes=4, cpus=32, nodes_max=8, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_TRAJECTORY = util.batch.universal.system.NodeSetup(memory=JOB_MEMORY_GB, node_kind='clexpress', nodes=1, cpus=1, nodes_max=1, walltime=2, check_for_better=True)
    COST_FUNCTION_NODES_SETUP_JOB = util.batch.universal.system.NodeSetup(memory=30, node_kind='clmedium', nodes=1, cpus=1, total_cpus_max=1, walltime=48, check_for_better=True)
{'fraction_non_alphanumeric': 0.11151452282157677, 'fraction_numerical': 0.026452282157676348, 'mean_word_length': 9.31283422459893, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '507765', 'n_tokens_mistral': 1587, 'n_tokens_neox': 1530, 'n_words': 169}