putation between CPU and GPU
The performance of the light curve engine has incremental improvement from light curve engines 1 to 4 by achieving better parallelism and better utilization of both CPU and GPU. It may even be possible to achieve better utilization by using overlapping of the CPU and GPU computation as in light curve engine 2 and apply it to light curve engine 4. Instead of waiting for the CPU to resolve the image area of all amplification calculations, we can sub-divide the job and transfer the active cells list of first batch amplification calculations for the GPU. While the GPU is performing ray shooting of the first batch of jobs, the CPU can start to compute the image area of the second batch of amplification calculations. The whole process is repeated until all jobs are completed. This gives maximum utilization of both CPU and GPU.
Solving multiple image area of source locations Solving multiple image area
of source locations Solving multiple image area
of source locations Solving image area of multiple source locations
Ray shooting of multiple image area
source #1,2,3,4
...
Solving multiple image area of source locations Solving multiple image area
of source locations Solving multiple image area
of source locations Solving image area of multiple source locations
Ray shooting of multiple image area Solving multiple image area
of source locations Solving multiple image area
of source locations Solving multiple image area
of source locations Solving image area of multiple source locations
Ray shooting of multiple image area source #5,6,7,8 source #9,10,11,12 TIME multi-threads CPU GPU
Figure 5.25: Light Curve Engine 5
Figure 5.25 shows the overlapping computation of multiple CPU cores and GPU. The image area of the first batch of source amplification is copied to the GPU memory once it is done and the GPU kernel is called. The CPU then takes back control and starts the image area solving for the second batch of source amplification calculation.
0 2 4 6 8 10 500 1000 1500 2000 2500 3000 time (seconds)
number of amplification points
Dynamic light curve Engine 3 vs Engine 4 vs Engine 5 (GPU ray shooting) Engine3 Engine4 Engine5
Figure 5.26: Light curve engine performance GPU Engine 3 vs. GPU Engine 4 vs. GPU Engine 5. The error bars are smaller than the plot symbols.
There are only slight performance improvement of the Light Curve Engine 5 over the Light Curve Engine 4. Although we use the same technique to overlap the CPU and GPU computation as in Light Curve Engine 2, the overhead in allocation and division of jobs, as well as threads creation, is too big to see a significant benefit. The ideal number of jobs in each batch is different for each light curve computation and depends on the number of ampli- fication point calculations as well as the size of the computation task for each amplification calculation. The Dynamic Light Curve Engine is best suited for high amplification caustic crossing events with orbital motion effect which are usually very expensive to compute just with the CPU.
5.4
Conclusion
In this chapter, we have discussed a hybrid method using both CPU and GPU to generate microlensing light curves with the orbital motion effect for microlensing modelling. Different parts of computations are assigned to the CPU and GPU to take advantage of their strength. We used the CPU to solve the complex polynomial equation and dynamically solve the image area while the GPU is used to perform inverse ray shooting in highly parallel fashion. We have also discussed how to further improve performance by arranging and overlapping the
computations of CPU and GPU.
Although our hybrid method provides a solution for light curve computation with the orbital motion effect, a suitable optimization technique is needed in order to successfully obtain the correct model for a microlensing event. We discuss different optimization strate- gies used in microlensing modelling in Chapter 6 as well as showcase some events that are modelled using our strategies.
Development of Modelling
Strategies and Microlensing
Event Case Studies
6.1
Introduction
The light curve computation methods discussed in Chapter 4 and Chapter 5 aim to model microlensing events by generating a theoretical light curve and matching the observed data. In microlensing event modelling, it is generally required to search in multi-dimensional pa- rameter space to successfully model an microlensing event. The magnification map genera- tion and track extraction technique in Chapter 4 allows us to search through a part of the parameter space efficiently while the dynamic light curve engine in Chapter 5 provides us with the ability to search the full parameter space accurately and effectively. A microlensing event can be modelled successfully by combining both light curve generation methods and utilizing different modelling strategies.
In this chapter, we first discuss how we use the magnification map technique and dy- namic light curve engine to model microlensing events. We also show how we use different modelling strategies and optimization techniques to acquire the potential model. Later in the chapter, we display some successfully modelled microlensing events as well as exclusion zone computation.