Commit cb4608a1 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Merge branch 'new_cosmo_ICs' into 'master'

New cosmo ICs

New ICs to replace the BigCosmoVolume at some point.
They contain corrected smoothing lengths such that the initialisation step is much shorter. They also contain the DM particles and further species for when we are ready to have them in SWIFT.

The EAGLE_25 case is almost the old BigCosmoVolume.

See merge request !188
parents 5f1341f3 56473229
......@@ -28,6 +28,7 @@ examples/*.xmf
examples/used_parameters.yml
examples/energy.txt
examples/*/*.xmf
examples/*/*.hdf5
examples/*/used_parameters.yml
examples/*/energy.txt
......
......@@ -47,7 +47,7 @@ if downsample > 1. or downsample <= 0.:
# Download the tile
if (not os.path.isfile("tile.hdf5")):
print "Downloading initial tile..."
urllib.urlretrieve ("http://icc.dur.ac.uk/~jlvc76/Files/SWIFT/tile.hdf5", "tile.hdf5")
urllib.urlretrieve ("http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/tile.hdf5", "tile.hdf5")
print "Done."
else:
print "Tile already exists. No need to download..."
......
#!/bin/bash
wget http://icc.dur.ac.uk/~jlvc76/Files/SWIFT/cosmoVolume.hdf5
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/cosmoVolume.hdf5
ICs extracted from the EAGLE suite of simulations.
WARNING: The ICs are 460MB in size. They contain ~6.5M DM particles,
~6M gas particles and ~250k star particles.
The particle distribution here is the snapshot 27 (z=0.1) of the 12Mpc
Ref-model. h- and a- factors from the original Gadget code have been
corrected for. Variables not used in a pure hydro & gravity code have
been removed. Everything is ready to be run without cosmological
integration.
The particle load of the main EAGLE simulation can be reproduced by
running these ICs on 8 cores.
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1 # Grams
UnitLength_in_cgs: 1 # Centimeters
UnitVelocity_in_cgs: 1 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters for the task scheduling
Scheduler:
cell_sub_size: 6000 # Value used for the original scaling tests
cell_split_size: 300 # Value used for the original scaling tests
# Parameters governing the time integration
TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 1. # The end time of the simulation (in internal units).
dt_min: 1e-7 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots
Snapshots:
basename: eagle # Common part of the name of output files
time_first: 0. # Time of the first output (in internal units)
delta_time: 0.05 # Time difference between consecutive outputs (in internal units)
UnitMass_in_cgs: 1 # Grams
UnitLength_in_cgs: 1 # Centimeters
UnitVelocity_in_cgs: 1 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 1e-2 # Time between statistics output
# Parameters for the hydrodynamics scheme
SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
delta_neighbours: 0.1 # The tolerance for the targetted number of neighbours.
max_smoothing_length: 0.1 # Maximal smoothing length allowed (in internal units).
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
# Parameters related to the initial conditions
InitialConditions:
file_name: ./EAGLE_ICs_12.hdf5 # The file to read
#!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs_12.hdf5
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_ICs_12.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 12Mpc example..."
./getIC.sh
fi
../swift -s -t 16 eagle_12.yml
ICs extracted from the EAGLE suite of simulations.
WARNING: The ICs are 3.6GB in size. They contain ~52M DM particles,
~50M gas particles and ~2M star particles.
The particle distribution here is the snapshot 27 (z=0.1) of the 25Mpc
Ref-model. h- and a- factors from the original Gadget code have been
corrected for. Variables not used in a pure hydro & gravity code have
been removed.
Everything is ready to be run without cosmological integration.
The particle load of the main EAGLE simulation can be reproduced by
running these ICs on 64 cores.
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1 # Grams
UnitLength_in_cgs: 1 # Centimeters
UnitVelocity_in_cgs: 1 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters for the task scheduling
Scheduler:
cell_sub_size: 6000 # Value used for the original scaling tests
cell_split_size: 300 # Value used for the original scaling tests
# Parameters governing the time integration
TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 1. # The end time of the simulation (in internal units).
dt_min: 1e-7 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots
Snapshots:
basename: eagle # Common part of the name of output files
time_first: 0. # Time of the first output (in internal units)
delta_time: 0.05 # Time difference between consecutive outputs (in internal units)
UnitMass_in_cgs: 1 # Grams
UnitLength_in_cgs: 1 # Centimeters
UnitVelocity_in_cgs: 1 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 1e-2 # Time between statistics output
# Parameters for the hydrodynamics scheme
SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
delta_neighbours: 0.1 # The tolerance for the targetted number of neighbours.
max_smoothing_length: 0.1 # Maximal smoothing length allowed (in internal units).
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
# Parameters related to the initial conditions
InitialConditions:
file_name: ./EAGLE_ICs_25.hdf5 # The file to read
#!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs_25.hdf5
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_ICs_25.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 25Mpc example..."
./getIC.sh
fi
../swift -s -t 16 eagle_25.yml
ICs extracted from the EAGLE suite of simulations.
WARNING: The ICs are 28GB in size. They contain ~425M DM particles,
~405M gas particles and ~20M star particles
The particle distribution here is the snapshot 27 (z=0.1) of the 50Mpc
Ref-model. h- and a- factors from the original Gadget code have been
corrected for. Variables not used in a pure hydro & gravity code have
been removed.
Everything is ready to be run without cosmological integration.
The particle load of the main EAGLE simulation can be reproduced by
running these ICs on 512 cores.
# Define the system of units to use internally.
InternalUnitSystem:
UnitMass_in_cgs: 1 # Grams
UnitLength_in_cgs: 1 # Centimeters
UnitVelocity_in_cgs: 1 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters for the task scheduling
Scheduler:
cell_sub_size: 6000 # Value used for the original scaling tests
cell_split_size: 300 # Value used for the original scaling tests
# Parameters governing the time integration
TimeIntegration:
time_begin: 0. # The starting time of the simulation (in internal units).
time_end: 1. # The end time of the simulation (in internal units).
dt_min: 1e-7 # The minimal time-step size of the simulation (in internal units).
dt_max: 1e-2 # The maximal time-step size of the simulation (in internal units).
# Parameters governing the snapshots
Snapshots:
basename: eagle # Common part of the name of output files
time_first: 0. # Time of the first output (in internal units)
delta_time: 0.05 # Time difference between consecutive outputs (in internal units)
UnitMass_in_cgs: 1 # Grams
UnitLength_in_cgs: 1 # Centimeters
UnitVelocity_in_cgs: 1 # Centimeters per second
UnitCurrent_in_cgs: 1 # Amperes
UnitTemp_in_cgs: 1 # Kelvin
# Parameters governing the conserved quantities statistics
Statistics:
delta_time: 1e-2 # Time between statistics output
# Parameters for the hydrodynamics scheme
SPH:
resolution_eta: 1.2348 # Target smoothing length in units of the mean inter-particle separation (1.2348 == 48Ngbs with the cubic spline kernel).
delta_neighbours: 0.1 # The tolerance for the targetted number of neighbours.
max_smoothing_length: 0.1 # Maximal smoothing length allowed (in internal units).
CFL_condition: 0.1 # Courant-Friedrich-Levy condition for time integration.
# Parameters related to the initial conditions
InitialConditions:
file_name: ./EAGLE_ICs_50.hdf5 # The file to read
#!/bin/bash
wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs_50.hdf5
#!/bin/bash
# Generate the initial conditions if they are not present.
if [ ! -e EAGLE_ICs_50.hdf5 ]
then
echo "Fetching initial conditions for the EAGLE 50Mpc example..."
./getIC.sh
fi
../swift -s -t 16 eagle_50.yml
%% Scaling and efficiency plots for the first test
datadir = 'Opteron8380';
test = importdata( [ datadir '/snap_C90.totals' ]);
ncores = size( test , 1 );
col = 11;
clf
subplot('position',[ 0.05 , 0.1 , 0.4 , 0.8 ]);
plot( 1:ncores , test(1,col) ./ test(:,col) , '-k' , 'LineWidth' , 2 ); hold on;
xlabel('nr. cores');
plot( [1,ncores] , [1,ncores] , ':k' , 'LineWidth' , 1.4 );
hold off;
title('Speedup GadgetSMP');
axis([ 1 , ncores , 0 , ncores ]);
subplot('position',[ 0.52 0.1 , 0.4 , 0.8 ]);
plot( 1:ncores , test(1,col) ./ test(:,col) ./ (1:ncores)' , '-k' , 'LineWidth' , 2 ); hold on;
plot( [1,ncores] , [1,1] , ':k' , 'LineWidth' , 1.4 );
% text(4*ncores/5,1,sprintf('%.2f',min(test(:,10))),'BackgroundColor',[1,1,1],'FontSize',12);
xlabel('nr. cores');
hold off;
title('Efficiency GadgetSMP');
axis([ 1 , ncores , 0 , 1.2 ]);
% Print this plot
set( gcf , 'PaperSize' , 2.3*[ 8.5 4.5 ] );
set( gcf , 'PaperPosition' , 2.3*[ 0.25 0.25 8 4 ] );
print -depsc2 test.eps
!epstopdf test.eps
%% Scaling and efficiency plots for the second test
test2 = importdata( 'test2.totals');
ncores = size( test2 , 1 );
clf
subplot('position',[ 0.05 , 0.1 , 0.4 , 0.8 ]);
plot( 1:ncores , test2(1,10) ./ test2(:,10) , '-k' , 'LineWidth' , 2 ); hold on;
xlabel('nr. cores');
plot( [1,ncores] , [1,ncores] , ':k' , 'LineWidth' , 1.4 );
hold off;
title('Speedup');
axis([ 1 , ncores , 0 , ncores ]);
subplot('position',[ 0.52 0.1 , 0.4 , 0.8 ]);
plot( 1:ncores , test2(1,10) ./ test2(:,10) ./ (1:ncores)' , '-k' , 'LineWidth' , 2 ); hold on;
plot( [1,ncores] , [1,1] , ':k' , 'LineWidth' , 1.4 );
text(4*ncores/5,1,sprintf('%.2f',min(test2(:,10))),'BackgroundColor',[1,1,1],'FontSize',12);
xlabel('nr. cores');
hold off;
title('Efficiency');
axis([ 1 , ncores , 0 , 1.2 ]);
% Print this plot
set( gcf , 'PaperSize' , 2.3*[ 8.5 4.5 ] );
set( gcf , 'PaperPosition' , 2.3*[ 0.25 0.25 8 4 ] );
print -depsc2 test2.eps
!epstopdf test2.eps
%% Components of the first test
test = importdata( 'test_nosort.totals');
ncores = size( test , 1 );
cols = [ 1 , 2 , 3 , 5 ];
clf
subplot('position',[ 0.1 , 0.1 , 0.8 , 0.8 ]);
plot( 1:ncores , test(:,cols) , 'LineWidth' , 2 ); hold on;
legend( 'sort' , 'self' , 'pair' , 'get task' , 'Location' , 'NorthWest' );
xlabel('nr. cores');
hold off;
title('ms per task type');
axis([ 1 , ncores , 0 , max(max(test(:,cols)))*1.1 ]);
% Print this plot
set( gcf , 'PaperSize' , 2.3*[ 4.5 4 ] );
set( gcf , 'PaperPosition' , 2.3*[ 0.25 0.25 4 4 ] );
print -depsc2 parts.eps
!epstopdf parts.eps
%% Components of the second test
test2 = importdata( 'test2.totals');
ncores = size( test2 , 1 );
cols = [ 1 , 2 , 3 , 5 ];
clf
subplot('position',[ 0.1 , 0.1 , 0.8 , 0.8 ]);
plot( 1:ncores , test2(:,cols) , 'LineWidth' , 2 ); hold on;
legend( 'sort' , 'self' , 'pair' , 'get task' , 'Location' , 'NorthWest' );
xlabel('nr. cores');
hold off;
title('ms per task type');
axis([ 1 , ncores , 0 , max(max(test2(:,cols)))*1.1 ]);
% Print this plot
set( gcf , 'PaperSize' , 2.3*[ 4.5 4 ] );
set( gcf , 'PaperPosition' , 2.3*[ 0.25 0.25 4 4 ] );
print -depsc2 parts2.eps
!epstopdf parts2.eps
......@@ -487,7 +487,7 @@ void read_ic_parallel(char* fileName, double dim[3], struct part** parts,
break;
default:
error("Particle Type %d not yet supported. Aborting", ptype);
message("Particle Type %d not yet supported. Particles ignored", ptype);
}
/* Close particle group */
......
......@@ -564,7 +564,8 @@ void read_ic_serial(char* fileName, double dim[3], struct part** parts,
break;
default:
error("Particle Type %d not yet supported. Aborting", ptype);
message("Particle Type %d not yet supported. Particles ignored",
ptype);
}
/* Close particle group */
......
......@@ -439,7 +439,7 @@ void read_ic_single(char* fileName, double dim[3], struct part** parts,
break;
default:
error("Particle Type %d not yet supported. Aborting", ptype);
message("Particle Type %d not yet supported. Particles ignored", ptype);
}
/* Close particle group */
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment