dymola - ciemat-tic/codec GitHub Wiki

local installation. RPM and aux libs are in acme31.

  • install app
yum  localinstall  dymola-2017.2-1.x86_64.rpm
  • shared libraries. This is an ugly hack and should be avoided.
mkdir /home/localsoft/dymola_aux_libs
#copy libs 
  • app hacking to use Slurm instead of SGE
# more  /opt/dymola-2017FD01-x86_64/Modelica/Library/Optimization\ 2.2.2/Resources/Bin/StartSimulationWorker.sh 
#!/bin/sh
# $1: Current working directory
# $2: Number of mpi parallel processes
# $3: Full path to SimulationWorker executable
# $4: Host name of calling maschine (this is a cmd line input to SimulationWorker)
# $5: Port for socket communication (this is a cmd line input to SimulationWorker)

#cd "$1" ; qsub -pe openmpi $2 -cwd -b yes mpiexec \"$3\" $4 $5

myPath="${0%/*}"
sbatch --nodelist=acme31 -n $2 "$myPath/submissionScript.sh" "$1" "$3" $4 $5
# more  /opt/dymola-2017FD01-x86_64/Modelica/Library/Optimization\ 2.2.2/Resources/Bin/submissionScript.sh 
#!/bin/sh
set -x
# $1: Current working directory
# $2: Full path to SimulationWorker executable
# $3: Host name of calling maschine (this is a cmd line input to SimulationWorker)
# $4: Port for socket communication (this is a cmd line input to SimulationWorker)

srun --nodelist=acme31 "$2" $3 $4
  • add config in /etc/profile
#DYMOLA
export OSTYPE=LINUX
export QT_XKB_CONFIG_ROOT=/usr/lib/kbd/keymaps/xkb
export LD_LIBRARY_PATH=/home/localsoft/dymola_aux_libs:$LD_LIBRARY_PATH
  • internet access has to be enabled and disabled at will. For this sake, there are two scripts in /shared
#more /shared/disable_internet
GW="$(sudo /sbin/route -n | awk '{if ($1=="0.0.0.0") {print $2} ; q}')"
sudo /sbin/route del default gw "$GW"
echo "$GW" >/shared/$HOSTNAME.my_tmp_file

#more /shared/enable_internet
sudo /sbin/route add default gw "$(cat /shared/$HOSTNAME.my_tmp_file)"
  • network adapter has to be called "eth0" for the license to work. To do so, take the network with the desired MAC address and
cd /etc/sysconfig/network-scripts/
mv <desired network> ifcfg-eth0
vi ifcfg-eth0
(set this)
NAME=eth0
DEVICE=eth0