diff --git a/.gitignore b/.gitignore index 9a56843112c8214fc4dbce8efdf3fc23aa7e5919..8288ecfeb5833501a959daa0553dfe28999b7676 100644 --- a/.gitignore +++ b/.gitignore @@ -28,6 +28,7 @@ examples/*.xmf examples/used_parameters.yml examples/energy.txt examples/*/*.xmf +examples/*/*.hdf5 examples/*/used_parameters.yml examples/*/energy.txt diff --git a/examples/BigCosmoVolume/makeIC.py b/examples/BigCosmoVolume/makeIC.py index 3020feaf753f817f039d2fd09c4fa4f7fb69b896..411ac54b41fadc4209b314b5b9976e5ac95d8000 100644 --- a/examples/BigCosmoVolume/makeIC.py +++ b/examples/BigCosmoVolume/makeIC.py @@ -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..." diff --git a/examples/CosmoVolume/getIC.sh b/examples/CosmoVolume/getIC.sh index 5b951fc247006f0378bcee2b74a9619b7b1acc7d..fdaddd1d1f09a941244f520fb368aaed8f2316b4 100755 --- a/examples/CosmoVolume/getIC.sh +++ b/examples/CosmoVolume/getIC.sh @@ -1,2 +1,2 @@ #!/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 diff --git a/examples/EAGLE_12/README b/examples/EAGLE_12/README new file mode 100644 index 0000000000000000000000000000000000000000..7bdbfd929dac87950c6ac4b672591a75877e3b7b --- /dev/null +++ b/examples/EAGLE_12/README @@ -0,0 +1,13 @@ +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. diff --git a/examples/EAGLE_12/eagle_12.yml b/examples/EAGLE_12/eagle_12.yml new file mode 100644 index 0000000000000000000000000000000000000000..778d04fdd02004fd10ac468321568069e39dd217 --- /dev/null +++ b/examples/EAGLE_12/eagle_12.yml @@ -0,0 +1,46 @@ +# 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 + diff --git a/examples/EAGLE_12/getIC.sh b/examples/EAGLE_12/getIC.sh new file mode 100755 index 0000000000000000000000000000000000000000..1983a1c19fbfd67d2a13d7a59847423d217f0e4e --- /dev/null +++ b/examples/EAGLE_12/getIC.sh @@ -0,0 +1,2 @@ +#!/bin/bash +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs_12.hdf5 diff --git a/examples/EAGLE_12/run.sh b/examples/EAGLE_12/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..58c92adc0a1afadf0d15f81613d749f6e736f211 --- /dev/null +++ b/examples/EAGLE_12/run.sh @@ -0,0 +1,11 @@ +#!/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 + diff --git a/examples/EAGLE_25/README b/examples/EAGLE_25/README new file mode 100644 index 0000000000000000000000000000000000000000..0af58d16d9ca101fb2f641b1493fdc8268184ff4 --- /dev/null +++ b/examples/EAGLE_25/README @@ -0,0 +1,13 @@ +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. diff --git a/examples/EAGLE_25/eagle_25.yml b/examples/EAGLE_25/eagle_25.yml new file mode 100644 index 0000000000000000000000000000000000000000..731d87ea360ced596c4190880c62fdfb1cd605f8 --- /dev/null +++ b/examples/EAGLE_25/eagle_25.yml @@ -0,0 +1,46 @@ +# 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 + diff --git a/examples/EAGLE_25/getIC.sh b/examples/EAGLE_25/getIC.sh new file mode 100755 index 0000000000000000000000000000000000000000..4577db3a351f5b9ce16962897c664cd12108b01c --- /dev/null +++ b/examples/EAGLE_25/getIC.sh @@ -0,0 +1,2 @@ +#!/bin/bash +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs_25.hdf5 diff --git a/examples/EAGLE_25/run.sh b/examples/EAGLE_25/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..f232cf98f772ab9900bd22b635090e3c103749b5 --- /dev/null +++ b/examples/EAGLE_25/run.sh @@ -0,0 +1,11 @@ +#!/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 + diff --git a/examples/EAGLE_50/README b/examples/EAGLE_50/README new file mode 100644 index 0000000000000000000000000000000000000000..50a8ec6b8eddbbcf34a9b36b76ab34ad7d1f5401 --- /dev/null +++ b/examples/EAGLE_50/README @@ -0,0 +1,13 @@ +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. diff --git a/examples/EAGLE_50/eagle_50.yml b/examples/EAGLE_50/eagle_50.yml new file mode 100644 index 0000000000000000000000000000000000000000..1b1f4e4dfa0559f4fcf18d99c0fc649a3b8f5307 --- /dev/null +++ b/examples/EAGLE_50/eagle_50.yml @@ -0,0 +1,46 @@ +# 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 + diff --git a/examples/EAGLE_50/getIC.sh b/examples/EAGLE_50/getIC.sh new file mode 100755 index 0000000000000000000000000000000000000000..f898a02fac4f66f1d186d61a8d48d7b1f81a2af4 --- /dev/null +++ b/examples/EAGLE_50/getIC.sh @@ -0,0 +1,2 @@ +#!/bin/bash +wget http://virgodb.cosma.dur.ac.uk/swift-webstorage/ICs/EAGLE_ICs_50.hdf5 diff --git a/examples/EAGLE_50/run.sh b/examples/EAGLE_50/run.sh new file mode 100755 index 0000000000000000000000000000000000000000..87d522be6bd95fa503d437af861a68ce8bf85b4c --- /dev/null +++ b/examples/EAGLE_50/run.sh @@ -0,0 +1,11 @@ +#!/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 + diff --git a/examples/mkplots.m b/examples/mkplots.m deleted file mode 100644 index 341eaf395a65db2975b161a8a98e1916b9252741..0000000000000000000000000000000000000000 --- a/examples/mkplots.m +++ /dev/null @@ -1,102 +0,0 @@ - -%% 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 - diff --git a/src/parallel_io.c b/src/parallel_io.c index 66b02d2bff2bc0d6f2dd69d994a93576e8b96583..1411b85b9b4144830aa6a9f37a487b3148a2db21 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -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 */ diff --git a/src/serial_io.c b/src/serial_io.c index 03d3c38850e0a7800c83d7dd0942025632bf1d0b..fac3c1b006375eb43a4e799f96a4979f26238668 100644 --- a/src/serial_io.c +++ b/src/serial_io.c @@ -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 */ diff --git a/src/single_io.c b/src/single_io.c index 3893f1c86784e07e5cd78afc32a49339e60840ba..329ec7253247a6bec992e9cb740d322fa3048a01 100644 --- a/src/single_io.c +++ b/src/single_io.c @@ -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 */