Using Chapel on MareNostrum¶
We have not used Chapel on MareNostrum in several years. It is likely the information presented here is stale or outdated. If you are interested in using Chapel on MareNostrum, please let us know.
The following information describes how to build and use Chapel on Barcelona Supercomputing Center's MareNostrum machine for users who have an account there. If you are not familiar with Chapel, it is recommended that you first try the Chapel Quickstart Instructions to get started with the language.
CHPL_HOMEto point to the directory of your installation as usual. For example:
gasnet. For example:
export CHPL_HOST_PLATFORM=marenostrum export CHPL_COMM=gasnet
Additional information about running using multiple locales and GASNet can be found in Multilocale Chapel Execution
Make sure you're in the top-level chapel/ directory:
Make/re-make the compiler and runtime:
$CHPL_HOME/bin/marenostrumwhich is created when you build the compiler. For example:
Compile your Chapel program as usual. See Compiling Chapel Programs for details. For example:
chpl -o hello6-taskpar-dist $CHPL_HOME/examples/hello6-taskpar-dist.chpl
The above settings will result in a multi-locale compilation. When you compile a Chapel program, you should see two binaries (e.g.,
hello6-taskpar-dist_real). The first binary contains code to launch the Chapel program onto the compute nodes using
mnsubmit. The second contains the program code itself; it is not intended to be executed directly from the shell prompt.
On MareNostrum, a marenostrum-specific launcher is used by default to wrap the
slurmscripts required to launch a job on the compute nodes. This launcher accepts the following flags:
--walltime <HH:MM:SS> : (required) set the max wallclock time --queue <name> : (optional) specify the debug or interactive queue
These options can also be set using the
CHPL_LAUNCHER_QUEUEenvironment variables, respectively.
Multi-locale binaries require the number of locales to be specified on the command line. Other than this, execute your Chapel program as usual. For example:
./hello6-taskpar-dist -nl 2 --walltime 00:03:00 --queue debug
You can use the
-vflag to see the commands used to launch your program. If you set the
CHPL_LAUNCHER_DEBUGenvironment variable, the script used with the
mnsubmitcommand will be preserved after your program executes.
On MareNostrum, jobs cannot be run in an interactive mode, so all program will end up in a
.outfile whose name matches the executable. For example, the program above would leave its output in