Crash Course
From cloudflu
(→Results Post-Processing) |
(→Solver Output) |
||
| Line 165: | Line 165: | ||
See [http://cloudflu.svn.sourceforge.net/viewvc/cloudflu/trunk/custome http://cloudflu.svn.sourceforge.net/viewvc/cloudflu/trunk/custome] for more details. | See [http://cloudflu.svn.sourceforge.net/viewvc/cloudflu/trunk/custome http://cloudflu.svn.sourceforge.net/viewvc/cloudflu/trunk/custome] for more details. | ||
| valign="top" | | | valign="top" | | ||
| - | [[Image:Cloud-computing.jpg|right| | + | [[Image:Cloud-computing.jpg|right|150px|up to you]] |
|} | |} | ||
Revision as of 09:42, 21 December 2010
Prerequisites
|
To start work with CloudFlu functionality user need to have an AWS Amazon account and be registered for EC2 and S3 services. The only variables user need to define in his environment is AWS security credentails, for example: export AWS_ACCESS_KEY_ID=YYVUYVIUBIBI export AWS_SECRET_ACCESS_KEY=BBKBBOUjbkj/BBOUBOBJKBjbjbboubuBUB Amazon EC2 service allows user to aquire unlimited amount of computing power. |
Acquiring Cluster
|
cloudflu-cluster-start utility is responsible for the first and most important step - actual starting and configuring of the cluster. To run it just type : cloudflu-cluster-start By default it launches Ubuntu 10.04 64bit based cluster nodes with the following characteristics:
These nodes already have preintalled software and ready to use environment to be able to compile and run OpenFOAM solvers. To ask about avaiable options and see corresponding default values you can type : cloudflu-cluster-start --help For example, you can increase the number of cluster nodes in the following way : cloudflu-cluster-start --number-nodes=32 To print a list of identifiers for the run clusters you need to type: cloudflu-cluster-ls To terminate a cluster you need to use its identifier : echo <cluster id> | cloudflu-cluster-rm Terminate all the clusters : cloudflu-cluster-ls | xargs cloudflu-cluster-rm |
Solver Run
|
To run a solver (whether one of the standard one or user defined) user need to go through the following steps:
a_cluster_id=`cloudflu-cluster-start` && echo ${a_cluster_id}
a_study_name=`cloudflu-study-book` && echo ${a_study_name}
cloudflu-solver-start --study-name=${a_study_name} --cluster-id= ${a_cluster_id} \
--case-dir="~/cloudflu-examples/custom"
cloudflu-solver-process --study-name=${a_study_name} --output-dir='damBreak.out'
Note : CloudFlu functionality is failsafe. You can easily resume downloading the solver output results even after your internet connection was broken. Just restart the 'broken' step once again to be able to continue. |
Standard Solvers
|
To be able to run a solver case it should satisfy the following minor requirements.
cloudflu-solver-start --case-dir='damBreak' --run-hook='my_run'
a_number_nodes=${1}
a_slots=`python -c "import os; print os.sysconf( 'SC_NPROCESSORS_ONLN' )"`
a_number_processors=`python -c "print ${a_number_nodes} * ${a_slots}"`
weights=`python -c "print tuple( [ 1 for an_id in range( ${a_number_processors} ) ] )"`
processorWeights=`echo ${weights} | sed -e "s%,%%g"`
cat > ./system/decomposeParDict <<EOF
FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object decomposeParDict;
}
numberOfSubdomains ${a_number_processors};
method scotch;
scotchCoeffs
{
processorWeights ${processorWeights};
}
EOF
All other details are left on the user. See http://cloudflu.svn.sourceforge.net/viewvc/cloudflu/trunk/standard for more details. |
User Solvers
|
User can run your own solveras well. The requrements for this user specific solver case, in general, are the same as for standard one. For this specific case user additionally need :
export FOAM_USER_APPBIN=${a_cur_dir}
export PATH=${FOAM_USER_APPBIN}:${PATH}
export FOAM_USER_LIBBIN=${a_cur_dir}
export LD_LIBRARY_PATH=${FOAM_USER_LIBBIN}:${LD_LIBRARY_PATH}
where ${a_cur_dir} can be defined as: a_cur_dir=${0%/*}
All other details are left on the user. See http://cloudflu.svn.sourceforge.net/viewvc/cloudflu/trunk/custome for more details. |
Solver Output
|
CloudFlu comes with functionality that enables you form solver output from the cluster, namely :
Use them to describe what are you really interested to. See http://cloudflu.svn.sourceforge.net/viewvc/cloudflu/trunk/custome for more details. |
Results Post-Processing
|
CloudFlu allows you not just download the solver output data from cluster, but automatically post-process them as well. cloudflu-solver-process comes with the following additional options :
|
Resources Cleanup
'Nothing is perfect under the Sun'. Resources could be aquired and not released due to possible network failures. CloudFlu comes with corresponding cloudflu-clean utilitiy to ensure, that you are not going to pay for what you are not actually use anymore. Use it at the end of your calculation session, as a precaution :
cloudflu-clean
Preferences
CloudFlu comes with its preferences system. Use this preferences to adjust CloudFlu unctionality to your particular needs and 'internet connection'. Preferences is defined in terms of Python file. You can find it in your home folder under the name :
.cloudflurc-<version>.py
One of the most important option is upload_seed_size. It defines the speed in which your data will be transfered to / from the cluster. It can not be too high, because of your limited connection speed. Been too small, will eat your precious time. Experiment with its value to find more efficient one.
(An automatic utility to mesure the optimal upload_seed_size value will come soon)
Conclusion
|
That is, in short, all you need to know to be able to access and effectively start to use the unlimited cloud computing resources. To contact us use CloudFlu forum and bug-tracker : Check CloudFlu wikki page, where we are going to talk about this functionality in more details : We are open for any suggestions and remarks to make you CFD analysis more flexible and exciting. Use --help option to check what options are available to customize the given functionality. Use --debug option to be able to see what is happenening. Keep in touch and good luck!!! |
