def get(): launcher_val = os.environ.get('CHPL_LAUNCHER') if not launcher_val: comm_val = chpl_comm.get() platform_val = chpl_platform.get('target') compiler_val = chpl_compiler.get('target') if platform_val.startswith('cray-x'): has_aprun = utils.find_executable('aprun') has_slurm = utils.find_executable('srun') if has_aprun and has_slurm: launcher_val = 'none' elif has_aprun: launcher_val = 'aprun' elif has_slurm: launcher_val = 'slurm-srun' else: # FIXME: Need to detect aprun/srun differently. On a cray # system with an eslogin node, it is possible that aprun # will not be available on the eslogin node (only on the # login node). # # has_aprun and has_slurm should look other places # (maybe the modules?) to decide. # (thomasvandoren, 2014-08-12) sys.stderr.write( 'Warning: Cannot detect launcher on this system. Please ' 'set CHPL_LAUNCHER in the environment.\n') elif platform_val == 'marenostrum': launcher_val = 'marenostrum' elif comm_val == 'gasnet': substrate_val = chpl_comm_substrate.get() if substrate_val == 'udp': launcher_val = 'amudprun' elif substrate_val == 'mpi': launcher_val = 'gasnetrun_mpi' elif substrate_val == 'ibv': if platform_val == 'pwr6': # our loadleveler launcher is not yet portable/stable/ # flexible enough to serve as a good default #launcher_val = 'loadleveler' launcher_val = 'none' else: launcher_val = 'gasnetrun_ibv' elif substrate_val == 'mxm': launcher_val = 'gasnetrun_ibv' elif substrate_val == 'lapi': # our loadleveler launcher is not yet portable/stable/flexible # enough to serve as a good default #launcher_val = 'loadleveler' launcher_val = 'none' elif comm_val == 'mpi': launcher_val = 'mpirun' else: launcher_val = 'none' if launcher_val is None: launcher_val = 'none' return launcher_val
def get(): launcher_val = overrides.get('CHPL_LAUNCHER') if not launcher_val: comm_val = chpl_comm.get() platform_val = chpl_platform.get('target') compiler_val = chpl_compiler.get('target') if platform_val.startswith('cray-x') or chpl_platform.is_cross_compiling(): has_aprun = find_executable('aprun') has_slurm = find_executable('srun') if has_aprun and has_slurm: launcher_val = 'none' elif has_aprun: launcher_val = 'aprun' elif has_slurm or platform_val == 'aarch64': launcher_val = 'slurm-srun' else: # FIXME: Need to detect aprun/srun differently. On a cray # system with an eslogin node, it is possible that aprun # will not be available on the eslogin node (only on the # login node). # # has_aprun and has_slurm should look other places # (maybe the modules?) to decide. # (thomasvandoren, 2014-08-12) sys.stderr.write( 'Warning: Cannot detect launcher on this system. Please ' 'set CHPL_LAUNCHER in the environment.\n') elif platform_val == 'marenostrum': launcher_val = 'marenostrum' elif comm_val == 'gasnet': substrate_val = chpl_comm_substrate.get() if substrate_val == 'udp': launcher_val = 'amudprun' elif substrate_val == 'mpi': launcher_val = 'gasnetrun_mpi' elif substrate_val == 'ibv': if platform_val == 'pwr6': # our loadleveler launcher is not yet portable/stable/ # flexible enough to serve as a good default #launcher_val = 'loadleveler' launcher_val = 'none' else: launcher_val = 'gasnetrun_ibv' elif substrate_val == 'mxm': launcher_val = 'gasnetrun_ibv' elif substrate_val == 'lapi': # our loadleveler launcher is not yet portable/stable/flexible # enough to serve as a good default #launcher_val = 'loadleveler' launcher_val = 'none' elif comm_val == 'mpi': launcher_val = 'mpirun' else: launcher_val = 'none' if launcher_val is None: launcher_val = 'none' return launcher_val
def get_uniq_cfg_path(): base_uniq_cfg = third_party_utils.default_uniq_cfg_path() if chpl_comm_debug.get() == 'debug': base_uniq_cfg += '-debug' substrate = chpl_comm_substrate.get() segment = chpl_comm_segment.get() return base_uniq_cfg + '/substrate-' + substrate + '/seg-' + segment
def get(): launcher_val = overrides.get('CHPL_LAUNCHER') comm_val = chpl_comm.get() substrate_val = chpl_comm_substrate.get() if comm_val == 'gasnet' and substrate_val == 'udp': if not launcher_val: launcher_val = 'amudprun' elif launcher_val not in ('none', 'amudprun'): error('CHPL_LAUNCHER={} is not supported for CHPL_COMM=gasnet ' 'CHPL_COMM_SUBSTRATE=udp, CHPL_LAUNCHER=amudprun is ' 'required'.format(launcher_val)) if not launcher_val: platform_val = chpl_platform.get('target') if platform_val.startswith('cray-x') or platform_val.startswith( 'hpe-cray-'): has_aprun = find_executable('aprun') has_slurm = find_executable('srun') if has_aprun and has_slurm: launcher_val = 'none' elif has_aprun: launcher_val = 'aprun' elif has_slurm: launcher_val = 'slurm-srun' else: # FIXME: Need to detect aprun/srun differently. On a cray # system with an eslogin node, it is possible that aprun # will not be available on the eslogin node (only on the # login node). # # has_aprun and has_slurm should look other places # (maybe the modules?) to decide. # (thomasvandoren, 2014-08-12) warning('Cannot detect launcher on this system. Please ' 'set CHPL_LAUNCHER in the environment.') elif comm_val == 'gasnet': if substrate_val == 'smp': launcher_val = 'smp' elif substrate_val == 'mpi': launcher_val = slurm_prefix('gasnetrun_mpi', platform_val) elif substrate_val == 'ibv': launcher_val = slurm_prefix('gasnetrun_ibv', platform_val) elif substrate_val == 'ucx': launcher_val = slurm_prefix('gasnetrun_ucx', platform_val) elif substrate_val == 'ofi': launcher_val = slurm_prefix('gasnetrun_ofi', platform_val) else: if platform_val == 'cray-cs' and find_executable('srun'): launcher_val = 'slurm-srun' else: launcher_val = 'none' if launcher_val is None: launcher_val = 'none' return launcher_val
def get(): launcher_val = overrides.get('CHPL_LAUNCHER') if not launcher_val: comm_val = chpl_comm.get() platform_val = chpl_platform.get('target') if platform_val.startswith('cray-') or platform_val.startswith( 'hpe-cray-'): has_aprun = find_executable('aprun') has_slurm = find_executable('srun') if has_aprun and has_slurm: launcher_val = 'none' elif has_aprun: launcher_val = 'aprun' elif has_slurm: launcher_val = 'slurm-srun' else: # FIXME: Need to detect aprun/srun differently. On a cray # system with an eslogin node, it is possible that aprun # will not be available on the eslogin node (only on the # login node). # # has_aprun and has_slurm should look other places # (maybe the modules?) to decide. # (thomasvandoren, 2014-08-12) sys.stderr.write( 'Warning: Cannot detect launcher on this system. Please ' 'set CHPL_LAUNCHER in the environment.\n') elif comm_val == 'gasnet': substrate_val = chpl_comm_substrate.get() if substrate_val == 'smp': launcher_val = 'smp' elif substrate_val == 'udp': launcher_val = 'amudprun' elif substrate_val == 'mpi': launcher_val = 'gasnetrun_mpi' elif substrate_val == 'ibv': launcher_val = 'gasnetrun_ibv' elif substrate_val == 'ucx': launcher_val = 'gasnetrun_ucx' elif substrate_val == 'mxm': launcher_val = 'gasnetrun_ibv' elif substrate_val == 'ofi': launcher_val = 'gasnetrun_ofi' elif substrate_val == 'psm': launcher_val = 'gasnetrun_psm' elif comm_val == 'mpi': launcher_val = 'mpirun' else: launcher_val = 'none' if launcher_val is None: launcher_val = 'none' return launcher_val
def check(): platform_val = chpl_platform.get('target') if platform_val.startswith('cray-x'): comm_val = chpl_comm.get() substrate_val = chpl_comm_substrate.get() is_using_hugepages = 'HUGETLB' in os.environ.get('PE_PRODUCT_LIST', '') if comm_val == 'gasnet' and is_using_hugepages: if substrate_val == 'gemini' or substrate_val == 'aries': stderr.write("Warning: compiling with the craype-hugepages module while " "using the GASNet {0} conduit is not supported and " "will lead to link errors\n".format(substrate_val))
def check(): platform_val = chpl_platform.get('target') if platform_val.startswith('cray-x'): comm_val = chpl_comm.get() substrate_val = chpl_comm_substrate.get() is_using_hugepages = 'HUGETLB' in os.environ.get('PE_PRODUCT_LIST', '') if comm_val == 'gasnet' and is_using_hugepages: if substrate_val == 'gemini' or substrate_val == 'aries': stderr.write( "Warning: compiling with the craype-hugepages module while " "using the GASNet {0} conduit is not supported and " "will lead to link errors\n".format(substrate_val))
def get(): comm_val = chpl_comm.get() if comm_val == 'gasnet': segment_val = overrides.get('CHPL_GASNET_SEGMENT') if not segment_val: substrate_val = chpl_comm_substrate.get() if substrate_val in ('portals', 'gemini', 'aries', 'smp'): segment_val = 'fast' elif substrate_val == 'ibv': segment_val = 'large' else: segment_val = 'everything' else: segment_val = 'none' return segment_val
def get(): comm_val = chpl_comm.get() if comm_val == 'gasnet': segment_val = os.environ.get('CHPL_GASNET_SEGMENT') if not segment_val: substrate_val = chpl_comm_substrate.get() if substrate_val == 'portals' or substrate_val == 'gemini' or substrate_val == 'aries': segment_val = 'fast' elif substrate_val == 'ibv': segment_val = 'large' else: segment_val = 'everything' else: segment_val = 'none' return segment_val
def get(): launcher_val = os.environ.get('CHPL_LAUNCHER') if not launcher_val: comm_val = chpl_comm.get() platform_val = chpl_platform.get('target') compiler_val = chpl_compiler.get('target') if platform_val.startswith('cray-x'): has_aprun = utils.find_executable('aprun') has_slurm = utils.find_executable('srun') if has_aprun and has_slurm: launcher_val = 'none' elif has_aprun: launcher_val = 'aprun' elif has_slurm: launcher_val = 'slurm-srun' elif platform_val == 'marenostrum': launcher_val = 'marenostrum' elif compiler_val == 'tile-cc': launcher_val = 'tile-monitor' elif comm_val == 'gasnet': substrate_val = chpl_comm_substrate.get() if substrate_val == 'udp': launcher_val = 'amudprun' elif substrate_val == 'mpi': launcher_val = 'gasnetrun_mpi' elif substrate_val == 'ibv': if platform_val == 'pwr6': # our loadleveler launcher is not yet portable/stable/ # flexible enough to serve as a good default #launcher_val = 'loadleveler' launcher_val = 'none' else: launcher_val = 'gasnetrun_ibv' elif substrate_val == 'mxm': launcher_val = 'gasnetrun_ibv' elif substrate_val == 'lapi': # our loadleveler launcher is not yet portable/stable/flexible # enough to serve as a good default #launcher_val = 'loadleveler' launcher_val = 'none' elif comm_val == 'mpi': launcher_val = 'mpirun' else: launcher_val = 'none' return launcher_val
def get(): comm_val = chpl_comm.get() if comm_val == 'gasnet': segment_val = overrides.get('CHPL_GASNET_SEGMENT') if not segment_val: substrate_val = chpl_comm_substrate.get() platform_val = chpl_platform.get('target') if substrate_val in ('aries', 'smp', 'ucx'): segment_val = 'fast' elif substrate_val == 'ofi' and platform_val == 'hpe-cray-ex': segment_val = 'fast' elif substrate_val == 'ibv': segment_val = 'large' else: segment_val = 'everything' else: segment_val = 'none' return segment_val
def gather_pe_chpl_pkgconfig_libs(): # Don't do anything if we aren't using a PrgEnv compiler if chpl_compiler.get_prgenv_compiler() == 'none': return "" import chpl_comm, chpl_comm_substrate, chpl_aux_filesys, chpl_libfabric platform = chpl_platform.get('target') comm = chpl_comm.get() substrate = chpl_comm_substrate.get() auxfs = chpl_aux_filesys.get() ret = os.environ.get('PE_CHAPEL_PKGCONFIG_LIBS', '') if comm != 'none': if platform != 'hpe-cray-ex': # Adding -lhugetlbfs gets the PrgEnv driver to add the appropriate # linker option for static linking with it. While it's not always # used with Chapel programs, it is expected to be the common case # when running on a Cray X*, so just always linking it is ok. # (We don't add it for HPE Cray EX systems, where it's not needed.) ret = 'craype-hugetlbfs:cray-pmi:' + ret if platform.startswith('cray-x'): ret = 'cray-ugni:' + ret if comm == 'gasnet' and substrate == 'aries': ret = 'cray-udreg:' + ret if comm == 'ofi' and chpl_libfabric.get() == 'system': ret = 'libfabric:' + ret # on login/compute nodes, lustre requires the devel api to make # lustre/lustreapi.h available (it's implicitly available on esl nodes) if 'lustre' in auxfs: exists, returncode, out, err = try_run_command( ['pkg-config', '--exists', 'cray-lustre-api-devel']) if exists and returncode == 0: ret = 'cray-lustre-api-devel:' + ret return ret
def get_gasnet_pc_file(): substrate = chpl_comm_substrate.get() pcfile = "gasnet-{0}-par.pc".format(substrate) return pcfile