Setting up Your Environment for Chapel¶
To get started with Chapel, there are three environment settings that are strongly recommended for effective use of the release, and a number of other optional settings that are useful for cross-compiling or overriding the default settings. To check the values of the Chapel environment variables that are set or can be inferred, run the command:
$CHPL_HOME/util/printchplenv --all
The setchplenv.* source scripts in the $CHPL_HOME/util/quickstart/ and
$CHPL_HOME/util/ directories contain commands that set the following
variables for various shells and host platforms when they are sourced from the
$CHPL_HOME directory. Frequent Chapel users may want to add such settings
to their shell’s dotfile(s); but for getting started the setchplenv.* scripts
can be convenient.
Recommended Settings¶
CHPL_HOME¶
Setting
CHPL_HOMEis important if you have not installed Chapel and are instead working from a source directory. In that event, set theCHPL_HOMEenvironment variable to point to the location of the chapel/ directory that was created when you unpacked the release. For example:export CHPL_HOME=~/chapel-1.33.0Note
This, and all other examples in the Chapel documentation, assumes you’re using the
bashshell. If usingcshortcsh, mentally changeexport FOO=BARtosetenv FOO BAR. If using some other shell, make the appropriate adjustment.
PATH¶
Updating
PATHis important if you have not installed Chapel and are instead working from a source directory. Otherwise it might be necessary to use the full path tochplwhen compiling programs. In that event, you can set path using the following command:CHPL_BIN_SUBDIR=`"$CHPL_HOME"/util/chplenv/chpl_bin_subdir.py` export PATH="$PATH":"$CHPL_HOME/bin/$CHPL_BIN_SUBDIR"
Optional Settings¶
CHPL_HOST_PLATFORM¶
You can set the
CHPL_HOST_PLATFORMenvironment variable to represent the platform on which you’re working. For standard UNIX workstations, the default is sufficient, and is equivalent toexport CHPL_HOST_PLATFORM=`$CHPL_HOME/util/chplenv/chpl_platform.py`For other platforms that appear very similar to a UNIX workstation from the shell prompt (e.g., a Cray CS™), the value may need to be set explicitly. The strings for our currently-supported host platforms are as follows:
Value
Description
cygwin32
x86 Cygwin (Windows) platforms
cygwin64
x86_64 Cygwin (Windows) platforms
darwin
Macintosh OS X platforms
linux32
32-bit Linux platforms
linux64
64-bit Linux platforms
netbsd32
32-bit NetBSD platforms
netbsd64
64-bit NetBSD platforms
pwr6
IBM Power6 SMP cluster
cray-cs
Cray CS™
cray-xc
Cray XC™
hpe-cray-ex
HPE Cray EX
hpe-apollo
HPE Apollo
Platform-specific documentation is available for most of these platforms in Platform-Specific Notes.
The Chapel Makefiles and sources are designed to work for any UNIX-compatible environment that supports a GNU-compatible make utility. The list above represents the set of platforms that we have access to and can test easily. We are interested in making our code framework portable to other platforms—if you are using Chapel on a platform other than the ones listed above, please contact us for help with the effort.
CHPL_TARGET_PLATFORM¶
If you are cross-compiling for a platform other than your
$CHPL_HOST_PLATFORM, set theCHPL_TARGET_PLATFORMenvironment variable to describe that platform. See CHPL_HOST_PLATFORM above for legal values (though whether or not a given setting will support cross-compilation depends on your specific environment).Note
If
CHPL_TARGET_PLATFORMis not set, the target platform defaults to the same value as$CHPL_HOST_PLATFORM.
CHPL_HOST_ARCH¶
Optionally, set the
CHPL_HOST_ARCHenvironment variable to indicate the architecture type of the current machine. Normally, the default value is sufficient.
Value
Description
x86_64
64-bit AMD and Intel processors
aarch64
64-bit ARM processors
arm64
an alternative name for ‘aarch64’
If unset, the default will be computed. The command
uname -mshould produce the same value as the default.
CHPL_TARGET_ARCH¶
Optionally, set the
CHPL_TARGET_ARCHenvironment variable to indicate the architecture type of the target machine. See the table above forCHPL_HOST_ARCHfor values this might be set to.If unset,
CHPL_TARGET_ARCHwill be inferred. IfCHPL_TARGET_CPUisnative,unknown, ornonethenCHPL_TARGET_ARCHwill be set toCHPL_HOST_ARCH. Otherwise,CHPL_TARGET_ARCHwill be set based on the architecture type specified inCHPL_TARGET_CPU.
CHPL_*_COMPILER¶
Optionally, you can set
CHPL_HOST_COMPILERand/orCHPL_TARGET_COMPILERto indicate the compiler suite to use in building the sources.CHPL_HOST_COMPILERis the compiler used to build the Chapel compiler itself so that it will run onCHPL_HOST_PLATFORM.CHPL_TARGET_COMPILERis the compiler used to build the runtime libraries and generated code forCHPL_TARGET_PLATFORM. Currently supported values are as follows:
Value
Description
allinea
The Allinea ARM compiler suite – clang and clang++
clang
The Clang compiler suite – clang and clang++
cray-prgenv-allinea
The Cray PrgEnv compiler using the Allinea backend
cray-prgenv-cray
The Cray PrgEnv compiler using the Cray CCE backend
cray-prgenv-gnu
The Cray PrgEnv compiler using the GNU backend
cray-prgenv-intel
The Cray PrgEnv compiler using the Intel backend
cray-prgenv-pgi
The Cray PrgEnv compiler using the PGI backend
gnu
The GNU compiler suite – gcc and g++
ibm
The IBM compiler suite – xlc and xlC
intel
The Intel compiler suite – icc and icpc
llvm
LLVM code generation
pgi
The PGI compiler suite – pgcc and pgc++
The default value for
CHPL_HOST_COMPILERis:
inferred from
CHPL_HOST_CCandCHPL_HOST_CXXif those are provided (see CC and Similar)otherwise, inferred from
CCandCXXif those are provided and none of theCHPL_*_CC/CHPL_*_CXXvariables are set (see CC and Similar)otherwise, a default based on the value of
CHPL_HOST_PLATFORM:
CHPL_HOST_PLATFORM
Compiler
hpe-cray-ex
cray-xc
gnu
darwin
freebsd
clang if available, otherwise gnu
pwr6
ibm
other
gnu
The default for
CHPL_TARGET_COMPILERis:
llvmif the compiler is configured with LLVM support (see CHPL_LLVM)otherwise,
cray-prgenv-$PE_ENVoncray-xcandhpe-cray-explatforms (wherePE_ENVis set byPrgEnv-*modules)otherwise, inferred from
CHPL_TARGET_CCandCHPL_TARGET_CXXif those are provided (see CC and Similar)otherwise, inferred from
CCandCXXif those are provided and none of theCHPL_*_CC/CHPL_*_CXXvariables are set (see CC and Similar)otherwise,
CHPL_HOST_COMPILERif the host and target platforms are the sameotherwise,
gnu.In cases where the LLVM code generation strategy is the default, setting
CHPL_TARGET_COMPILERto something other thanllvmwill request that the C backend be used with that compiler. For example, to select the C backend with the PrgEnv-gnu compiler, setCHPL_TARGET_COMPILER=cray-prgenv-gnu.
CC and Similar¶
It is sometimes important to be able to provide a particular command to run for C or C++ compilation. The following variables are available to help with that:
Variable
Description
CC
indicates the C compiler to use
CXX
indicates the CXX compiler to use
CHPL_HOST_CC
indicates the C compiler for building
chplitselfCHPL_HOST_CXX
indicates the C++ compiler for building
chplitselfCHPL_TARGET_CC
indicates the C compiler used by
chplCHPL_TARGET_CXX
indicates the C++ compiler used by
chplIn normal usage, both the C and C++ variants of these should be provided (e.g.
CCandCXXwould both be set).The compiler family settings
CHPL_HOST_COMPILERandCHPL_TARGET_COMPILERcan be inferred from these*CC*CXXvariables in some cases as described in CHPL_*_COMPILER. To infer a compiler family from a a path to a compiler, the configuration looks to recognize an executable name normally used with that compiler. For example, thegnufamily normally usesgccfor C code andg++for C++ code. This inference process ignores the directory as well as any suffix following-or.and so thegnufamily can be inferred from/path/to/gcc-10, for example.Please note that setting
CCandCXXorCHPL_TARGET_CCandCHPL_TARGET_CXXwill not changeCHPL_TARGET_COMPILERwhen the LLVM backend is in use or when working with a PrgEnv compiler. In these cases, it is necessary to also setCHPL_TARGET_COMPILERin order for theCC/CHPL_TARGET_CCvariables to take effect.In some cases, it is useful to configure additional arguments for the associated
clangcommand to use with the LLVM backend. For example, theclangcompiler might need additional arguments in order to function properly. To support these cases, overridingCHPL_TARGET_CCandCHPL_TARGET_CXXwill impact theclangcommands used by the LLVM backend. Please note that setting these variables will override the normal process to find a bundled or system-wide installation ofclang.
CHPL_TARGET_CPU¶
Optionally, set the
CHPL_TARGET_CPUenvironment variable to indicate that the target executable should be specialized to the given architecture when using--specialize(and--fast). Valid options are:
Value
Description
native
The C compiler will attempt to detect the architecture on the machine that is compiling the target executable. This is a good choice if you will be running on the same machine that you are compiling on. If you are not, see the options below.
unknown
No specialization will be performed
none
No specialization will be performed (will not warn)
Architecture-specific values
intel
amd
arm
core2
k8
aarch64
nehalem
k8sse3
thunderx
westmere
barcelona
thunderx2t99
sandybridge
bdver1
ivybridge
bdver2
haswell
bdver3
broadwell
bdver4
skylake
These values are defined to be the same as in GCC 7:
If you do not want
CHPL_TARGET_CPUto have any effect, you can set it to eitherunknownornone. Both will disable specialization, but the latter will not warn if--specializeis used.Setting
CHPL_TARGET_CPUto an incorrect value for your processor may result in an invalid binary that will not run on the intended machine. Special care should be taken to select the lowest common denominator when running on machines with heterogeneous processor architectures.The default value for this setting will vary based on settings in your environment, in order of application these rules are:
If CHPL_TARGET_COMPILER is
cray-prgenv-*you do not need to set anything inCHPL_TARGET_CPU. One of thecraype-*modules (e.g.craype-sandybridge) should be loaded to provide equivalent functionality. Once the proper module is loaded,CRAY_CPU_TARGETwill have the architecture being used in it.If
CHPL_TARGET_COMPILERiscray,pgi, oribm,CHPL_TARGET_CPUwill be set tononeand no specialization will occur.If CHPL_COMM is set, no attempt to set a useful value will be made and
CHPL_TARGET_CPUwill beunknown.If CHPL_TARGET_PLATFORM is
darwin,linux*, orcygwin*CHPL_TARGET_CPUwill benative, passing the responsibility off to the backend C compiler to detect the specifics of the hardware.
CHPL_MAKE¶
Optionally, set the
CHPL_MAKEenvironment variable to indicate the GNU-compatible make utility that you want the compiler back-end to invoke when compiling the generated C code. If not set, this will default to a value based on$CHPL_HOST_PLATFORM:
platform
make utility
cygwin*, darwin
make
linux32, linux64
gmake if available, otherwise make
other
gmake
CHPL_MODULE_PATH¶
Optionally, set the
CHPL_MODULE_PATHenvironment variable to provide a list of directories to be added to the Module Search Paths. The value of this environment variable should be a colon-separated list of directory paths.The module search path is used to satisfy ‘use’ statements in the Chapel program. The complete search path can be displayed using the compiler option
--print-search-dirs. It will also include the compiler’s standard module search paths, those introduced by the-Mflag on the command line and directories containing the .chpl files named explicitly on the compiler command line.
CHPL_LOCALE_MODEL¶
Optionally, set the
CHPL_LOCALE_MODELenvironment variable to indicate the locale model you want to use. Current options are:
Value
Description
flat
top-level locales are not further subdivided
numa
top-level locales are further subdivided into sublocales, each one a NUMA domain
If unset,
CHPL_LOCALE_MODELdefaults toflat.Warning
The NUMA locale model is deprecated and will be removed in a future release.
CHPL_TASKS¶
Optionally, set the
CHPL_TASKSenvironment variable to indicate what tasking layer you want to use to implement intra-locale parallelism (see Chapel Tasks for more information on this option). Current options are:
Value
Description
qthreads
use Sandia’s Qthreads package
fifo
use POSIX threads
If
CHPL_TASKSis not set it defaults toqthreadsin all cases except for a few specific configurations in which it defaults tofifo:
target platform is
cygwin*target platform is
netbsd*Note
Note that the Chapel
util/quickstart/setchplenv.*source scripts setCHPL_TASKStofifoto reduce build-time and third-party dependences, while theutil/setchplenv.*versions leave it unset, resulting in the behavior described just above.See Chapel Tasks for more information about executing using the various
CHPL_TASKSoptions.
CHPL_COMM¶
Optionally, set the
CHPL_COMMenvironment variable to indicate what communication layer you want to use to implement inter-locale communication. Current options are:
Value
Description
none
only supports single-locale execution
gasnet
use the GASNet-based communication layer
ofi
use the libfabric-based communication layer
ugni
Cray-specific native communication layer
If unset,
CHPL_COMMdefaults tononein most cases. On Cray XC systems it defaults tougni. On Cray CS systems it defaults togasnet. See Multilocale Chapel Execution for more information on executing Chapel programs using multiple locales. See Using Chapel with libfabric for more information about the ofi communication layer. See Using Chapel on Cray Systems for more information about Cray-specific runtime layers.
CHPL_MEM¶
Optionally, the
CHPL_MEMenvironment variable can be used to select a memory management layer. Current options are:
Value
Description
cstdlib
use the standard C malloc/free commands
jemalloc
use Jason Evan’s memory allocator
If unset,
CHPL_MEMdefaults tojemallocfor most configurations. If the target platform iscygwin*it defaults tocstdlib
CHPL_TARGET_MEMwill be replacingCHPL_MEMin the future.CHPL_TARGET_MEMtakes precedence overCHPL_MEM.Note
Certain
CHPL_COMMsettings (e.g. ugni, gasnet segment fast/large, ofi with the gni provider) register the heap to improve communication performance. Registering the heap requires special allocator support that not all allocators provide. Currently onlyjemallocis capable of supporting configurations that require a registered heap.
CHPL_HOST_MEM¶
Optionally, the
CHPL_HOST_MEMenvironment variable can be used to select a memory management layer for thechplcompiler.
Value
Description
cstdlib
use the standard C malloc/free commands
jemalloc
use Jason Evan’s memory allocator
If unset,
CHPL_HOST_MEMdefaults tojemalloceverywhere except for Cygwin and MacOS. On those systems, it defaults tocstdlib.
CHPL_HOST_JEMALLOC¶
Optionally, the
CHPL_HOST_JEMALLOCenvironment variable can select between no jemalloc, or using the jemalloc distributed with Chapel in third-party. This setting is intended to elaborate uponCHPL_HOST_MEM=jemalloc.
Value
Description
none
do not build or use jemalloc
bundled
use the jemalloc distribution bundled with Chapel in third-party
system
use jemalloc found on system. requires
jemalloc-configin PATHCurrently, the only supported combinations of host target are:
Host
Source
darwin
system
linux
bundled
If unset,
CHPL_HOST_JEMALLOCdefaults to one of the above support combinations, ornoneif CHPL_HOST_MEM iscstdlib.
CHPL_LAUNCHER¶
Optionally, the
CHPL_LAUNCHERenvironment variable can be used to select a launcher to get your program up and running. See Chapel Launchers for more information on this variable’s default and possible settings.
CHPL_ATOMICS¶
Optionally, the
CHPL_ATOMICSenvironment variable can be used to select an implementation for atomic operations in the runtime. Current options are:
Value
Description
cstdlib
implement atomics with C standard atomics (from C11)
intrinsics
implement atomics with target compiler intrinsics
locks
implement atomics with mutexes
If
CHPL_ATOMICSis not set, it defaults tocstdlibwhen the target compiler isgnu,clang,allinea,llvm, orcray. It defaults tointrinsicswhen the target compiler isintel. It defaults tolockswhen the target compiler ispgi.See the Chapel Language Specification for more information about atomic operations in Chapel or Runtime Support for Atomics for more information about the runtime implementation.
CHPL_TIMERS¶
Optionally, the
CHPL_TIMERSenvironment variable can be used to select an implementation for Chapel’s timers. Current options are:
- generic
use a
gettimeofday()-based implementationIf unset,
CHPL_TIMERSdefaults togeneric
CHPL_GMP¶
Optionally, the
CHPL_GMPenvironment variable can select between no GMP support, using the GMP distributed with Chapel in third-party, or using a system GMP. Current options are:
Value
Description
system
use a system install of GMP (#include gmp.h, -lgmp)
none
do not build GMP support into the Chapel runtime
bundled
use the GMP distribution bundled with Chapel in third-party
If unset, Chapel will attempt to build GMP using CHPL_TARGET_COMPILER (noting that the bundled version may not be supported by all compilers). Based on the outcome, Chapel will default to:
Value
Description
bundled
if the build was successful
system
if unsuccessful and CHPL_TARGET_PLATFORM is cray-x*
none
otherwise
Note
Note that the Chapel
util/quickstart/setchplenv.*source scripts setCHPL_GMPtononewhile theutil/setchplenv.*versions leave it unset, resulting in the behavior described just above.
CHPL_HWLOC¶
Optionally, the
CHPL_HWLOCenvironment variable can select between no hwloc support or using the hwloc package distributed with Chapel in third-party.
Value
Description
none
do not build hwloc support into the Chapel runtime
bundled
use the hwloc distribution bundled with Chapel in third-party
If unset,
CHPL_HWLOCdefaults tobundledif CHPL_TASKS isqthreads. In all other cases it defaults tonone. In the unlikely event the bundled hwloc distribution does not build successfully, it should still be possible to use qthreads. To do this, manually setCHPL_HWLOCtononeand rebuild (and please file a bug with the Chapel team.) Note that building without hwloc will have a negative impact on performance.
CHPL_RE2¶
Optionally, the
CHPL_RE2environment variable can be used to enable regular expression operations as defined inRegex. Current options are:
Value
Description
bundled
use the re2 distribution in third-party
none
do not support regular expression operations
If unset, Chapel will attempt to build RE2 using CHPL_TARGET_COMPILER (noting that the bundled version may not be supported by all compilers). Based on the outcome, Chapel will default to:
Value
Description
bundled
if the build was successful
none
otherwise
Note
Note that the Chapel
util/quickstart/setchplenv.*source scripts setCHPL_RE2to'nonewhile theutil/setchplenv.*versions leave it unset, resulting in the behavior described just above.
CHPL_AUX_FILESYS¶
Optionally, the
CHPL_AUX_FILESYSenvironment variable can be used to request runtime support for certain filesystems.
Value
Description
none
only support traditional Linux filesystems
lustre
enable I/O improvements specific to Lustre filesystems
If unset,
CHPL_AUX_FILESYSdefaults tonone.
CHPL_LLVM¶
The
CHPL_LLVMenvironment variable enables support for the LLVM back-end to the Chapel compiler (see LLVM Support) and support for extern blocks in Chapel code via the Clang compiler (see C Interoperability). Current options are:
Value
Description
bundled
use the llvm/clang distribution in third-party
system
find a compatible LLVM and clang in system libraries; but note that it must be a version supported by Chapel
none
do not support llvm/clang-related features (but note that the LLVM Support library will still be used – see
CHPL_LLVM_SUPPORTbelow)unset
indicates that no reasonable default has been inferred, requiring the user to intentionally select another option
If unset,
CHPL_LLVMdefaults to:
noneon linux32 where Chapel LLVM support is not yet implemented
bundledif you’ve already built the bundled llvm in third-party/llvm
systemif a compatible system-wide installation of LLVM and clang is detected
unsetotherwiseIf CHPL_LLVM is
unsetyou will need to either add a system-wide installation of LLVM or setCHPL_LLVMtobundledornone.See Chapel Prerequisites for more information about currently supported LLVM versions and how to install them. If you are having trouble getting the build system to recognize your system install of LLVM, try setting
CHPL_LLVM=systemand setCHPL_LLVM_CONFIGto thellvm-configcommand from the LLVM version you have installed. Temporarily setting these can help produce a different error message that may may help you to diagnose the problem.
CHPL_LLVM_SUPPORT¶
This variable indicates where to find the LLVM support library. The LLVM support library is required to build the
chplcompiler. It can only have two values:
Value
Description
bundled
build the LLVM support library from source using the bundled version in third-party
system
use a system-wide install of LLVM to get the LLVM support library
If unset,
CHPL_LLVM_SUPPORTdefaults to the same value asCHPL_LLVMifCHPL_LLVM=systemorCHPL_LLVM=bundled. Otherwise:
systemif a compatible system-wide installation of LLVM is detected
bundledotherwise
CHPL_LLVM_CONFIG¶
In some cases, it is useful to be able to select a particular LLVM installation for use with
CHPL_LLVM=systemor withCHPL_LLVM_SUPPORT=system. In that event, in addition to setting one of those variables, you can setCHPL_LLVM_CONFIGto the llvm-config command from the LLVM installation you wish to use.Inspecting the value of this variable from
printchplenv --allcan also help to identify problems with detection of a system install of LLVM and clang.
CHPL_LLVM_GCC_PREFIX¶
In some cases, the configured
clangwill not work correctly without a--gcc-toolchainflag. The Chapel compiler tries to infer this flag based upon thegcccurrently available in yourPATHbut sometimes that strategy does not work. As a result, it is sometimes necessary to indicate the path to the GCC libraries. You can setCHPL_LLVM_GCC_PREFIXtononeto disable passing the--gcc-toolchainflag; or you can set it to a particular directory to pass toclangwith the--gcc-toolchainflag.
CHPL_UNWIND¶
Optionally, the
CHPL_UNWINDenvironment variable can be used to select an unwind library for stack tracing. Current options are:
Value
Description
bundled
use the libunwind bundled with Chapel in third-party
system
assume libunwind is already installed on the system
none
don’t use an unwind library, disabling stack tracing
If unset,
CHPL_UNWINDdefaults tonone
CHPL_LIB_PIC¶
Optionally, the
CHPL_LIB_PICenvironment variable can be used to build position independent code suitable for shared libraries. This is intended for use when Calling Chapel Code from Other Languages, especially when Using Your Library in Python or when building with--dynamic. This setting affects the runtime build as well as programs compiled withchpl. Current options are:
Value
Description
pic
build position-independent code suitable for a shared library
none
use the system default, which might be position-dependent or position-independent but not suitable for a shared library
If unset,
CHPL_LIB_PICdefaults tonone
Character Set¶
Chapel works with the Unicode character set with the UTF-8 encoding. Chapel programs will use the UTF-8 encoding regardless of the LANG and LC_ALL environment variable settings that the C library uses.
Compiler Command Line Option Defaults¶
Most of the compiler’s command line options support setting a default value for
the option via an environment variable. To see a list of the environment
variables that support each option, run the compiler with the --help-env
flag. For boolean flags and toggles, setting the environment variable to any
value selects that flag.
Chapel Configuration Files¶
The Chapel configuration file is a file named either chplconfig or
.chplconfig that can store overrides of the inferred environment variables
listed as a result of executing printchplenv.
Syntax¶
Below are the valid forms of syntax for Chapel configuration files. All other usages will result in a syntax error.
Definitions
Users can define variables with the following format:
CHPL_ENV=value
Above, the default value of CHPL_ENV will be overridden to be value.
All white space is stripped away from definitions.
Ignored Lines
Any lines containing nothing or only white space will be ignored. Comments,
which are denoted by the # character, similar to bash or python,
are also ignored.
Example¶
Below is an example of a Chapel configuration file with comments:
# ~/.chplconfig
# Default to multi-locale
CHPL_COMM=gasnet
CHPL_TASKS=qthreads # Use Qthreads
# System GMP is available on these machines
CHPL_GMP=system
To confirm the configuration file is written correctly, you can run
printchplenv --all --overrides, which will show a list of variables that are
currently being overridden. Values followed by a
+ have been overridden by the Chapel configuration file, whereas
values followed by a * have been overridden by an environment variable.
Generating Configuration Files¶
To generate a configuration file based on the current configuration, use
printchplenv or ./configure.
When using printchplenv, run it with the --simple format flag to get a
format compatible with Chapel configuration files.
The --overrides filter flag can be used to print only the variables
currently overridden by either environment variables or Chapel
configuration file.
For example, to save the current overrides into a Chapel configuration file:
printchplenv --all --simple --overrides > ~/.chplconfig
The printchplenv --all --simple flag can be used to print all the variables
of the current configuration. For example:
printchplenv --all --simple > ~/.chplconfig
For more information on using printchplenv, see the printchplenv -h
output.
Alternatively, the ./configure script will generate a chplconfig
file. See Installing Chapel.
Search Paths and File Names¶
Though you can put your Chapel configuration file anywhere by setting the
$CHPL_CONFIG environment variable to its enclosing directory, you can also
place it in your $HOME or $CHPL_HOME directory and Chapel will be able to
find it.
The search priority for Chapel configuration files is as follows:
$CHPL_CONFIG$HOME(~/)$CHPL_HOME
When both a chplconfig and .chplconfig are present, the visible
chplconfig will be prioritized.
Only a single chplconfig file will be used. That is, as soon as a valid
Chapel configuration file is found, the definitions of that file are used.
Note
The $CHPL_CONFIG variable is the path to the enclosing
directory - not the full path including chplconfig itself.
Variable Priority¶
Variable precedence goes in the following order:
Explicit compiler flags:
chpl --env=valueEnvironment variables:
CHPL_ENV=valueChapel configuration file:
~/.chplconfigInferred environment variables:
printchplenv