YOUR NAME HERE 9. aprill 2017. a. - ut · References in your solutions...

7
ud suvi? - due 18 Aprill 2017 YOUR NAME HERE 9. aprill 2017. a.

Transcript of YOUR NAME HERE 9. aprill 2017. a. - ut · References in your solutions...

Nuud suvi? - due 18 Aprill 2017

YOUR NAME HERE

9. aprill 2017. a.

References in your solutionsPlease add references to any external material that you base your answers on.

TypesettingPlease put your answers in a LaTeX document and submit both a pdf and the LaTeX source.Try to keep a similar template to the one given. You may find it helpful to use sharelatex orinstall a LaTeX distribution and editor, such as texworks. Some documentation on LaTeX canbe found at https://en.wikibooks.org/wiki/LaTeX.

Study material• Beowulf Clusterhttps://en.wikipedia.org/wiki/Beowulf_cluster

• Topology Optimizationhttps://en.wikipedia.org/wiki/Topology_optimization

• LaTeXhttps://en.wikibooks.org/wiki/LaTeX

Building a Mini cluster

Homework question 1Build a mini cluster using 4 Banana Pros. Documentation can be found at https://courses.cs.ut.ee/t/kids/Main/Raspcluster.

a) Run the Linpack and stream benchmarks on a single core. Record your results below.ANSWERCOMMENTGRADE

b) Run the Linpack benchmark on your cluster. Estimate the power efficiency for the Linpackbenchmark. Compare this to the efficiency of computers in the Top500 in terms of flops perwatt.ANSWERCOMMENTGRADE

Shape optimization

Homework question 2In this exercise you will use optimal design to obtain a structure that can be 3D printed. Youwill use TopOpt to generate an optimal truss design on Juur. Your design will be printed usingPLX or ABS plastic on an Ultimaker 2 3D printer.

a) Examine the TopOpt website http://www.topopt.dtu.dk/. Try the online demonstrationsand read some of the papers. Did you find anything interesting or fun? What is topologyoptimization and in what areas might it be useful?

1

b) Examine the script supplied in the programs to install PETSc (http://www.mcs.anl.gov/petsc/) and the large scale topology optimization code using PETSc (http://www.topopt.dtu.dk/?q=node/898/). How might you optimize the speed of the resulting installed codes?

c) Using either the script in the supplied programs, or your optimized version, install PETSc(http://www.mcs.anl.gov/petsc/) and the large scale topology optimization code usingPETSc (http://www.topopt.dtu.dk/?q=node/898/). Run the code with the default set-tings. Transfer the files to your laptop or a workstation. Install Paraview[17], and thenimport the files.

– Import a vtu file– Display xPhys coordinate as a surface plot– Apply thresholding filter for a values between 0.75 and 1 (feel free to adjust this to get

a better fully connected result)– Apply the Extract surface filter to extract a bounding surface– Then apply the triangulate filter so one can save an STL file– Finally save an STL file.

The Protokeskus[24] has an Ultimaker 2 which will be used to 3D print your programoutput. Download CURA for your computer from [15] under the products tab (https://ultimaker.com/en/products/software). Open up the STL format surface in Cura.In the basic CURA settings, choose

– layer height – 0.1 mm– shell thickness – 0.8 mm– fill density – 100%– bottom/top thickness – 0.8 mm– support type – Everywhere– platform adhesion type – Brim

Finally, re-size the design so that it prints in less than 60 minutes then save your modelin GCode format for uploading to 3D printer. Repeat these steps, but change the topologyoptimization settings. Size your new structure so that in under 120 minutes we can 3D printthe new optimal structure that you have designed. Include a couple pictures of your designin your writeup, for example as in Figs. 1 and 2. For 3D printing choose your optimizedstructure and submit your STL and GCode files with your homework solution. We willprint your design and give it to you at the exam session.

ANSWERCOMMENTGRADE

Homework question 3Read through and summarize [13] – it may be helpful to examine [14].ANSWERCOMMENTGRADE

Homework question 4Explain some ways how you might use parallel computing to improve healthcare.ANSWERCOMMENTGRADE

2

Joonis 1: One view of a topology optimized structure

Joonis 2: Another view of a topology optimized structure

3

Jupyter Notebooks

Homework question 5Try out and then describe the demonstrations available at https://try.jupyter.org/.ANSWERCOMMENTGRADE

Homework question 6Summarize the contents of [23] and [24].ANSWERCOMMENTGRADE

Raycasting

Homework question 7Cameron Brett asked whether raycasting is suitable for use on GPUs https://twitter.com/Cambert123/status/850724085105668096. By reviewing [25] (and/or other sources), briefly ex-plain what raycasting is.ANSWERCOMMENTGRADE

Homework question 8On a computer with a monitor on which you have direct access, compile the example source codefor raycasting given at [25]. Give the details of the computer you used (operating system, RAM,CPU, GPU, compilers) and typical frames per second obtained for running the given code. Besure to explain how you compiled your code.ANSWERCOMMENTGRADE

Homework question 9On a computer with a monitor on which you have direct access, use OpenMP directives to paral-lelize source code for raycasting given at [25]. Give the details of the computer you used (operatingsystem, RAM, CPU, GPU, compilers) and typical frames per second obtained for running theparallelized code. Be sure to explain how you compiled your code.ANSWERCOMMENTGRADE

Homework question 10Explain whether you think you could do use OpenACC, OpenCL, CUDA or OpenMP 4.0 to getefficient execution on GPUs? What about OpenMP for efficient execution on Xeon Phi?ANSWERCOMMENTGRADE

4

Kirjandus

[1] http://diy3dprinting.blogspot.com

[2] Tymrak B.M., Kreiger M., Pearce, J.M. “Mechanical properties of components fabricatedwith open-source 3-D printers under realistic environmental conditions” Materials andDesign 58:242-246 (2014) http://dx.doi.org/10.1016/j.matdes.2014.02.038

[3] Aage N., Andreassen E., Lazarov B.S., “Topology optimization using PETSC: aneasy-to-use, fully parallel, open source topology optimization framework” Structuraland Multidisciplinary Optimization 51(3):565-572 (2015) http://dx.doi.org/10.1007/s00158-014-1157-0

[4] http://www.top500.org/

[5] http://icl.cs.utk.edu/hpcc/

[6] Andreassen E., Lazarov B.S., Sigmund O., “Design of manufacturable 3D extremal elasticmicrostructure” Mechanics of Materials 69:1-10 (2014) http://dx.doi.org/10.1016/j.mechmat.2013.09.018

[7] Cox S.J., Cox J.T., Boardman R.P., Johnson S.J., Scott M., O’Brien N.S.,“Irdis-pi: a low-cost, compact demonstration cluster” Cluster Computing 17:349-358(2014) http://dx.doi.org/10.1007/s10586-013-0282-7 http://www.southampton.ac.uk/~sjc/raspberrypi/

[8] Tso F.P., White D.R., Jouet S., Singer J., Pezaros D.P., “A Scale model for cloud com-puting infrastructures” Proc. 2013 IEEE 33rd International Conference on DistributedComputing Systems Workshops (ICDCSW), pp 108-112 (2013) http://dx.doi.org/10.1109/ICDCSW.2013.25 https://raspberrypicloud.wordpress.com/

[9] Breuning S., “Banoffe Pi Server” http://banoffeepiserver.com/

[10] Balakrishnan N., “Building and benchmarking a low power ARM cluster” MSCthesis, University of Edinburgh https://www.epcc.ed.ac.uk/sites/default/files/Dissertations/2011-2012/Submission-1126390.pdf

[11] Kiepert J., “Creating a Raspberry Pi-Based Beowulf Cluster” Pre-print 2013https://www.epcc.ed.ac.uk/sites/default/files/Dissertations/2011-2012/Submission-1126390.pdf

[12] Andreassen E., Clausen A., Schevenels M., Lazarov B.S., Sigmund O., “Efficient topologyoptimization in MATLAB using 88 lines of code” Structural and Multidisciplinary Op-timization 43(1):1-16 (2011) http://dx.doi.org/10.1007/s00158-010-0594-7 http://www.topopt.dtu.dk/?q=node/751

5

[13] Higa M., Tanino H., Nishimura I., Matsuno T., Ito H., “Three-dimensional shape optimiza-tion of a cemented hip stem and experimental validations” Journal of Artificial Organs18(1):79-85 (2015) http://dx.doi.org/10.1007/s10047-014-0792-y

[14] Human Femur https://3dprint.nih.gov/discover/3dpx-000168

[15] Ultimaker https://ultimaker.com/

[16] Protokeskus https://ideelab.wordpress.com/team-up/protokeskus/

[17] ParaView http://www.paraview.org/

[18] TopOpt http://www.topopt.dtu.dk/

[19] Bendsøe M.P., Sigmund O., “Topology Optimization: Theory, Methods and Applications”2nd ed. Springer (2004)

[20] Notes on Rasberry Pi cluster setup https://courses.cs.ut.ee/t/kids/Main/Raspcluster

[21] PETSc http://www.mcs.anl.gov/petsc/index.html

[22] Trilinos http://trilinos.org/

[23] Willems K., “Jupyter Notebook Tutorial: The Definitive Guide”https://www.datacamp.com/community/tutorials/tutorial-jupyter-notebook#gs.1OmGFyQ

[24] Parchuri V., “Docker: Data Science Environment with Jupyter” https://www.dataquest.io/blog/docker-data-science/

[25] Vandevenne L., “Lode’s Computer Graphics Tutorials: Raycasting” http://lodev.org/cgtutor/raycasting.html

AcknowledgementsThis is based on material from the 2015 course on Basics of Scientific Computing Infrastructuresby Lauri Anton, Thalia Karydi, Benson Muite, Alo Peets and Hardi Teder. The section onJupyter notebooks is based on exercies by Meeri Lembinen.

6