Using Chapel on MareNostrumΒΆ
Warning
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.
Set
CHPL_HOMEto point to the directory of your installation as usual. For example:export CHPL_HOME=~/chapel-x.y.z/chapel
Set
CHPL_HOST_PLATFORMtomarenostrumandCHPL_COMMtogasnet. 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:
cd $CHPL_HOME
Make/re-make the compiler and runtime:
gmake
Set your
PATHto include$CHPL_HOME/bin/marenostrumwhich is created when you build the compiler. For example:export PATH="$PATH:$CHPL_HOME/bin/marenostrum"
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.chplThe above settings will result in a multi-locale compilation. When you compile a Chapel program, you should see two binaries (e.g.,
hello6-taskpar-distandhello6-taskpar-dist_real). The first binary contains code to launch the Chapel program onto the compute nodes usingmnsubmit. 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
mnsubmitandslurmscripts 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_WALLTIMEandCHPL_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 debugYou can use the
-vflag to see the commands used to launch your program. If you set theCHPL_LAUNCHER_DEBUGenvironment variable, the script used with themnsubmitcommand 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 inhello6-taskpar-dist.out