Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/config_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@ System Partition Configuration
'environs': ['builtin'],
}

- ``upcrun``: Parallel programs will be launched using the `UPC <https://upc.lbl.gov/>`__ ``upcrun`` command.
- ``upcxx-run``: Parallel programs will be launched using the `UPC++ <https://bitbucket.org/berkeleylab/upcxx/wiki/Home>`__ ``upcxx-run`` command.

.. js:attribute:: .systems[].partitions[].access

:required: No
Expand Down
4 changes: 2 additions & 2 deletions reframe/core/buildsystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ class SingleSource(BuildSystem):
#: automatically based on the extension of the source file.
#: The automatically detected extensions are the following:
#:
#: - C: `.c`.
#: - C: `.c` and `.upc`.
#: - C++: `.cc`, `.cp`, `.cxx`, `.cpp`, `.CPP`, `.c++` and `.C`.
#: - Fortran: `.f`, `.for`, `.ftn`, `.F`, `.FOR`, `.fpp`, `.FPP`, `.FTN`,
#: `.f90`, `.f95`, `.f03`, `.f08`, `.F90`, `.F95`, `.F03` and `.F08`.
Expand Down Expand Up @@ -433,7 +433,7 @@ def emit_build_commands(self, environ):

def _guess_language(self, filename):
_, ext = os.path.splitext(filename)
if ext in ['.c']:
if ext in ['.c', '.upc']:
return 'C'

if ext in ['.cc', '.cp', '.cxx', '.cpp', '.CPP', '.c++', '.C']:
Expand Down
28 changes: 28 additions & 0 deletions reframe/core/launchers/mpi.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,34 @@ def command(self, job):
return ['ibrun']


@register_launcher('upcrun')
class UpcrunLauncher(JobLauncher):
'''Launcher for UPC applications.'''

def command(self, job):
cmd = ['upcrun']
if job.num_tasks_per_node:
num_nodes = job.num_tasks // job.num_tasks_per_node
cmd += ['-N', str(num_nodes)]

cmd += ['-n', str(job.num_tasks)]
return cmd


@register_launcher('upcxx-run')
class UpcxxrunLauncher(JobLauncher):
'''Launcher for UPC++ applications.'''

def command(self, job):
cmd = ['upcxx-run']
if job.num_tasks_per_node:
num_nodes = job.num_tasks // job.num_tasks_per_node
cmd += ['-N', str(num_nodes)]

cmd += ['-n', str(job.num_tasks)]
return cmd


@register_launcher('alps')
class AlpsLauncher(JobLauncher):
def command(self, job):
Expand Down
30 changes: 30 additions & 0 deletions unittests/test_launchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,36 @@ def expected_minimal_command(self):
'--foo')


class TestUpcrunLauncher(_TestLauncher, unittest.TestCase):

@property
def launcher(self):
return getlauncher('upcrun')()

@property
def expected_command(self):
return 'upcrun -N 2 -n 4 --foo'

@property
def expected_minimal_command(self):
return 'upcrun -n 1 --foo'


class TestUpcxxrunLauncher(_TestLauncher, unittest.TestCase):

@property
def launcher(self):
return getlauncher('upcxx-run')()

@property
def expected_command(self):
return 'upcxx-run -N 2 -n 4 --foo'

@property
def expected_minimal_command(self):
return 'upcxx-run -n 1 --foo'


class TestAlpsLauncher(_TestLauncher, unittest.TestCase):
@property
def launcher(self):
Expand Down