Hello Jess,
Are you sure you need to use the GUI under the scheduler?
We don't run Ansys under SLURM (yet), but have been running it under LSF
using ansys130 from the command-line.
Rather than mess around with the Ansys config, I wrote a simple wrapper
around ansys130. It simply reads the env provided by the scheduler
(mainly the host list) and constructs an appropriate ansys130 command.
In theory is should be easy to adapt to other schedulers.
The script is attached.
Regards,
-J
On 04/03/13 11:24, Jess Sturgeon wrote:
I'm not sure this is the appropriate forum; I haven't seen any
application specific issues, but I am wondering if anyone has had any
luck running Ansys products with SLURM.
Ansys products typically require the scheduler to reserve the
resources and then launch the program (GUI) that uses the resources as
needed until the user closes the GUI. I have been fighting with
AutoDyn and hoping someone else can enlighten me on how to configure
the applfile / autodyn_mpi.bat to work with SLURM.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jason W. Bacon
[email protected]
http://personalpages.tds.net/~jwbacon
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#!/bin/sh
#
# This script is a wrapper for ansys130. It generates a host list
# for the -machines flag based on the hosts sent from the LSF scheduler
# in $LSB_HOSTS.
#
# Author: Jason Bacon, UW - Milwaukee
#
usage() {
cat <<EOF
USAGE: $0
This command is a wrapper for ansys130. It can
only be run within LSF using bsub e.g.
bsub -n # "$0 input-file output-file"
The wrapper will automatically generate the
machine list used by ansys130.
NOTE: The list of hosts cannot exceed 4KBytes.
EOF
}
debug=1
if [ x"${LSB_JOBFILENAME}" = x -o x"${LSB_HOSTS}" = x ]; then
usage
exit -1
fi
if [ $# != 2 ]; then
usage
exit -1
fi
############################################################################
# Build host list for ansys130 command line
# Format is host:count[:host:count ...]
# where count is the number of processes to run on that host.
############################################################################
# Get first hostname
master_host=`printf ${LSB_HOSTS} | awk ' { print $1 }'`
# Prime the loop
previous_host=${master_host}
n=0
# LSF sends host list in ${LSB_HOSTS}. It could contain redundant
# hostnames if nodes have multiple slots, so these should be consolidated
# from "hostname hostname ... hostname" to "hostname:n".
host_list=''
for host in ${LSB_HOSTS}; do
if [ x${host} = x${previous_host} ]; then
# Same hostname as previous. Increment count.
n=`expr $n + 1`
else
# New host name. Append previous hostname and count to list.
# If host list is not empty, add ':' separator
if [ x${host_list} != x ]; then
host_list=${host_list}':'
fi
# Add host:count
host_list=${host_list}${previous_host}-ib0:${n}
# Reset for new host
n=1
previous_host=${host}
if [ $debug ]; then
printf "${host_list}\n"
fi
fi
done
# Add last host
host_list=${host_list}:${host}-ib0:${n}
if [ $debug ]; then
printf "$host_list\n"
fi
# Make sure ansys130 is in PATH
T=`which ansys130`
if [ $? -ne 0 ]; then
echo "Error: ansys130 is not in your PATH."
exit -2
fi
# Use current directory on slave nodes
export MPI_WORKDIR=`pwd`
# rsh is the default for Ansys, and is not enabled on our cluster
export MPI_REMSH=ssh
# Run the ansys command
ANSYS130=`which --skip-alias ansys130`
printf "Running ${ANSYS130} -dis -b -machines ${host_list} < $1 > $2 on
${master_host}\n"
${ANSYS130} -dis -b -machines ${host_list} < $1 > $2
exit $?