In order to utilize \InfiniBand{} or Omni-Path as the underlying high speed
interconnect, it is generally necessary to increase the locked memory settings
for system users. This can be accomplished by adding the
\texttt{/etc/security/limits.d/40-ohpc-limits.conf} file and this should be
performed on all job submission hosts. In this recipe, jobs are submitted from
the {\em SMS} host, and the following commands can be used to update the
maximum locked memory settings on both the {\em SMS} host and compute nodes:

% begin_ohpc_run ohpc_validation_newline ohpc_validation_comment Update memlock
% settings
\begin{lstlisting}[language=bash,literate={-}{-}1,keywords={},upquote=true,keepspaces]
# Update memlock settings on SMS
[sms](*\#*) echo '* soft memlock unlimited' >> /etc/security/limits.d/40-ohpc-limits.conf
[sms](*\#*) echo '* hard memlock unlimited' >> /etc/security/limits.d/40-ohpc-limits.conf
# Update memlock settings on compute
[sms](*\#*) yq -i \
	'.cmds += [{"cmd":"echo \"* soft memlock unlimited\" >> /etc/security/limits.d/40-ohpc-limits.conf"}]' \
	/opt/ohpc/admin/images/compute-prod.yaml
[sms](*\#*) yq -i \
	'.cmds += [{"cmd":"echo \"* hard memlock unlimited\" >> /etc/security/limits.d/40-ohpc-limits.conf"}]' \
	/opt/ohpc/admin/images/compute-prod.yaml
\end{lstlisting}
% end_ohpc_run
