|
TRUST 1.9.8
HPC thermohydraulic platform
|
TRUST is a platform which allows parallel calculations following some basic rules:
To make a parallel calculation, you have to partition your domain. Each sub-domain will be treated by one processor. In order to have good performance, ensure that:
You have to choose a number of processors which is in agreement with the number of cells. You can evaluate your speed-up (sequential time / parallel time, which must be as close as possible to the number of processors) or efficiency (= 1 / SpeedUp) to choose the right number of processors.
From our experience, for good performance with TRUST, each processor should treat between 20000 and 30000 cells.
To run a parallel calculation, you must:
Different blocks appear in the data file.
Modifications on the mesh block
First you may add the tags # BEGIN MESH # and # END MESH # before and after your mesh block, for example:
Adding a partitioning block
You may now add the partitioning block which contains the cutting instruction, after your mesh block:
Where partitioner_name is the name of the chosen partitioner, one of METIS, Tranche, Sous_Zones, Partition or Fichier_Decoupage (see the TRUST available partitioning tools section below).
The Larg_joint keyword allows specifying the overlapping width value.
Note the End before the last line. It will be useful for the cutting step.
This block will partition your domain into the specified number of sub-domains during the partitioning run.
Adding a block to read the sub-domains
Finally, you will add a block which will be activated during the parallel calculation and will allow reading the sub-domains:
Here we will use the trust -partition datafile command line to make the partitioning step. We consider that you have correctly added the # tags in your my_data_file.data file with the partitioning block and cutting block.
Be careful with the hashtags #, they are interpreted by the script!
To automatically perform the partitioning step and obtain the parallel data file, you have to run:
This command creates:
a DEC_my_data_file.data file which is the first data file to be run to make the partitioning.
It is immediately run by the trust -partition datafile command line to create a partition, located in the DOM_000n.Zones files.
a PAR_my_data_file.data file which is the data file for the parallel calculation. It reads the DOM_000n.Zones files through the "Scatter" instruction.
Note that the meshing and cutting of the mesh are commented out here.
To visualize your sub-domains, you can run:
For more information, you can do the exercises in the TRUST Tutorial.
In TRUST, you can make partitioning with:
the external partitioning library METIS (open source).
It is a general algorithm that will generate a partition of the domain:
the internal TRUST partitioning tool Tranche, which makes parts by cutting the domain along the x, y and/or z directions.
Figure 3 is an example of what you can obtain by cutting a 1m × 1m square divided into three parts using METIS, and Figure 4 shows the same square divided into three slices along the x direction with Tranche.
To make the partitioning, you will have to specify the overlapping width value. This value corresponds to the thickness of the virtual ghost zone (data known by one processor though not owned by it), i.e. the number of vertices or elements on the remote sub-domain known by the local sub-domain (see Figure 5).
This value depends on the space discretization scheme order:
Note that in general, you will use 2.
To launch the calculation, run the usual command completed by the number of processors needed:
where procs_number is the number of processors used, which is the same as the number of sub-domains.
You can see the TRUST & TrioCFD user slides in the "Parallel calculation" section for more information. Also work through the exercises in the TRUST Tutorial.
You must submit your job to a queue system. For this, you must have a submission file. TRUST can create a submission file for you on clusters where the support team has done installations.
To create this file, run:
You obtain a file named sub_file; you can open it and verify/change values (for example the job name, the executable name, ...).
Then submit your calculation with:
or
depending on the queue system of the cluster.
You can see the TRUST & TrioCFD user slides in the "Parallel calculation" section for more information.
To visualize your probes, you can use the CurvePlot tool with the command line:
or use Gnuplot or any software which reads values in columns in a file.
There are three ways to visualize your parallel results with VisIt:
Local mode: copy your results from the cluster to your local computer and open them with a local parallel version of VisIt:
You can have a look at the TRUST & TrioCFD user slides in the "Parallel calculation description" section.
If you want to modify your mesh, you have two possibilities:
Modify the my_data_file.data file and run:
Be careful: it will erase the SEQ_my_data_file.data, DEC_my_data_file.data and PAR_my_data_file.data files and create new ones.
Then it will run the new DEC_my_data_file.data file which gives your new DOM_000n.Zones files.
Modify the meshing part of file DEC_my_data_file.data and run it with:
Then run the parallel calculation normally on the new DOM_000n.Zones files:
If you want to modify the calculation parameters, you can modify:
The file my_data_file.data and run:
But it will erase the SEQ_my_data_file.data, DEC_my_data_file.data and PAR_my_data_file.data files and create new ones.
Then it will run the new DEC_my_data_file.data file which gives your new DOM_000n.Zones files.
Then run the PAR_my_data_file.data file with:
You will run them like: