Additions,modifications to be able to run simulator on computing cluster.
This commit is contained in:
parent
d0849a8680
commit
1f37a9c6de
38
Dipolar Gas Simulator/+Scripts/run_on_cluster.m
Normal file
38
Dipolar Gas Simulator/+Scripts/run_on_cluster.m
Normal file
@ -0,0 +1,38 @@
|
||||
%% This script is testing the functionalities of the Dipolar Gas Simulator
|
||||
%
|
||||
% Important: Run only sectionwise!!
|
||||
|
||||
%% - Create Simulator, Potential and Calculator object with specified options
|
||||
|
||||
OptionsStruct = struct;
|
||||
|
||||
OptionsStruct.NumberOfAtoms = 1E6;
|
||||
OptionsStruct.DipolarPolarAngle = pi/2;
|
||||
OptionsStruct.DipolarAzimuthAngle = 0;
|
||||
OptionsStruct.ScatteringLength = 86;
|
||||
|
||||
OptionsStruct.TrapFrequencies = [125, 125, 250];
|
||||
OptionsStruct.TrapDepth = 5;
|
||||
OptionsStruct.BoxSize = 15;
|
||||
OptionsStruct.TrapPotentialType = 'Harmonic';
|
||||
|
||||
OptionsStruct.NumberOfGridPoints = [64, 64, 48];
|
||||
OptionsStruct.Dimensions = [40, 40, 20];
|
||||
OptionsStruct.CutoffType = 'Cylindrical';
|
||||
OptionsStruct.SimulationMode = 'ImaginaryTimeEvolution'; % 'ImaginaryTimeEvolution' | 'RealTimeEvolution'
|
||||
OptionsStruct.TimeStepSize = 50E-6; % in s
|
||||
OptionsStruct.NumberOfTimeSteps = 100; % in s
|
||||
OptionsStruct.EnergyTolerance = 5E-10;
|
||||
|
||||
OptionsStruct.JobNumber = 6;
|
||||
OptionsStruct.SaveData = true;
|
||||
OptionsStruct.SaveDirectory = './Data';
|
||||
options = Helper.convertstruct2cell(OptionsStruct);
|
||||
clear OptionsStruct
|
||||
|
||||
sim = Simulator.DipolarGas(options{:});
|
||||
pot = Simulator.Potentials(options{:});
|
||||
sim.Potential = pot.trap(); % + pot.repulsive_chopstick();
|
||||
|
||||
%-% Run Simulation %-%
|
||||
[Params, Transf, psi, V, VDk] = sim.run();
|
38
Dipolar Gas Simulator/bwhpc_matlab_gpe_sim.slurm
Normal file
38
Dipolar Gas Simulator/bwhpc_matlab_gpe_sim.slurm
Normal file
@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
########### Begin SLURM header ###########
|
||||
#Partition
|
||||
#SBATCH --partition=single
|
||||
# Request number of nodes and CPU cores per node for job
|
||||
#SBATCH --nodes=1
|
||||
#SBATCH --ntasks-per-node=1
|
||||
#SBATCH --cpus-per-task=10
|
||||
#SBATCH --mem=8G
|
||||
# Estimated wallclock time for job
|
||||
#SBATCH --time=02:00:00
|
||||
#SBATCH --job-name=simulation
|
||||
#SBATCH --error=simulation.err
|
||||
#SBATCH --output=simulation.out
|
||||
|
||||
########### End SLURM header ##########
|
||||
|
||||
echo "Working Directory: $PWD"
|
||||
echo "Running on host $HOSTNAME"
|
||||
echo "Job id: $SLURM_JOB_ID"
|
||||
echo "Job name: $SLURM_JOB_NAME"
|
||||
echo "Number of nodes allocated to job: $SLURM_JOB_NUM_NODES"
|
||||
echo "Number of cores allocated to job: $SLURM_JOB_CPUS_PER_NODE"
|
||||
|
||||
|
||||
# Load module
|
||||
module load math/matlab/R2023a
|
||||
|
||||
echo Directory is `pwd`
|
||||
echo "Initiating Job..."
|
||||
|
||||
# Start a Matlab program
|
||||
matlab -nodisplay -nosplash -r "Scripts.run_on_cluster"
|
||||
|
||||
# notice for tests
|
||||
echo "Job terminated successfully"
|
||||
|
||||
exit
|
Loading…
Reference in New Issue
Block a user