2025 SYLLABUS for course PHYD57, Advanced Computational Methods in Physics Lecturer: prof. Pawel Artymowicz (pawel.artymowicz@utoronto.ca; please put PHYD57 in the subject line otherwise mail may be misplaced. Please use your mail.utoronto.ca account, not gmail! My answers to gmail often get lost.) _______________________________________________________________________________ Lectures (L1..L12, 2 hrs with a break) immediately followed by 1 hr tutorials (T1..T10) are taking place in IA 2110 on Fridays from 11:00 to 14:00. Deadlines for sets of assignments/projects, denoted A1-A4, are at 11 am. Assignments will be posted 7-9 days before due date. _______________________________________________________________________________ September October November December 5 L1 3 L5, T4, A2 7 L9, T8, A3 ?? Final** 12 L2, T1 10 L6, T5 14 L10 19 L3, T2, A1 17 L7, T6 = midterm 21 L11, T9 26 L4, T3 24 L8, T7 28 L12, T10, A4 31 reading week _______________________________________________________________________________ **) - Final exam will be timed (3hrs), synchronous. To allow you to create working programs, you will write it at home, using your favorite editor and programming environment. Be able to execute a non-graphics output program in C/F, have Python ready as a backup and/or calculator. Detailed contents will evolve slightly. Please refresh your copy weekly. 1 Structure and scope of the course Syllabus of PHYD57 Numerical Comp. in Physical Sciences: History and Contemporary efforts 2 HPC: need for speed, why and how History and modernity: microprocessors, Unix, Linux, and Internet Intro to Linux (CentOS) Command line interface and shells (bash and tcsh) Text editors: vi, nano, gedit, micro 3 Connectivity (ssh & sftp, traceroute & ping) Securing your system against break-ins via /etc/hosts.deny Basic Linux shells and commands (bash, tcsh, cd, ls, ps, cd, &, bg, fg, alias, export/setenv, rm, output redirection to file via >) Getting more info: manual pages (man), -h, --help, or -help modifiers Recommended compilers: GNU: gcc, gfortran; Intel: icc, ifort -> ifx; Nvidia: nvcc/nvc++, nvfortran (formerly pgf95) Simple program in C, Fortran95, Python, Matlab and IDL (Schoerghofer,p.30) More complex program, example of HPC: 2nd order Laplace operator stencil for diffusion equation Speed comparison of C/F95 with Python & Numpy: why we learn HPC 4 C and Fortran 95 - compilers, basic usage Numerical puzzle of 711 - learning C and Fortran Kruskal counts and their connection to linked lists Coding Kruskal counts trick in Python and Fortran C: Language overview, compilers Integration with Python: calling C from Python Examples of programs 5 More Fortran Examples of programs: Init. value problems for ODEs More C Parallel execution of programs on CPU and MIC Parallel implementations: diffusion and wave equation Modern computing and the success of Integrated Circuits Barriers to single-thread comuting and Moore's law 6,7 Multi-dimensional arrays in C vs. Fortran Bottlenecks: Computation vs. RAM bandwidth (on CPU) An example program in C and Fortran. Parallelization via OpenMP in C and F Segmentation faults due to limited stack 8 Brief intro to a choice of Final Projects Intro to parallellism of supercomputing clusters CPU and MIC (many integrated cores, Xeon Phi) Calling C functions from Python Graphics in Fortran and C: DISLIN library 9 Parallel implementations: diffusion and wave equation Linked lists, nearest neighbor search Computations with CPU vs. MIC vs. CUDA Supercomputing Particle disks on MIC cluster Optically thick disk calculation (IRI) N-body integration methods and implementations 10 Interaction of protoplanets with 3D particle and gas disks Fluids by Eulerian vs. Lagrangian methods: CPU and GPU. Incompressible flow alorithm (fluidsGL) Fourier integral & discrete transform. FFT, N lnN scaling. Gravitational potential by FFT convolution Aliasing and zero-padding Examples of simple GPU programs written in CUDA Fortran 11 Discussion of chosen assignment problem solutions Examples of simple GPU programs in CUDA C/C++ CUDA computation of tetrahedrons puzzle & Laplacians Introduction to MPI Smoothed Particle Hydrodynamics implementation 12 Machine Learning, Artificial Intelligence, Neural Networks Gershenfeld "The Nature of Mathematical Modeling" (1999) Papers on NNs in spectra classifications, exoplanet research Optimum Search: Simplex (Nader-Mead). Overfitting problem. What are NNs and why do they work despite dimensionality curse Programming: Automatic vectorization and compiler reports Further details and hints on four final projects