text:
Motorola - Not Found [DATABASE 3]
MANUFACTURE: MOTOROLA
NETWORK & MODELS SUPPORTED: Use this tool for Motorola codes "not found" via the regular motorola service such as codes from T-mobile, At&t, Orange, Cingular, etc.
Motorola Special Database 2 support these models: ATRIX, ATRIX 4G, ATRIX 2, ATRIX HD | A1200, A1200E, A1200R, A1210 | A1600, A1680, A1800, A1890, A3000, A3100, A6188, A6188+, A6288, A668, A728, A732, A760, A760i, A768, A688i, A780, A780G, A810, A840, A853, A860, A956 | AURA R1, Begonia, Defy, Defy Plus, Droid 3 | E1, E11, E2, E375, E380, E398, E6, E680, E680G, E680i, E6E, E8, EM30, EM325, EM330, EM35, EX128 | JADE | K1, K1i, K3 | L6i, L7, L800t | MB200, MB300, MB501, MB502, MB511, MB520, MB525, MB860, MB865, MB886 | ME501, ME511, ME600 | MG1, MPX, MS500W | MT710, MT716, MT720, MT810, MT917 | Nemo W | PS Tool, PZ409 | Q11, Q8, Q9H | R1 | T189, T2288 | T720, T720i, T722i | U6, U9 | V150, V171, V188, V220, V226, V235, V3, V300, V303, V303P, V360, V360i, V3688, V3i, V3RE, V3X, V3XX, V400P, V500, V501, V551, V6, V60, V600, V600i, V60i, V635, V66, V66 HK, V66 HKCS, V66 PRC, V70, V750, V8, V8 2G, V80, V8088, V9, V998++, V998c, VE538, VE66, VE66 LX, VE70, VE75, VU20 | W7 | XT610, XT701, XT702, XT711, XT720, XT800, XT800w, XT806, XT862, XT910, XT920, XT928 | Z3, Z6, Z8, Z8m, ZN200, ZN300, ZN5, ZN50
INFORMATION: You will be usually given 2 sets of codes, the code you will be using is the first code of the 2. Please take note of the space between those 2 sets of codes. If you require cheaper service, please use Motorola Worldwide (DATABASE 2).
NOTE: With all Unlocking Code orders we usually deliver a complete set of unlocking code. Most of the time you just need the Network Code (NCK) but when needed you'll also receive Unfreeze Code, Reset Key, or Service Provide Code. In the same email that includes your unlock code(s), you will also receive complete instructions on how to use it. Most of the time, you will just insert the SIM card in the phone you want to use it with and the phone will prompt you for the unlock code. And in case you need any assistance, our customer support is always there to answer any questions you might have in less than 12 Hours from Monday to Friday.
VERY IMPORTANT: If phone is reported lost/stolen/blacklisted, we can still unlock it but phone will work OUTSIDE of USA only. Be adviced that in rare occasions service/tool may expirience certain delays which we nay not have control over and orders may not be cancelled, supplier policy.
DELIVERY TIME: 1 - 3 Days, Please allow up to 4 Days.


Apparently unhappy at the Sharks, rumours have been swirling about the future of Sharks winger Valentine Holmes. Now, Fox Sports reporter James Hooper has given his opinion on the rumours linking Holmes to the Cowboys, saying that "where there's smoke, there's fire".
It's easy to join the dots and see how the rumour makes sense. Though Holmes only just signed a two-year extension early last year, he was at the time viewed as a fullback; and as a result, was paid accordingly (reports suggested his deal to be worth roughly $1.7 million over 2018/19). So, if Holmes were so unhappy as to eventually request a release, there's a good chance the Sharks would grant it, rather than continue to pay north of $800,000 per season for a winger (an excellent winger, mind you; but a winger nonetheless).
Meanwhile, Cowboys fullback Lachlan Coote is off-contract at the end of this season, and is no guarantee of staying put, having taken less than his market worth on his previous deal. Should Coote sign elsewhere, the Cowboys would likely be in the market for a fullback, and voila, Holmes might be a perfect fit.
Obviously, this is all rumour and speculation at this point, but in light of Hooper's comments (he doesn't get a lot wrong), it seems to fall into the category of "watch this space".
Nice, thanks for the info mate.
Contract ends soon. I doubt he is happy, constantly getting overlooked.


This is a Monarch Butterfly also known as a Wanderer Butterfly in Australia. This insect was in the ancient rainforests of Queensland. Unlike its American cousin which undertakes an epic multi-generational migration from Canada to Mexico the Wanderer opts for a less ambitious migration to and from the coast.
I have been relying on old photos for the last couple of weeks as My Camera is in Melbourne being repaired. I am hoping to get it back in time for the Jacaranda Tree festival in Grafton this month.


text:
New Zealand rides the China research collaboration wave
SOURCE: zhao jiankang/Shutterstock
Massey University is the first New Zealand university to join the global innovation hub in Suzhou Industrial Park.
Jul 30 | 2 minutes read |
By U2B Staff @U_2_B
@U_2_B
Fujitsu & ANU to deliver Australia's most powerful supercomputer
Could Cal State & WaiveCar create the car-sharing campus of the future?
US programme connects industry with HBCUs for better workforce diversity
As China rapidly edges the United States out of the top spot to become Australia's biggest research partner, New Zealand's Massey University is getting in on the action, striking a deal with one of China's biggest industrial committees.
The Suzhou Industrial Park (SIP) Administrative Committee was established in 1994 as a cooperative project between Beijing and the Singapore government. The partnership allows the two countries to share industrialisation experiences, making the park an innovation hub and China's number one national economic and technological development zone.
Given the success of SIP, Massey's collaboration with the committee is almost guaranteed to be a fruitful one.
Massey is the first New Zealand university to sign with the group, but it is far from the first global institution. Within the park, the Science and Education Innovation District comprises 29 universities from around the world.
China beats out US to become Australia's top research partner for first time
| Jul 30 | 2 mins read
According to a press release, the memorandum of understanding signed last week aims to strengthen the exchange of knowledge and innovation between researchers, scholars, and students from both China and New Zealand.
It seeks to provide a platform to create global scientific and research collaboration and includes plans for collaborative incubation projects, applications for third-party funding, student exchanges, entrepreneurship activities, and a scientific research institute.
"The park is a fantastic ecosystem for science and innovation," said Massey's College of Sciences Pro-Vice Chancellor Professor Ray Geor.
"With all the international universities, as well as the local universities and research institutes, it is almost unparalleled as an environment for making advancements in a variety of scientific fields. Now, going forward, Massey University can join that ecosystem."
China has become a powerhouse in recent years when it comes to university collaborations, especially in Asia Pacific.
When politics gets in the way of collaboration: The China-US dilemma
As suspicions continue to grow in much of the western world about national security risks involved in such collaborations, both New Zealand and Australia are pushing ahead with a growing number of partnerships.
A study from the Australia-China Relations Institute at the University of Technology of Sydney (UTS), released last week, determined that China will beat the United States to become Australia's biggest research partner in 2019 for the first time ever.
Researchers compared the number of research papers written and compared this with research from the UK, US, and Germany – historically, Australia's biggest collaborators. They found the rise of China in the research field to be both "rapid and dramatic," rising from almost zero in 1998 to make up 15 percent of all Australia's scientific research today.
Sydney University's China partnership marries neuroscience & artificial intelligence
Despite Beijing's issues with Washington and the Trump administration, New Zealand is taking a similar stance to Australia and seeing the inherent value in teaming up with one of the most innovative and wealthy countries on the planet.
"Scientific and technological cooperation between New Zealand and China has gained a significant amount of momentum in the last few years," said Consul of the New Zealand Consulate-General in Shanghai, Mike Roger.
"[It is] underpinned by strong political relationships at central and local government levels, as well as between tertiary institutions and industry bodies in areas of mutual interest."
Incubators Knowledge Transfer Networks
AI trends for 2021 that will grow businesses and create jobs
CU Denver, Maryland firm target employee needs with new Master's courses
| Nov 15 | 4 minutes read
DCU, TU Dublin, UL to offer free postgrad training for teachers in Ireland

redpajama_set_name: RedPajamaCommonCrawl


text:
Nathaniel Bresler 0
George Mason Amethyst Initiative
Nathaniel Bresler 0 Comments
The Amethyst Initiative aims to create an authentic and sincere dialog about the state of the drinking age in America. The "Statement" (see below) has been signed by 135 Chancellors and Presidents of some of the most esteemed universities across country including: American University, Virginia Tech, Dartmouth, Duke, University of Maryland College Park, The Ohio State University, and many others. The Statement: "STATEMENT It's time to rethink the drinking age In 1984 Congress passed the National Minimum Drinking Age Act, which imposed a penalty of 10% of a state's federal highway appropriation on any state setting its drinking age lower than 21. Twenty-four years later, our experience as college and university presidents convinces us that... Twenty-one is not working A culture of dangerous, clandestine "binge-drinking"-often conducted off-campus-has developed. Alcohol education that mandates abstinence as the only legal option has not resulted in significant constructive behavioral change among our students. Adults under 21 are deemed capable of voting, signing contracts, serving on juries and enlisting in the military, but are told they are not mature enough to have a beer. By choosing to use fake IDs, students make ethical compromises that erode respect for the law. How many times must we relearn the lessons of prohibition We call upon our elected officials: To support an informed and dispassionate public debate over the effects of the 21 year-old drinking age. To consider whether the 10% highway fund "incentive" encourages or inhibits that debate. To invite new ideas about the best ways to prepare young adults to make responsible decisions about alcohol. We pledge ourselves and our institutions to playing a vigorous, constructive role as these critical discussions unfold." By electronically signing this petition you are officially putting forward your support for a rational debate of the drinking age and asking that President Merten and the George Mason Administration do the same.
A Concerned Group of Students


There appears to have been a recent spike in the number of illegal websites claiming to be collectors for HM Revenue and Customs. These premium rate fraudsters set up sites that appear to be associated with the exchequer, or even creating replica pages of the HMRC website to take money from unwitting taxpayers.
The fake sites work by directing the public to call the premium rate numbers advertised on them which then cleverly connects them to the real HMRC helpline – charging extortionate rates for the privilege.
Many customers don't even realise they've been conned until their phone bills arrive allowing the fraudsters to get away with it. Fortunately, HMRC has stepped in.
HMRC caught on to the scam a little while ago, and they have since cracked down on these fake websites.
The Revenue reported that the specific tactics being utilised to trick customers varied from site to site, but that the maximum cost per call was an exorbitant £3.60 a minute, up to a total of £36 per call. Reports have shown that the average victim was charged around £15 for a single call to one of these lines.
Financial Secretary to the Treasury Mel Stride MP said that HMRC is "the most spoofed government brand" since criminals take advantage of the fact that virtually everyone will become involved with the taxman at some point.
In some cases, the internet fraudsters would even charge for forwarding information on to HMRC; a service that can be provided completely free of charge on the gov.uk website.
Since 2017, 105 domains used to host a range of misleading content regarding HMRC have been recovered. Analysis has shown that thanks to their swift action in dealing with the scam, they have saved the British public more than £2.4 million by having the scam sites taken down.
The most common ways that scammers managed to intercept customers was through internet searches for car tax discs, renewing of driving licenses or passports, and tax return submissions. That's why it is vitally important that you stay vigilant when dealing with tax enquiries online.
Genuine HMRC numbers start in 0300 and are usually completely free of charge or at least charged at the national landline rate. If you come across a 'HMRC' telephone number or government advice line starting with 084, 087, 090, 091 or 098, then please do not call it.
No government department would use a number starting with this to deliver a legitimate government service. So, if you come across a website claiming to be connected to HMRC with a number of this type, you should forward the information to the relevant body.
You can report misleading websites, emails, and phone numbers to either HMRC's phishing team at phishing@hmrc.gsi.gov.uk or Action Fraud.
Unsure whether the site you're on is the real deal? You can search for official government telephone numbers by searching for the relevant service on the gov.uk website, or go directly to HMRC yourself on their website or call their (real) helpline on 0300 200 3300.


text:
package com.netflix.spinnaker.clouddriver.titus.client.model;

public class TitusHealth {
    private HealthStatus healthStatus;

    public TitusHealth(HealthStatus healthStatus) {
        this.healthStatus = healthStatus;
    }

    public HealthStatus getHealthStatus() {
        return healthStatus;
    }

    public void setHealthStatus(HealthStatus healthStatus) {
        this.healthStatus = healthStatus;
    }
}

redpajama_set_name: RedPajamaGithub


Delton Childs is a web and digital media post productions specialist and consultant living and working in San Antonio.
That's one of the straight up truths of it all. Cheers!
I like the part about finding out out what upper managment's sweet spot is. What is that hot button that will help you sell your initative?


"break up with your girlfriend, i'm bored" is the final track and third official single from Ariana Grande's fifth studio album, thank u, next.
A snippet of the song was shared to tease the artwork of the album through a post on Instagram on January 23rd, 2019.
Ariana released a music video alongside the release of the album on February 8, 2019.


-print0, prints the full file name on the standard output, followed by a null character instead of the newline character.
IFS, is the "Internal Field Separator" that is used for word splitting after expansion. Here, IFS is set to null string.
-r, specifies that backslash "\" does not act as an escape character.
-d, is the delimeter. Which in this case is the null character '\0'.
$'\0', the $ prefixed single quoted string decodes the backslash escape character. In this case a null character.
, is simply there to print out the text, so you notice any spaces in the beginning and end of text.
This Sendmail error--also seen as "Transient parse error -- message queued for future delivery" or "Name server: domain: host not found"--indicates that Sendmail encountered a problem with one of its DNS resource record lookups of the destination domain.
This executes the date command via shell script and logs it to the specified file with current pid.
If you have typed in your admin password in vBulletin more than 5 times and get locked. Look at the vbulletin "strikes" table and truncate it to get back in and not have to wait for the 15 minutes lock out time.
One liner with grep to extract the IP addresses from a file.
The "-o" option prints only the matched parts.
Note: "<>" is necessary around the inode number.
Often times, there is need for web-accessible folders to be set up so all web-developers have write access.
Along with setgid option, ACL can be used so anyone in the group "web-developers"
would have write privileges to anything under web-accessible document root.
So unless the acl privileges is revoked specifically, it would just continue to work.
To enable ACL, add "acl" option to /etc/fstab file for the corresponding partition and remount.
Now anyone needing write access can be put in the "developers" group.
If you need the webserver to have write access to certain folders, then chown the location to be owned by the webserver, instead of giving write permissions to all.
The grub bootloader is particularly useful, especially when upgrading and testing new kernels. I recently found a way to modifiy the default boot config to make it useful when you wish to remotely upgrade a kernel and boot into it once only without being at the console to change the default back.


my laptop is little bit slow ,specially at start up, what to do?
The number of programs installed has no bearing on your startup time, however, what programs start when Windows starts can greatly affect startup time and overall performance. Many programs will startup in the background and some do not even have any indication that they're running, i.e., no icon in the notification area.
As mentioned in the first link above under Limit how many programs run at startup, the use of Autoruns for Windows can help in many cases. Personally, I use it on all my Windows machines.


text:
Senior Tory Calls for Higher Taxes
Aspasia Stephanou 28 June 2017 28 Jun 2017
British Conservative politician and head of government policy under David Cameron, Sir Oliver Letwin, said on the Today programme that taxes should increase to fund better public services.
Letwin called for the government to consider increasing taxes so that it will be able to fund investment for public services to help schools, social care and the NHS. He said: "It may well be, in one way or another, a large number of people will have to pay a little more tax if we are going to maintain the trend towards reduced deficits and yet spend a little more on the crucial public services that do need more spent on them." He stressed that investing in social care and not pay rises for staff should be a priority.
While the Conservatives are typically the party of low taxes, Letwin explained that taxes "raised in a careful way without provoking massive problems for families," should not only increase for the top 5% earners, as Labour pledged, but also for middle earners. Letwin added: "Those of us who are lucky enough to have higher incomes will have to bear more one way or another the costs of any increase in public service expenditure. But I'm not at all suggesting you can restrict to only dealing with whatever Mr Corbyn defines as the very rich."
Letwin said that he noticed that people had enough with austerity policies and that they were concerned about the underfunding of social services. This was the message that voters also sent in the general elections, according to him. "I talked to hundreds, around 3,000, of my electors face to face; I got the same sense from almost every colleague: people were much more concerned at this election about spending on schools, spending on health and social care – crucial public services which now seem to be under strain," Letwin commented.
Higher taxes, less austerity
Support for ending austerity has increased as the public has less tolerance for it. The British Social Attitudes (BSA) survey showed that social attitudes towards austerity and taxes have changed. Eight in 10 people said they wanted more funding for the NHS, and many others emphasised investment for schools and higher spending on the police. 48% said they wanted the government to increase spending on health, education and social benefits. The survey was conducted between June and November last year.
A Labour amendment saying that the pay cap should go, is under review and there is a possibility that the 1% cap on public sector pay increases may be lifted later this year, according to the government. Labour has claimed the move to be a victory after the amendment to the Queen's Speech about the cap to be lifted, is now under consideration by Theresa May.
Corbyn sought to put more pressure on the government, after the general mood of the population is strongly against austerity. Corbyn said: "You can't have safety and security on the cheap. It is plain to see that seven years of cuts to our emergency services has made us less safe. It's time to make a change." Conservative MPs have expressed their concerns about cutting spending in crucial areas and the lack of funding for public services. This, coupled with Theresa May's recent £1bn deal with the DUP, is creating a series of further questions about the appearance and disappearance of magical money.
Since there are many voices from both the Left and the Right that call for more spending and higher taxes, the government would have to be more open to change and radical reforms to eradicate social and economic inequalities.


Hearty breakfast served in our dinning room or in the veranda (depending on the weather).
Refrigerator, microwave, coffee maker, kettle, cellar, dishwasher.
Water, coffee, tea et tisanes to your disposal.
Possibility to cook & supermarket near by.
**Free for children under 8 years old.
***Prices are in Canadian dollars.
prices can vary according of the season.
Check-in time is between 2 pm and 9:30 pm.
Check-out time is at 11 am.
The breakfast is served between 7:30 am and 9:30 am.
Quiet time is at 10 pm.
Our B&B is a non smoking place. However, smoking is allowed outside on the back balcony.
A change in the reservation dates will be treated as a cancellation for the day or days initially reserved for which the guest will no longer be present.
There will be no cancellation fees for a cancellation before the five (5) days prior to the arrival.
100% of the cost of the reservation, taxes included, will be charged on the credit card for a cancellation within the five (5) days prior to the arrival.
The total cost of the reservation, taxes included, will be charged on the credit card if the guest does not show up.
To be valid, a cancellation request must be sent by email to the address annulation@gite-bouquetdemarguerites.ca.


text:
Q: C++ pow unusual type conversion When I directly output std::pow(10,2), I get 100 while doing (long)(pow(10,2)) gives 99. Can someone explained this please ?
cout<<pow(10,2)<<endl;
cout<<(long)(pow(10,2))<<endl;

The code is basically this in the main function.
The compiler is mingw32-g++.exe -std=c++11  using CodeBlocks
Windows 8.1 if that helps

A: Floating point numbers are approximations. Occasionally you get a number that can be exactly represented, but don't count on it. 100 should be representable, but in this case it isn't. Something injected an approximation and ruined it for everybody.
When converting from a floating  point type to an integer, the integer cannot hold any fractional values so they are unceremoniously dropped. There is no implicit rounding off, the fraction is discarded. 99.9 converts to 99. 99 with a million 9s after it is 99.
So before converting from a floating point type to an integer, round the number, then convert. Unless discarding the fraction is what you want to do.
cout, and most output routines, politely and silently round floating point values before printing, so if there is a bit of an approximation the user isn't bothered with it.
This inexactness is also why you shouldn't directly compare floating point values. X probably isn't exactly pi, but it might be close enough for your computations, so you perform the comparison with an epsilon, a fudge factor, to tell if you are close enough.
What I find amusing, and burned a lot of time trying to sort out, is would not have even seen this problem if not for using namespace std;.
(long)pow(10,2) provides the expected result of 100. (long)std::pow(10,2) does not. Some difference in the path from 10,2 to 100 taken by pow and std::pow results in slightly different results. By pulling the entire std namespace into their file, OP accidentally shot themselves in the foot.
Why is that?
Up at the top of the file we have using namespace std; this means the compiler is not just considering double pow(double, double) when looking for pow overloads, it can also call std::pow and std::pow is a nifty little template making sure that when called with datatypes other than float and double the right conversions are taking place and everything is the same type.
(long)(pow(10,2))

Does not match
double pow(double, double)

as well as it matches a template instantiation of
double std::pow(int, int)

Which, near as I can tell resolves down to
return pow(double(10), double(2));

after some template voodoo.
What the difference between
pow(double(10), double(2))

and
pow(10, 2)

with an implied conversion from int to double on the call to pow is, I do not know. Call in the language lawyers because it's something subtle.
If this is purely a rounding issue then
auto tempa = std::pow(10, 2);

should be vulnerable because tempa should be exactly what std::pow returns
cout << tempa << endl;
cout << (long) tempa << endl;

and the output should be
100
99

I get
100
100

So immediately casting the return of std::pow(10, 2) into a long is different from storing and then casting. Weird. auto tempa is not exactly what std::pow returns or there is something else going on that is too deep for me.

A: These are the std::pow overloads:
float       pow( float base, float exp );

double      pow( double base, double exp );

long double pow( long double base, long double exp );

float       pow( float base, int iexp );//(until C++11)

double      pow( double base, int iexp );//(until C++11)

long double pow( long double base, int iexp ); //(until C++11)

Promoted    pow( Arithmetic1 base, Arithmetic2 exp ); //(since C++11)

But your strange behaviour is MINGW's weirdness about double storage and how the windows run-time doesnt like it. I'm assuming windows is seeing something like 99.9999 and when that is cast to an integral type it takes the floor.
int a = 3/2; // a is = 1

mingw uses the Microsoft C run-time libraries and their implementation of printf does not support the 'long double' type. As a work-around, you could cast to 'double' and pass that to printf instead.
  Therefore, you need double double:
On the x86 architecture, most C compilers implement long double as the 80-bit extended precision type supported by x86 hardware (sometimes stored as 12 or 16 bytes to maintain data structure alignment), as specified in the C99 / C11 standards (IEC 60559 floating-point arithmetic (Annex F)). An exception is Microsoft Visual C++ for x86, which makes long double a synonym for double.[2] The Intel C++ compiler on Microsoft Windows supports extended precision, but requires the /Qlong‑double switch for long double to correspond to the hardware's extended precision format.[3]

redpajama_set_name: RedPajamaStackExchange


ATOMIC (AUS) (Brown 2008-Stud 2012). Winner at 2, MRC Chairman's S., L. Half-brother to SW Miss Bux (WATC Placid Ark S., L). Out of SP Fluffy Duck, a half-sister to SW Anatina (VRC Cap d'Antibes S., L), SW Pricked - Albatross (SAJC HC Nitschke S., L) and SP Acupuncture. Related to SW Office (AJC Surround S., Gr.2), SW Mother Duck, SW Lady's Angel, etc. Sire of 31 rnrs, 13 wnrs, inc. Costa Bomb, Celtic Blast, Archway to Heaven, The Great Artiste, He's the Bomb, I'm Explosive, Madja, Muntham Missile, Pink Pig, Atomic Knight, Dirtomic, Enyo, Gin Atomic and of the placegetters Valencia Missile, etc.
Just Got Lucky (g. by Magnus). 4 wins to 1200m, A$103,435, to 2017-18, MVRC APCO Service Stations H., 3d ATC Win $10k Cash H.
Kinetics. 11 wins from 1200m to 1600m, A$177,720, Muswellbrook Cup, 3d ATC Champagne Bar H.
Sabotage. 4 wins at 1200m to 2017-18, ARC Dunstan Rising Star Qualfier H., MVRC Drain Man Summer Sprint H., WRC Stephen Dallas Memorial H., 2d BOP RC Triton Pacific Owens P., Counties RC Fasttrack Insurance H., Hawkes Bay Kahungunu Kapa H., MVRC Ranvet Summer Sprint H., 3d Matamata RC Rich Hill Stud H.
Immigration. 3 wins at 1200m, 1400m, BOP RC Rawhiti Hort H., Rotorua RC Craig Thom Memorial H., 2d ARC Thomsons Foodservice H.
Billy 'O. 2 wins at 1200m in NZ.
San Isidro. 2 wins at 1300m, 1400m in Aust.
Copy Rites. Winner at 1200m in Aust.
MOTSPUR (Flying Spur). 12 wins-1 at 2-to 1400m, A$645,910, Scone Quality H., L, BRC Falvelon H., L, Gold Coast S., BRC Montrose Access H., Scone RC Prydes Easifeed Scone Quallty H., STC Little Bottler H., AJC Empyrean H., STC Spring Racing Carnival H., Wiltshire H., 2d AJC Lonhro Welter H., BRC Normanby Hotel Quality H., Dulux Group H., 3d Clarence River JC Ramornie H., L, Gosford RC Takeover Target S., L, STC Starlight S., L, TTC Premium S., L, 4th ATC Carrington S., L.
Erin Bee. 3 wins from 1500m to 1800m, AJC Barnsley H., Kennedy H., 2d AJC Devils Lair H., 3d STC Aspiration Quality H. Producer.
SILKY SWEEP (End Sweep). 7 wins-2 at 2-to 7f, US$325,309, Meadowlands Skip Trial S., L, 2d Belmont Sport Page H., Gr.3, Bold Ruler H., Gr.3, Woodbine Highlander H., Gr.3. Sire.
GO FOR GUINNESS (Rosberg). 6 wins at 6½f, 8½f, Hastings Park British Columbia Cup Stellar's Jay H., L, 2d Hastings Park British Columbia Cup Classic, L.
BEAU GENTLEMAN (Beau Genius). 5 wins from 5½f to 8½f, Fort Erie Benburb S., L, 2d Fort Erie Puss n Boots S., L.
CHAPEL ROYAL (Montbrook). 3 wins at 2, US$495,571, Saratoga Sanford S., Gr.2, Belmont Flash S., Gr.3, 2d Belmont Champagne S., Gr.1, Saratoga Hopeful S., Gr.1, 3d Breeders' Cup Juvenile, Gr.1, 4th Gulfstream Park Swale S., Gr.3. Sire.
LILLYCUT (Cutlass). 16 wins-2 at 2-to 6f, Suffolk Downs Topsider S., L, 2d Calder Criterium S., L.
GYPSY DIAMOND (Not a Single Doubt). 4 wins-1 at 2-from 1200m to 2000m, A$756,010, Moonee Valley Fillies Classic, Gr.2, ATC Carbine Club S., Gr.3, Japan Racing Association P., Gr.3, 2d ATC Queen of the Turf S., Gr.1, Light Fingers S., Gr.2, BRC The Phoenix S., L, 3d ATC Emancipation S., Gr.2, Liverpool City Cup, Gr.3.
GENIAL (Gate Dancer). 5 wins-1 at 2-from 1100m to 1600m, R195,235, Kenilworth Basil Starke S., Gr.3, 2d Greyville Summerveld S., Gr.3, 3d Clairwood Natal Breeders Challenge, L.
ROUGE (Privately Held). 7 wins from 1000m to 2000m in Peru, Monterrico Clasico Batalla de Ayacucho, L, Clasico Texfina.
CHEONGSU YEOGEOL (Run Away and Hide). 2 wins-1 at 2-at 1200m, 1400m to 2018 in Korea, Seoul Ttukseom Cup, L.
BENWILL (Leestown). 8 wins-1 at 2-from 5½f to 8½f, US$354,267, Louisiana Downs Unbridled S., L, Evangeline Downs John Henry S., L-twice.
THE PICKETT FACTOR (Gold Tribute). 7 wins from 6f to 9f, US$449,450, Louisiana Downs Super Derby Prelude S., L, Delta Downs Gold Cup, L.


PARTNERS IN CRIME Beekeeper ABC/Television, JamesSheldon, Dir.
ANIMAL HOUSE Stand In/Bit Player Marty Simmons Prod.,John Landis, Dir.
AMERICAN GRAFFITI Bit Player THX Productions, GeorgeLucas, Dir.
THE SAND BOX Peter Eugene Comm. Theatre, H. Robinson,Dir.
For additional information contact us directly at (415)788-8761, or you may e-mail us.


The month in the Under Two's Units, we have been learning about nature in the world around us, and the children have particularly showed an interest in plants and flowers. The children have showed interest in learning how plants and flowers grow, and have been using the watering cans to hydrate the flowers and plants in the nature garden area. To tie in with this current interest, we have been including plants and flowers into our messy and creative play. The favourite activity seems to have been gloop play with real flowers and plants for the children to explore.
This month we have been getting busy in the nature garden, helping all the plants grow. The children have been learning about what plants need to grow, and we have seen that the warm and sunny days, the plants have needed lots of water to drink. We have also had the odd rainy day, where we have had splashingly good fun jumping in the puddles. The new weighing scales in our construction area have been great fun to experiment with, as we have been finding out what items are heavier and lighter.
Over the past term we have been learning all about dinosaurs. We have been exploring the shapes and textures and how fossils are formed, and we have also been creating volcanoes using sand, vinegar and bicarbonate of soda to make fizzy eruptions. Some other creative activities have included a recent interest in Trolls, where we used different paper types to create some funky hair styles.
As Sun Safe champions, we have been practising staying safe in the sun, and why it is so important to we look after ourselves in the warmer weather. We have done a great job at checking if our friends have remembered the sun cream and sun hats during outdoor play.


It's no secret that I'm a sucker for debut novels; I also really enjoy novels that are organized in vignettes, a style that is not often utilized but, when done well, can be very pleasing. When I heard that Laura & Emma had been recommended to fans of Gilmore Girls and Ladybird, and is set in the 1980s and 90s, I couldn't resist!
In 1981, and in her early 30s, Laura discovers that a rare sexual encounter has left her with child; she considers abortion, decides against it, and readers are introduced to Emma. Laura's parents are supportive, though surprised, and go to great measures to ensure that Laura is able to adequately provide for this new member of their family.
While this story could have taken a more serious turn, it does not; in fact, it's quite hilarious. Laura is rather quirky (think The Rosie Project or Eleanor Oliphant is Completely Fine), but not damaged; the cast of characters around her provide a heartwarming supporting cast and this is where I find the most appropriate comparison to Gilmore Girls.
Laura's mother, Bibs, is a big supporter of the local private academy Laura attended, The Winthrop School, and pushes for Emma's enrollment; everything there is referred to as "the Winthrop way." While Laura is not hesitant to enjoy the benefits of her family's financial success, she never takes advantage or does anything extreme; she is always very practical and Greathead uses this trait as a tool to develop Emma into the independent young woman she becomes, throughout the novel.
I'll admit that Laura & Emma is a little tough for me to describe; however, I thoroughly enjoyed this novel! I read it quickly, eager to hear more and learn what would happen to both of these beautifully-written, unique characters; Greathead definitely has a talent for authentic, relatable storytelling and I hope this debut receives all of the attention it deserves.


text:
\section{Introduction}\label{introduction}
\footnotetext[1]{Research undertaken as part of the Commonwealth Cosmology
Initiative (CCI: www.thecci.org), an international collaboration
supported by the Australian Research Council.}
Since the identification of the first multiply-imaged quasar \citep{walsh}, gravitational lensing
has been used to probe the distribution of matter on many astrophysical scales, such as planets
\citep{gaudi},
individual galaxies \citep[e.g.][]{2008MNRAS.390...39B,2008MNRAS.388..384D}, clusters
\citep[e.g.][]{2008ApJ...687...39D,2008ApJ...674..711S}, and large-scale structure
\citep[e.g.][]{2008MNRAS.390..149K,2009ApJ...691..547W}.
Soon after the discovery of the first gravitational lens, it was realised that individual stars within a lensing
galaxy would themselves act as lenses
\citep{1979Natur.282..561C}, and while the separation of the resulting images would be too
small to be resolved, this microlensing can significantly magnify the background source.
Furthermore, given the density of compact objects within galaxies (such as
stars and possible dark matter), it was clear that many objects will influence the path of a beam of light
as it traverses a galaxy, and beyond considering only a couple of lensing masses, the study
of microlensing becomes analytically intractable and must be tackled numerically
\citep{1981ApJ...244..756Y,1986ApJ...301..503P}.

The first observations of microlensing were made in 1989 \citep{corrigan, irwin}, in  2237+0305,
a distant quasar (z = 1.695) lensed into four images by a nearby spiral galaxy \citep{huchra}; it
has been photometrically monitored for two decades \citep{2006AcA....56..293U},
revealing exquisite light curves for each of the images, clearly revealing the
presence of gravitational microlensing. Furthermore, the number of potentially
microlensed quasars has steadily increased \citep{Eigenbrod, Gunn, Myers, Reimers, Turner, Vanderriest} and hence an efficient means of
theoretically understanding gravitational microlensing is required.

\section{Microlensing Ray-Tracing}

\subsection{Mathematical Framework}
This paper does not intend to derive the basic gravitational lensing equations,
the reader is directed towards the excellent textbook by \citet{1992grle.book.....S}  and thesis
by  \citet{wambsganss thesis}.
For microlensing calculations a normalized lens equation in the following form is used to
map the ray from the observer, through the lens, and into the source:
\begin{equation}
\vec{y} =
\left( \begin{array}{ccc}
1 - \gamma & 0 \\
0 & 1 + \gamma  \end{array} \right)\vec{x} - {\sigma}_c\vec{x} - \sum_{i=1}^{N_*}
\frac{m_i(\vec{x}-\vec{x_i})}{(\vec{x}-\vec{x_i})\textsuperscript{2}}.
\label{microlenseqn}
\end{equation}
Here, {$\vec{x}$} and {$\vec{y}$} are the location of a light ray in the lens and source plane respectively, {$\vec{x_i}$} and {$m_i$} are the mass and co-ordinates of the \emph{i}th microlensing star. For the remaining terms in this expression, $\sigma_c$
represents the local density of smooth matter in the galaxy, whereas $\gamma$, known as the shear, encapsulates the
large scale asymmetry in the galaxy mass distribution.  The surface density of  compact objects (assumed to be uniform),
is also used in modelling and simulations and is given by $\sigma_s$. The distance scale used
 in lensing
is the Einstein Radius (ER), the radius of a ring produced by lensing of a source that is directly
behind a point lens in a line from lens to observer. Einstein Radii are used to refer to the extent of observed images on the sky, and are derived from the mass of the lens and
the distances to the lens and source.

\begin{figure}[htp]
\centering
\includegraphics[height=58mm,width=58mm]{sim_caustics.eps}
\caption{An example of a gravitational microlensing magnification map generated via inverse
ray tracing. The lens consists of 435 stars each of 1 solar mass (M$_{\odot}$), randomly distributed, with mass parameters $\sigma_s$ = 0.39, $\gamma$ = 0.10. The viewing window
is 8 ER in width.
Light shading  corresponds to regions of high magnification, whereas
darker regions represent demagnification.}\label{star_sims}
\end{figure}

\subsection{Numerical Approach}
Clearly, Eqn~\ref{microlenseqn} represents a mapping from a source location, $\vec{y}$, to a number of image (or observed)
positions $\vec{x}$. However, it is apparent that this mapping is one-to-many, with a single source resulting in a number
of images (dependent upon the number of microlensing masses $N_*$). However, reversing the mapping from
the image plane back to the source is one-to-one and hence an ``inverse ray-tracing'' mechanism \citep{glassner} is typically employed in the
study of microlensing. With this, the observer sends out a large number of rays into the image plane. For each ray, the deflection
angle is calculated through Eqn~\ref{microlenseqn} and the ray is mapped into the source plane and collected on
a grid. After all the rays are followed, the density of rays in the  binned-up map of their source  positions is directly
proportional to the magnification of a source at that location; Fig~\ref{star_sims} presents an example of
such a map, where light regions correspond to a high density of collected rays (i.e. strong magnification)
whereas dark regions correspond to the opposite situation.

\begin{figure}[htp]
\centering
\subfigure[100\% = 1\ M{$_\odot$}, number of stars = 30496]{
\includegraphics[height=58mm]{map1.eps}}
\subfigure[98\% = 0.01 M{$_\odot$}, number of stars = 2989306]{
\includegraphics[height=58mm]{map2.eps}}
\subfigure[98\% = 0.001 M{$_\odot$}, number of stars = 29887581]{
\includegraphics[height=58mm]{map3.eps}}
\subfigure[98\% = Smooth, number of stars = 609]{
\includegraphics[height=58mm]{map4.eps}}
\caption{Magnification maps from simulations of bi-modal mass distributions.
A total mass of 30496 $M_{\odot}$ is distributed in a circular lens plane of diameter 500 ER, with a viewing window of 20 $\times$ 20 ER. All simulations use
$\gamma$ = 0.4250, with (a), (b) and (c) having $\sigma_s$ = 0.4750, $\sigma_c$ = 0 and (d) having $\sigma_s$ = 0.0095, $\sigma_c$ = 0.4655, so the total mass is the same in all.  The first simulation (a) is a single-mass distribution of stellar masses, then in (b) and (c) some of the stellar mass is replaced with smaller compact objects, then in (d) that mass is replaced with smooth matter.
}\label{mag_maps}
\end{figure}

A deeper examination of Eqn~\ref{microlenseqn} reveals that the computationally intensive aspect of
undertaking such ray tracing is the sum over the microlensing masses when calculating the deflection angles; in
typical simulations, there could be $10^5\rightarrow10^6$ masses, with the tracing of $\sim10^{11}$rays
required to achieve sufficient density in the source plane. Following the seminal work by
\citep{1986A&A...166...36K},  \citet{wambsganss_comp} implemented an inverse ray-tracing approach which
has become the ``industry standard'', utilizing a tree-algorithm to ease the sum over the microlensing
deflection angles. The advent of this approach has allowed the analysis of the magnification patterns of
microlensed quasars \citep{1992ApJ...386...19W}, the structure of quasar broad line emission regions
\citep{keeton, lewis4}, chromatic effects in microlensing \citep{1991AJ....102..864W}, the nature of dark matter in lensing galaxies \citep{lewis1, pooley, schechter1}, and the effect of source size on microlensing \citep{bate, mortonson}, among others.

\section{New Physical Challenges}\label{challenge}
Several quasar systems appear to possess anomalous flux ratios \citep{Blackburne, Eigenbrod, Ota, Pooley2006}, meaning that the observed image
brightnesses differ significantly from predictions drawn from gravitational lens models possessing
mass distributions that are smooth on galactic scales. Two key hypotheses have been put forward to
explain these observations; either these anomalous ratios are due to millilensing by $\sim 10^6 {\rm
M_\odot}$ clumps of dark matter in the halo of the lensing galaxy \citep{Chiba, Dalal, Metcalf, Mao}, or the quasars are microlensed
by stars embedded in an overall smooth dark matter distribution \citep{witt}. The former proposal is
attractive as it may provide the first direct measurement of the missing substructure expected
from galactic build-up in cold dark matter formation scenarios. The latter proposal is also important,
potentially probing the fundamental nature of dark matter, as will be explained below.

The original proposal by \citet{witt} considered a smooth dark matter component which actually suppresses
the image flux for long periods, leading to the apparently anomalous flux ratios. However,
\citet{schechter1} questioned this  hypothesis, suggesting that the dark matter could in fact
be composed of substellar compact objects, and that the existence of such a compact
component could imprint itself on the resulting gravitational lens statistics.
In studying the microlensing hypothesis, a number of of numerical simulations were undertaken
by \citet{schechter1} using the backwards ray shooting approach, and Figure \ref{mag_maps} illustrates
several examples of the parameters employed. Figure \ref{mag_maps}(a) simulates a galaxy of a few
 thousand stars all of one solar mass (M{$_\odot$}), with $\sigma_s$ = 0.475 and $\gamma$ = 0.425.
Figures \ref{mag_maps}(b) and (c) use the same parameters but two different masses
for $\sigma_s$: 2\% of the mass is in stars of mass M{$_\odot$}, and the rest is contained in
small compact objects, 0.01M{$_\odot$} in  (b)  and 0.001M{$_\odot$} objects in  (c).
The final panel, Figure \ref{mag_maps}(d), presents the case of a smooth dark matter component
($\sigma_s$ = 0.0095, $\sigma_c$ = 0.4655, $\gamma$ = 0.425); as shown in \citep{lewis1},
when the mass of the compact dark matter component is made smaller, the general scale of caustic
structure is reduced, although large scale caustic features, due to the presence of the solar mass
stars in the simulations, remain. In comparing the lower two panels in Figure~\ref{mag_maps}, the
large scale caustic structure is the same in the small compact and smooth dark matter cases, but the
smaller scale structure is quite different (in fact, it is non-existent in the smooth matter case).
\citet{lewis1} went on to show that, even though the large scale caustic structure is similar,
the presence of the small scale caustics imprints itself on the statistical properties of the microlensing,
with the lower panels possessing quite different magnification probability distributions. However,
convolving these maps with a finite source radius washes out the small scale caustic structure,
and for large enough sources the convolved compact mass and smooth mass magnification
maps become statistically indistinguishable. This implies that there is a source scale size below
which any compact matter component would appear as compact, and above which it would appear
smooth, and hence observations of such systems at differing wavelengths (corresponding to differing
source sizes) would probe the fundamental properties of dark matter.

However, the simulations undertaken to date have been limited by the computational power and
memory of available computers; anomalous flux quasars are those that typically have been strongly
magnified, requiring ray shooting through a large area to be statistically meaningful. Furthermore,
these limitations place constraints on the number of dark matter lenses that can be considered,
effectively placing a limit on the mass scale that can be simulated  - around 10\textsuperscript{7}
objects of mass 0.001 M${\odot}$. Hence, it was decided that
a supercomputer implementation of the ray-shooting approach was required to tackle these
physically interesting regimes.

\section{A Supercomputing Approach}
The  numerical ray-shooting approach employs several approximations that have little impact on the accuracy but allow a significant improvement in performance.
An examination of Equation~\ref{microlenseqn}
reveals that a $r^{-1}$ calculation is required for each lensing mass,  the total deflection
requiring a sum over all of these individual masses; of course, the calculation of the distance, $r$, involves the square roots, significantly adding to the computational load. The ray-tracing approach
as adopted by \citet{wambsganss_comp} reduces this load by use of a multipole expansion of the
gravitational interaction for lensing masses far from the passage of the ray through the field of
masses. For this, a cell tree is constructed by subdividing the distribution of lensing masses,
with a constant regular subdivision until each cell holds a maximum of a single lensing mass.
An opening angle criteria is then applied to distinguish between employing nearby masses
as individual lenses, whereas more distant lens masses are grouped and a multipole expansion of their
distribution is used to approximate their gravitational influences.

The use of the cell-tree substantially improves simulation run-time but substantially increases the amount of data required to run a simulation. All data is held in computer memory, and consists of:
\begin{itemize}
\item A 2-D array for the pixel map.
\item An array of ``stars'',  each element containing the mass and location of a star in the galaxy.
We will use the term ``stars'' to refer to all objects constituting  the lens.
\item An array for the cell tree, each element containing  information about a cell and its location within the tree.
\end{itemize}

A typical simulation on a desktop computer may contain a pixel array of 2000{$\times$}2000 pixels and
of order
a million stars. This corresponds to 15 Mb for the pixel array, 38 Mb for the stars array, and 89Mb for the cell tree. The rays have no data existence; the result of shooting a ray is a pixel hit which is added to that pixel's hit count. In the following, we outline the basic operation of the standard microlensing approach
and the changes required to employ it in a supercomputer environment, successfully handling the
significant computational and storage requirements to push the application of microlensing into
a new scientific regime (see Section~\ref{results}).

The starting point is to understand the operation of the standard ray shooting approach of
\citet{wambsganss_comp}; this is expressed in the following
 pseudo-code\begin{quote}
// {\bf Setup phase}

Generate the stars, using a random distribution of locations and masses, within certain parameters

Sort the stars by encoding indexes

Generate the cell tree from the stars

Sort the cell tree by encoding indexes

// {\bf Shooting phase}

Loop
	\begin{quote}
	Shoot a ray\\
	Increment the pixel hit array where necessary\\
	Move to a new location in the lens plane
	\end{quote}
Until the whole lens plane has been covered
\end{quote}
The sorting operations of the stars and cell tree are required because during the shooting of the rays, searches are performed to determine the break between the employment of individual masses and
expanded cells that are to be used for a particular ray, with the configuration changing as we
consider rays traversing differing locations in the field of stars.

As noted in Section~\ref{challenge}, we wish to increase the number of stars under consideration.
Immediately, this significantly impacts the undertaking of microlensing simulations by desktop
computers (which are limited by virtual memory to  $\sim 20$ million stars),
increasing the storage required for the masses and locations, as well as the tree structure.
Furthermore, we additionally require an increase of the number of rays fired; as can be seen in
Figure~\ref{mag_maps}, the inclusion of small masses induces small scale structure in the magnification map, and
to fully resolve this it is essential to increase the number of pixels covering the source, and the
number of rays traced, to ensure we are not limited by counting statistics in the final map.
In moving to a supercomputer environment, the following changes are required:
\begin{itemize}
\item Adapt the  algorithmic approach of \citet{wambsganss_comp}.
\item Parallelize the approach so it can exploit current multiprocessor computers; ray tracing is inherently parallelizable, as the rays are usually independent of each other. There are typically billions of rays in a microlensing simulation, which can be distributed in some appropriate way across many processors and shot concurrently.
\item Increase the number of stars that can be considered, into the billions. This is an increase of a hundred-fold, and it is unlikely the data can be held in RAM with any reasonable architecture. Other strategies will be required to store the massive amounts of data that will be used.
\item Change to an object-oriented paradigm; the approach of \citet{wambsganss_comp} was originally implemented in Fortran 77 with procedural code and global data. It was decided that the supercomputer implementation would employ  C++ as some objects such as the stars and cells naturally lend themselves to implementation as C++ class objects. Re-implementing in C++ will provide a sound basis for future work.
\end{itemize}
As the reimplementation in C++ is a design and development process we will  describe it only briefly here.
Data elements, such as stars and cells, were identified and reimplemented as C++ class types.  The Fortran lensing algorithms were rewritten in C++ and combined with the C++ classes,
producing a working program. The arrays that store the stars and cells were replaced with
a C++ module that implements arrays as disk files (described later),  but with a similar interface. Then the implementation
was  parallelized
 by sharing out the generation of stars, and the ray-shooting, to different processors (this is described later).

The rest of the paper focuses on the strategies used to parallelize our approach and increase the size of lenses
available for
 microlensing research.

\subsubsection{Parallelizing the ray shooting}
For the supercomputer implementation,
the rays that are shot need to be distributed across the available processors. There are many ways of parallelizing ray-tracing \citep{amri,lee,verdu} but little experience with this in gravitational lensing simulations. It does not matter which ray is executed on which processor, or in what order, as they are completely independent.
We consider only static assignment of rays to processors, as dynamic assignment for load-balancing purposes is much more complicated and static assignment should be tried first. Dynamic load balancing is a model where job tasks (in this case rays)
are assigned to processors at run-time based on the load on each processor as the simulation proceeds - idle processors get the
next jobs, much like a multiprocessor operating system running user programs. Much more time and effort
is required to implement dynamic load balancing
compared to static load balancing. Static load balancing means that when the program runs, some algorithm
at startup determines which ray is assigned to which process, and that is fixed for the duration of the simulation.

 Therefore we are looking for a mapping
\begin{equation}
Assign(Ray) \mapsto Processor
\end{equation}
 which maps rays to processors for that run. There is a value for \emph{Assign} which is optimal for a particular simulation, but it is unknown, so some heuristic is required. Mapping an equal number of rays to each processor is sufficient if there are many more rays than processors and each ray takes the same time. The latter is probably not going to be the case since the stars in the lens may not be not distributed evenly, and rays close to a lot of mass will take longer to process. We have adopted an interlaced ray distribution model: take a 2-D element \emph{dA} of the lens plane and distribute the rays in that element across all processors, and do the same for all other elements. This means that every processor simulates lensing over the entire lens plane, but only some rays at each point of the lens plane. We hope that this will even out the load without the need for
  load balancing.

To implement parallelization  we could employ either a multithreading or multiprocess model. Multiprocessing means that several parallel processes are created by the computer operating system and they must access shared data  outside the program,
for example on disk. In multithreading there is only a single process with parallel threads of execution running inside it, and all global data in
the program is automatically shared between threads. Multithreading is
usually more efficient but also more error-prone in development, so for a first
implementation we opted for multiprocessing.

 In the setup phase the generation of the stars can be parallelized by distributing the load evenly across all processes.  The generation of the cells from the stars is a sequential process based on sophisticated location and tree indexing which cannot be easily parallelized. The sorting steps could be parallelized but have not been; this will be discussed in the next section.
The shooting phase can be distributed across all processors.

\subsection{Increasing the data storage}
Pushing into the regime of $\sim$billion stars in a lens requires a stars array and cell
tree of order 200GB; the following are possible ways of storing this data:
\begin{enumerate}
\item On a 64-bit computer with 200Gb RAM it could be stored in memory as it previously has been.
\item If simulations are to be run on many computers at the same time, and the computers collectively have enough memory, distribute the data in the memory of those machines.
\item Put the data in files on a shared disk, not in RAM.
\end{enumerate}
Option 1 is possible and requires no modification of the data storage, although
clearly requires a particular computer architecture not available in typical (i.e. beowulf) clusters.
Option 2 is  possible if enough machines are used with enough RAM; then data could be spread amongst them and fetched across the network. Option 3 can be used anywhere there is sufficient disk space, even on desktop computers. In our new implementation all three options were combined, as huge amounts of disk space are now common (more than large RAM machines), the simulation data is placed on disk, but partially cached in memory so that all the available RAM is used.

The stars array  and cell tree were each replaced with a binary  file, but still accessed like arrays, so that any object at any part of the file could be requested with an index. Naturally this means that file I/O will dramatically slow down the simulation, although it is envisaged that caching strategies and parallelizing the ray-shooting may compensate for this.
Since shared files are trivial on modern networks,  multiple processes can read data from a single set of shared files. When starting a simulation,  several processes can create the files and the others wait until they  are ready, or,  each process can generate its own version of the files, which is very wasteful of disk space but means some processes may be able to start earlier.

\subsection{Sorting with files}
The sorting of stars and cells is inherent in the algorithms in the set-up phase that code the stars and cells for indexing and searching; it cannot be avoided without significant redesign of the cell tree usage. In the original implementation where data is in RAM, a heap-sort algorithm is used \citep{knuth}. A heap sort swaps elements from the end of an array to the beginning, gradually
building a sorted array in place of the original values. When the stars and cell tree were placed in files the sorting steps became extremely slow - as expected. A run of one billion stars would take an intolerably long time and be unworkable. In fact, when the data was initially placed in files and a simulation of one billion attempted, the sort was still running after two days and we gave up on it.

The best way to process files is sequentially, and best way to sort files is with a merge sort \citep{knuth}. We implemented a folding merge-sort algorithm for the sorting steps. In the original implementation the stars and cell tree were sorted after they were generated; a folding merge-sort does the sorting \emph{while} the data is generated.  The algorithm is as follows; as stars are generated they are placed in a memory cache. When the cache is full, it is sorted using a heap-sort and written to the stars file. This is the first instance of the file. Further stars are generated, and  placed in the cache. When the cache is full it is heap-sorted and then merge-sorted into the file, producing a new instance of the file. The process continues until all stars are in the file, and the file is always sorted. The same process is done for the cell tree.

This mechanism substantially improved the run-time of the sorting phases. There are however disadvantages:
\begin{itemize}
\item The space required for a merge-sort is double the data size, due  to the fact that a new version of the file is being created as the existing one is being read
\item As the file gets bigger the merge gets slower
\end{itemize}
Nevertheless this method has provided us with a usable implementation.

\subsection{Shooting cache}
The memory cache used for merge-sorting is only required during the setup phase; after that the memory is available for shooting. As rays are shot, a per-ray stars and cell configuration is used to calculate the deflection, and analysis of the usage patterns in the sequential version showed that around 66\% of stars and cells used for one ray are used again for the next, as the rays are close together in space (assuming a large number of them).

Based on this information we implemented a shooting memory cache that allows re-use of stars and cells, from one ray to the next. Unfortunately this scheme interacts with the interlaced ray distribution scheme, in that the scheme means  each process is executing rays that are slightly further apart on the lens plane than they normally would be.  This degrades the performance of the shooting cache slightly.

\subsection{File cache}
The amount of memory needed for the stars/cell configuration for a ray is not much (a few Mb), leaving plenty of RAM free. This RAM could be used as a more general memory cache for storing some stars and cells that are otherwise on disk, making
them faster to access. Implementing a general  cache of file data requires an analysis of the usage patterns of the stars and cell data files, and at a first-order approximation there are two patterns operating: depth first traversals  of the cell tree and binary searches in both the stars and cell arrays. A depth
first traversal will follow a single branch of the cell tree from the root down
to  a "leaf", traversing the file in a sequential fashion; a binary search
will jump around from one end of the file to the other. These conflict, and make it difficult to generate heuristics for anticipating what portions of the files to load into memory, so we have chosen a simple scheme to begin with: cache the first  levels of the cell tree and the first records of the stars file, as many as possible. The root of the cell tree is heavily accessed and caching it proved useful.

\section{Results}\label{results}
We discuss the performance of our new method and then give some preliminary results of its application to microlensing.

\subsection{Performance}
The following performance statistics were obtained from simulations using 10\textsuperscript{7} stars with a pixel map of 2000x2000. The number of rays to shoot are based on these and other parameters, in this case it is 1.3x10\textsuperscript{9}. The performance  depends greatly on the amount of RAM available for caching. For the test runs reported here, we fixed the size of the cache per parallel process to be about 1/8th the size of the stars data, because this is the ratio for a simulation of 10\textsuperscript{9} stars run on a common 32-bit desktop machine, something we may consider as a ``standard'' for comparisons.

\begin{table}
\centering
\begin{tabular}{ | l | c | c | c | c |}
\hline
& {\bf Version} & {\bf Total} & {\bf Shooting} & {\bf Setup} \\
& & {\bf time}  & {\bf time} & {\bf time}  \\
\hline
{\bf Fortran} &   v1 & 5.64  &      5.57  &    0.06    \\
\hline
{\bf Fortran, optimized} & v2 &   1.98    &    1.93   &   0.05    \\
\hline
{\bf C++, Fortran copy} & v3 & 5.38   &     5.34   &   0.04 \\
\hline
{\bf C++, copy, optimized} & v4 & 2.15    &    2.12   &   0.03  \\
\hline
{\bf C++, data in files,} & v5 & 20.93   &    19.72   &   1.21      \\
{\bf no caches} & & & & \\
\hline
{\bf C++, add merge-sorts} & v6 &  4.20   &     4.01   &   0.18        \\
{\bf and file caches} & & & & \\
\hline
\end{tabular}
\caption{Run times (hours) for different versions of the new approach, single process}
\label{program times}
\end{table}

Table \ref{program times} shows run-times for different versions of the new tool, beginning with the original Fortran (v1) and progressing through some C++ versions to the final version (v6). All times are in hours.
The first C++ version that was generated (v3, v4)  was a straight copy of the Fortran (v1, v2). The run-times for both languages are similar. Of note is the fact that both  run  2.5-2.8 times faster when full compiler optimizations are used, due to the algorithms being computationally intensive and these versions having no I/O operations.
The C++ is slightly computationally faster when unoptimized, the Fortran slightly faster when optimized, but they are close, so we have not lost much in the move to C++. The same compilers (GNU C++ and GNU Fortran 95 from FSF\footnote{Free Software Foundation, Inc.
    51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA}) were used
for both languages, but since there are overheads in C++ due to the use of object-oriented classes, it
is not surprising that C++ is slightly slower in the best-case scenario. We have not investigated
the relative performance when both are unoptimized. Different compilers with
different optimization strategies can always produce a faster (or slower) program, so our comparisons do not
constitute a formal benchmarch, merely the performance for commonly-used compilers (i.e GNU). Further investigation can be made in the future to determine the compiler that is best suited for this program.

After taking the arrays out of memory and placing them on disk the performance, as expected,  degrades considerably (v5).  The run is 10 times slower. Although the stars and cells are generated in a sequential fashion, they are then heap-sorted, which is very inefficient inside files. Using the folding merge-sort (v6) avoids inefficiencies because it scans and merges file sections sequentially. In v5 when shooting begins there is no file caching; star data and cell data is loaded from all over the files, and the I/O and spread-out file access makes shooting very slow. In v6 the shooting cache and file cache are implemented and they improve performance time by reducing the access to the star and cell data files. The techniques used to improve performance in the files version (v6) bring the run-time down so that is is comparable to the unoptimized in-memory version  - a good result.

\subsubsection{Parallel speed-up}
Versions 4 and 6 are able to run in parallel mode, dividing work between processes. Version 4 maintains data in memory and is can be used when the number of stars is up to 10\textsuperscript{7}; version 6 uses files and must be used for simulations of more than 10\textsuperscript{7} stars.

Figure \ref{speedup} shows the speedup obtained for these versions using the new method.
Version 4 (solid line) uses parallelism during ray-shooting. It achieves a perfect speedup during ray shooting, showing that all the theoretical parallelism that is available can be extracted in practice by the right implementation and in the right circumstances: i.e. each ray is completely independent of the others, there are far many more rays than processes,  our simple ray distribution scheme is achieving a good load balance, and the data is in memory and can be accessed concurrently.

\begin{figure}
\centering
\begingroup%
  \makeatletter%
  \newcommand{\GNUPLOTspecial}{%
    \@sanitize\catcode`\%=14\relax\special}%
  \setlength{\unitlength}{0.1bp}%
\begin{picture}(3600,2160)(0,0)%
{\GNUPLOTspecial{"
/gnudict 256 dict def
gnudict begin
/Color false def
/Solid false def
/gnulinewidth 5.000 def
/userlinewidth gnulinewidth def
/vshift -33 def
/dl {10.0 mul} def
/hpt_ 31.5 def
/vpt_ 31.5 def
/hpt hpt_ def
/vpt vpt_ def
/Rounded false def
/M {moveto} bind def
/L {lineto} bind def
/R {rmoveto} bind def
/V {rlineto} bind def
/N {newpath moveto} bind def
/C {setrgbcolor} bind def
/f {rlineto fill} bind def
/vpt2 vpt 2 mul def
/hpt2 hpt 2 mul def
/Lshow { currentpoint stroke M
  0 vshift R show } def
/Rshow { currentpoint stroke M
  dup stringwidth pop neg vshift R show } def
/Cshow { currentpoint stroke M
  dup stringwidth pop -2 div vshift R show } def
/UP { dup vpt_ mul /vpt exch def hpt_ mul /hpt exch def
  /hpt2 hpt 2 mul def /vpt2 vpt 2 mul def } def
/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }
 {pop pop pop 0 setgray Solid {pop []} if 0 setdash} ifelse } def
/BL { stroke userlinewidth 2 mul setlinewidth
      Rounded { 1 setlinejoin 1 setlinecap } if } def
/AL { stroke userlinewidth 2 div setlinewidth
      Rounded { 1 setlinejoin 1 setlinecap } if } def
/UL { dup gnulinewidth mul /userlinewidth exch def
      dup 1 lt {pop 1} if 10 mul /udl exch def } def
/PL { stroke userlinewidth setlinewidth
      Rounded { 1 setlinejoin 1 setlinecap } if } def
/LTw { PL [] 1 setgray } def
/LTb { BL [] 0 0 0 DL } def
/LTa { AL [1 udl mul 2 udl mul] 0 setdash 0 0 0 setrgbcolor } def
/LT0 { PL [] 1 0 0 DL } def
/LT1 { PL [4 dl 2 dl] 0 1 0 DL } def
/LT2 { PL [2 dl 3 dl] 0 0 1 DL } def
/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def
/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def
/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def
/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def
/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def
/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def
/Pnt { stroke [] 0 setdash
   gsave 1 setlinecap M 0 0 V stroke grestore } def
/Dia { stroke [] 0 setdash 2 copy vpt add M
  hpt neg vpt neg V hpt vpt neg V
  hpt vpt V hpt neg vpt V closepath stroke
  Pnt } def
/Pls { stroke [] 0 setdash vpt sub M 0 vpt2 V
  currentpoint stroke M
  hpt neg vpt neg R hpt2 0 V stroke
  } def
/Box { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M
  0 vpt2 neg V hpt2 0 V 0 vpt2 V
  hpt2 neg 0 V closepath stroke
  Pnt } def
/Crs { stroke [] 0 setdash exch hpt sub exch vpt add M
  hpt2 vpt2 neg V currentpoint stroke M
  hpt2 neg 0 R hpt2 vpt2 V stroke } def
/TriU { stroke [] 0 setdash 2 copy vpt 1.12 mul add M
  hpt neg vpt -1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt 1.62 mul V closepath stroke
  Pnt  } def
/Star { 2 copy Pls Crs } def
/BoxF { stroke [] 0 setdash exch hpt sub exch vpt add M
  0 vpt2 neg V  hpt2 0 V  0 vpt2 V
  hpt2 neg 0 V  closepath fill } def
/TriUF { stroke [] 0 setdash vpt 1.12 mul add M
  hpt neg vpt -1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt 1.62 mul V closepath fill } def
/TriD { stroke [] 0 setdash 2 copy vpt 1.12 mul sub M
  hpt neg vpt 1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt -1.62 mul V closepath stroke
  Pnt  } def
/TriDF { stroke [] 0 setdash vpt 1.12 mul sub M
  hpt neg vpt 1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt -1.62 mul V closepath fill} def
/DiaF { stroke [] 0 setdash vpt add M
  hpt neg vpt neg V hpt vpt neg V
  hpt vpt V hpt neg vpt V closepath fill } def
/Pent { stroke [] 0 setdash 2 copy gsave
  translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  closepath stroke grestore Pnt } def
/PentF { stroke [] 0 setdash gsave
  translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  closepath fill grestore } def
/Circle { stroke [] 0 setdash 2 copy
  hpt 0 360 arc stroke Pnt } def
/CircleF { stroke [] 0 setdash hpt 0 360 arc fill } def
/C0 { BL [] 0 setdash 2 copy moveto vpt 90 450  arc } bind def
/C1 { BL [] 0 setdash 2 copy        moveto
       2 copy  vpt 0 90 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C2 { BL [] 0 setdash 2 copy moveto
       2 copy  vpt 90 180 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C3 { BL [] 0 setdash 2 copy moveto
       2 copy  vpt 0 180 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C4 { BL [] 0 setdash 2 copy moveto
       2 copy  vpt 180 270 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C5 { BL [] 0 setdash 2 copy moveto
       2 copy  vpt 0 90 arc
       2 copy moveto
       2 copy  vpt 180 270 arc closepath fill
               vpt 0 360 arc } bind def
/C6 { BL [] 0 setdash 2 copy moveto
      2 copy  vpt 90 270 arc closepath fill
              vpt 0 360 arc closepath } bind def
/C7 { BL [] 0 setdash 2 copy moveto
      2 copy  vpt 0 270 arc closepath fill
              vpt 0 360 arc closepath } bind def
/C8 { BL [] 0 setdash 2 copy moveto
      2 copy vpt 270 360 arc closepath fill
              vpt 0 360 arc closepath } bind def
/C9 { BL [] 0 setdash 2 copy moveto
      2 copy  vpt 270 450 arc closepath fill
              vpt 0 360 arc closepath } bind def
/C10 { BL [] 0 setdash 2 copy 2 copy moveto vpt 270 360 arc closepath fill
       2 copy moveto
       2 copy vpt 90 180 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C11 { BL [] 0 setdash 2 copy moveto
       2 copy  vpt 0 180 arc closepath fill
       2 copy moveto
       2 copy  vpt 270 360 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C12 { BL [] 0 setdash 2 copy moveto
       2 copy  vpt 180 360 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C13 { BL [] 0 setdash  2 copy moveto
       2 copy  vpt 0 90 arc closepath fill
       2 copy moveto
       2 copy  vpt 180 360 arc closepath fill
               vpt 0 360 arc closepath } bind def
/C14 { BL [] 0 setdash 2 copy moveto
       2 copy  vpt 90 360 arc closepath fill
               vpt 0 360 arc } bind def
/C15 { BL [] 0 setdash 2 copy vpt 0 360 arc closepath fill
               vpt 0 360 arc closepath } bind def
/Rec   { newpath 4 2 roll moveto 1 index 0 rlineto 0 exch rlineto
       neg 0 rlineto closepath } bind def
/Square { dup Rec } bind def
/Bsquare { vpt sub exch vpt sub exch vpt2 Square } bind def
/S0 { BL [] 0 setdash 2 copy moveto 0 vpt rlineto BL Bsquare } bind def
/S1 { BL [] 0 setdash 2 copy vpt Square fill Bsquare } bind def
/S2 { BL [] 0 setdash 2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
/S3 { BL [] 0 setdash 2 copy exch vpt sub exch vpt2 vpt Rec fill Bsquare } bind def
/S4 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
/S5 { BL [] 0 setdash 2 copy 2 copy vpt Square fill
       exch vpt sub exch vpt sub vpt Square fill Bsquare } bind def
/S6 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill Bsquare } bind def
/S7 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt vpt2 Rec fill
       2 copy vpt Square fill
       Bsquare } bind def
/S8 { BL [] 0 setdash 2 copy vpt sub vpt Square fill Bsquare } bind def
/S9 { BL [] 0 setdash 2 copy vpt sub vpt vpt2 Rec fill Bsquare } bind def
/S10 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt Square fill
       Bsquare } bind def
/S11 { BL [] 0 setdash 2 copy vpt sub vpt Square fill 2 copy exch vpt sub exch vpt2 vpt Rec fill
       Bsquare } bind def
/S12 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill Bsquare } bind def
/S13 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
       2 copy vpt Square fill Bsquare } bind def
/S14 { BL [] 0 setdash 2 copy exch vpt sub exch vpt sub vpt2 vpt Rec fill
       2 copy exch vpt sub exch vpt Square fill Bsquare } bind def
/S15 { BL [] 0 setdash 2 copy Bsquare fill Bsquare } bind def
/D0 { gsave translate 45 rotate 0 0 S0 stroke grestore } bind def
/D1 { gsave translate 45 rotate 0 0 S1 stroke grestore } bind def
/D2 { gsave translate 45 rotate 0 0 S2 stroke grestore } bind def
/D3 { gsave translate 45 rotate 0 0 S3 stroke grestore } bind def
/D4 { gsave translate 45 rotate 0 0 S4 stroke grestore } bind def
/D5 { gsave translate 45 rotate 0 0 S5 stroke grestore } bind def
/D6 { gsave translate 45 rotate 0 0 S6 stroke grestore } bind def
/D7 { gsave translate 45 rotate 0 0 S7 stroke grestore } bind def
/D8 { gsave translate 45 rotate 0 0 S8 stroke grestore } bind def
/D9 { gsave translate 45 rotate 0 0 S9 stroke grestore } bind def
/D10 { gsave translate 45 rotate 0 0 S10 stroke grestore } bind def
/D11 { gsave translate 45 rotate 0 0 S11 stroke grestore } bind def
/D12 { gsave translate 45 rotate 0 0 S12 stroke grestore } bind def
/D13 { gsave translate 45 rotate 0 0 S13 stroke grestore } bind def
/D14 { gsave translate 45 rotate 0 0 S14 stroke grestore } bind def
/D15 { gsave translate 45 rotate 0 0 S15 stroke grestore } bind def
/DiaE { stroke [] 0 setdash vpt add M
  hpt neg vpt neg V hpt vpt neg V
  hpt vpt V hpt neg vpt V closepath stroke } def
/BoxE { stroke [] 0 setdash exch hpt sub exch vpt add M
  0 vpt2 neg V hpt2 0 V 0 vpt2 V
  hpt2 neg 0 V closepath stroke } def
/TriUE { stroke [] 0 setdash vpt 1.12 mul add M
  hpt neg vpt -1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt 1.62 mul V closepath stroke } def
/TriDE { stroke [] 0 setdash vpt 1.12 mul sub M
  hpt neg vpt 1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt -1.62 mul V closepath stroke } def
/PentE { stroke [] 0 setdash gsave
  translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  closepath stroke grestore } def
/CircE { stroke [] 0 setdash
  hpt 0 360 arc stroke } def
/Opaque { gsave closepath 1 setgray fill grestore 0 setgray closepath } def
/DiaW { stroke [] 0 setdash vpt add M
  hpt neg vpt neg V hpt vpt neg V
  hpt vpt V hpt neg vpt V Opaque stroke } def
/BoxW { stroke [] 0 setdash exch hpt sub exch vpt add M
  0 vpt2 neg V hpt2 0 V 0 vpt2 V
  hpt2 neg 0 V Opaque stroke } def
/TriUW { stroke [] 0 setdash vpt 1.12 mul add M
  hpt neg vpt -1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt 1.62 mul V Opaque stroke } def
/TriDW { stroke [] 0 setdash vpt 1.12 mul sub M
  hpt neg vpt 1.62 mul V
  hpt 2 mul 0 V
  hpt neg vpt -1.62 mul V Opaque stroke } def
/PentW { stroke [] 0 setdash gsave
  translate 0 hpt M 4 {72 rotate 0 hpt L} repeat
  Opaque stroke grestore } def
/CircW { stroke [] 0 setdash
  hpt 0 360 arc Opaque stroke } def
/BoxFill { gsave Rec 1 setgray fill grestore } def
/BoxColFill {
  gsave Rec
  /Fillden exch def
  currentrgbcolor
  /ColB exch def /ColG exch def /ColR exch def
  /ColR ColR Fillden mul Fillden sub 1 add def
  /ColG ColG Fillden mul Fillden sub 1 add def
  /ColB ColB Fillden mul Fillden sub 1 add def
  ColR ColG ColB setrgbcolor
  fill grestore } def
/PatternFill { gsave /PFa [ 9 2 roll ] def
    PFa 0 get PFa 2 get 2 div add PFa 1 get PFa 3 get 2 div add translate
    PFa 2 get -2 div PFa 3 get -2 div PFa 2 get PFa 3 get Rec
    gsave 1 setgray fill grestore clip
    currentlinewidth 0.5 mul setlinewidth
    /PFs PFa 2 get dup mul PFa 3 get dup mul add sqrt def
    0 0 M PFa 5 get rotate PFs -2 div dup translate
	0 1 PFs PFa 4 get div 1 add floor cvi
	{ PFa 4 get mul 0 M 0 PFs V } for
    0 PFa 6 get ne {
	0 1 PFs PFa 4 get div 1 add floor cvi
	{ PFa 4 get mul 0 2 1 roll M PFs 0 V } for
    } if
    stroke grestore } def
/Symbol-Oblique /Symbol findfont [1 0 .167 1 0 0] makefont
dup length dict begin {1 index /FID eq {pop pop} {def} ifelse} forall
currentdict end definefont pop
end
gnudict begin
gsave
0 0 translate
0.100 0.100 scale
0 setgray
newpath
1.000 UL
LTb
350 300 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 507 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 714 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 921 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 1128 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 1335 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 1542 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 1749 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 1956 M
63 0 V
3037 0 R
-63 0 V
1.000 UL
LTb
350 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
715 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
1079 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
1444 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
1809 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
2174 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
2538 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
2903 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
3268 300 M
0 63 V
0 1697 R
0 -63 V
1.000 UL
LTb
1.000 UL
LTb
350 300 M
3100 0 V
0 1760 V
-3100 0 V
350 300 L
LTb
LTb
0.600 UP
0.600 UP
1.000 UL
LT0
LTb
LT0
1613 1847 M
237 0 V
715 507 M
364 207 V
730 414 V
1459 828 V
715 507 Box
1079 714 Box
1809 1128 Box
3268 1956 Box
1731 1847 Box
0.600 UP
1.000 UL
LT1
LTb
LT1
1613 1747 M
237 0 V
715 507 M
364 186 V
365 207 V
365 208 V
365 207 V
364 162 V
365 -27 V
365 304 V
715 507 BoxF
1079 693 BoxF
1444 900 BoxF
1809 1108 BoxF
2174 1315 BoxF
2538 1477 BoxF
2903 1450 BoxF
3268 1754 BoxF
1731 1747 BoxF
0.600 UP
1.000 UL
LT2
LTb
LT2
1613 1647 M
237 0 V
715 507 M
364 174 V
365 121 V
365 68 V
365 -18 V
364 62 V
2903 804 L
365 92 V
715 507 Circle
1079 681 Circle
1444 802 Circle
1809 870 Circle
2174 852 Circle
2538 914 Circle
2903 804 Circle
3268 896 Circle
1731 1647 Circle
1.000 UL
LTb
350 300 M
3100 0 V
0 1760 V
-3100 0 V
350 300 L
0.600 UP
stroke
grestore
end
showpage
}}%
\put(1563,1647){\makebox(0,0)[r]{\small{Rayshooting from files}}}%
\put(1563,1752){\makebox(0,0)[r]{\small{Generate data to files}}}%
\put(1563,1847){\makebox(0,0)[r]{\small{All data in RAM}}}%
\put(1900,50){\makebox(0,0){Processors}}%
\put(100,1180){%
\special{ps: gsave currentpoint currentpoint translate
270 rotate neg exch neg exch translate}%
\makebox(0,0)[b]{\shortstack{Speedup}}%
\special{ps: currentpoint grestore moveto}%
}%
\put(3268,200){\makebox(0,0){ 8}}%
\put(2903,200){\makebox(0,0){ 7}}%
\put(2538,200){\makebox(0,0){ 6}}%
\put(2174,200){\makebox(0,0){ 5}}%
\put(1809,200){\makebox(0,0){ 4}}%
\put(1444,200){\makebox(0,0){ 3}}%
\put(1079,200){\makebox(0,0){ 2}}%
\put(715,200){\makebox(0,0){ 1}}%
\put(350,200){\makebox(0,0){ 0}}%
\put(300,1956){\makebox(0,0)[r]{ 8}}%
\put(300,1749){\makebox(0,0)[r]{ 7}}%
\put(300,1542){\makebox(0,0)[r]{ 6}}%
\put(300,1335){\makebox(0,0)[r]{ 5}}%
\put(300,1128){\makebox(0,0)[r]{ 4}}%
\put(300,921){\makebox(0,0)[r]{ 3}}%
\put(300,714){\makebox(0,0)[r]{ 2}}%
\put(300,507){\makebox(0,0)[r]{ 1}}%
\put(300,300){\makebox(0,0)[r]{ 0}}%
\end{picture}%
\endgroup
\caption{Speedups of new versions of the new microlensing implementation}\label{speedup}
\end{figure}

Version 6 uses parallelism in two places: during the generation of stars in the setup phase, and during ray shooting. These are indicated by the dashed and dotted lines respectively. The stars generation shows a reasonable speedup but then tapers off, the shooting phase only gains a speedup of 3. The reason for the poor speedups in this file based implementation is serialization of I/O requests to the data files. To stop this happening it would be necessary to give each process a copy of the files, placed on different disks, and accessed through different I/O controllers. We note again that the  performance of the new approach is now much more dependant on the computer on which it is run. Currently we do not have a different configuration  to test our simulations on, but a 2-3 times speedup is acceptable enough, and in a real situation this particular simulation would use enough RAM so that \emph{all}
the data was cached.

\subsubsection{Summary}

To investigate the properties of quasar microlensing we enhanced a well-known microlensing implementation by massively increasing the number of stars that can be used, and executing some phases of the algorithms in parallel. The simulation is run on supercomputers, data is placed in very large
files, but parallelising the algorithms and adding various caching schemes and a different sort strategy has brought the run-time  to acceptable levels. We can now run simulations in a time comparable to the original method, but using
10\textsuperscript{9} stars, 100 times more than in the past.

\subsection{Microlensing results}
\begin{figure}[htp]
\centering
\subfigure[2\% = M{$_\odot$}, 98\% = 0.001000\ M{$_\odot$}, total number of stars = 29887581]{
\includegraphics[height=58mm]{map3.eps}}
\subfigure[2\% = M{$_\odot$}, 98\% = 0.000675 M{$_\odot$}, total number of stars = 4920276]{
\includegraphics[height=58mm]{map5.eps}}
\subfigure[2\% = M{$_\odot$}, 98\% = 0.000025 M{$_\odot$}, total number of stars = 1195479475]{
\includegraphics[height=58mm]{map6.eps}}
\subfigure[2\% = M{$_\odot$}, 98\% = Smooth, total number of stars = 609]{
\includegraphics[height=58mm]{map4.eps}}
\caption{Magnification maps from simulations of bi-modal mass distributions; these use
the same parameters as figure \ref{mag_maps} but use smaller and more numerous masses
  as the compact matter ($\sigma_s$). As the size of the masses is decreased the similarities between
the use of compact masses (a)-(c) and smooth matter (d) become more marked.}\label{mag_maps_big}
\end{figure}
Using our new implementation we can push down the mass size of the compact masses in bi-modal simulations, while at the same time increasing their number. Figure \ref{mag_maps_big} shows simulations of quasar microlensing models that go down to 0.000025 M{$_\odot$} for small compact mass objects; this is about 10 times Earth mass. Future simulations will go to smaller masses and possibly up to 3 billion stars. Of most interest is what happens to the magnification map as the masses become smaller. Figure \ref{mag_maps_big} begins at case (c) of figure \ref{mag_maps} and reduces the mass to 0.000025 M{$_\odot$}, increasing the number of stars to over a billion. With these small masses the large-scale caustics are becoming clearer and the fine-structure in-between the caustics is becoming smoother. Initial analysis indicates that as the small masses become smaller and more numerous the  magnification distribution will tend to that of the smooth-matter case (d), but the size of the source will be important.
Results of more complete investigations will be reported in forthcoming papers.

\section{Discussion}
Our new approach is of interest in itself, and can be studied as an instance of a large, parallel, computationally intensive implementation. Although our current aims excluded modifying the physics code, that can still be done at some later time.

\subsection{Software Engineering}
The following could be worthwhile scientific research projects based around our implementation:

{\bf Optimum distribution of rays to processors.} Do rays that are close to clumps of matter really take longer to process than those that aren't? And by how much? How close to optimal
is our simple static load-distribution scheme?

{\bf Dynamic load balancing}. Instead of fixing the allocation of rays to processors, the allocation could be varied at run-time, so that rays are moved from heavily loaded processors to lightly loaded processors. We could implement microtasking where each ray could be a task, with a scheduler pulling jobs off a run-queue and assigning them to processors for execution. We have not investigated whether the load on processors varies  enough to warrant the overhead of dynamic load-balancing; our impressions are that it does not, for very large runs.

{\bf Distributed memory.} A simulation of billions of stars generates hundreds of gigabytes of data, and this data has to go somewhere. If there are enough processes available with enough total memory, the data can be distributed amongst them and fetched across a network.

{\bf "Pre-set" stars.} It would useful to generate stars and cells that can be saved and re-used, thus skipping the initialization phase altogether. A standard for the storing of lens/cell data could be developed by the lensing community,  so that stars and cells can be stored and then simulated, modified, and re-used as necessary.

{\bf Multithreaded version.} The new implementation  has been built with this in mind. There is little  data  specific to a process that would have to be made specific to a thread; the significant shared data is external and can be accessed just the same by multiple threads or processes. Therefore a multithreaded version could be generated.

{\bf Use a commercial database for cells and stars.} The assumption is that a commercial database will be more efficient at general file caching and perhaps can be tuned to the usage patterns of our simulations.

{\bf File compression.} Compressing the stars and cell files on the fly will not make a simulation run faster, in fact it will run slower, but the data compresses to about 63\% of its original size. This would be useful if we run short of disk space or go to bigger simulations, but particularly it could be useful for a distributed-memory version.

\subsection{Science}
Beyond  computer engineering,  there are the scientific aspects of simulating microlensing on computers, for example with the use of a cell tree. The cell tree is one reason why the original method executed so speedily, but it is also the reason for the huge amount of data generated. Instead of using a tree it may be possible to  use other more recent models such as adaptive meshes that are used in N-body simulations \citep{yahagi}.

There are also enhancements that can be made that add more physics to the implementation, such as implementing moving sources and moving stars. It is clear that both the source and the lens and the objects that make up the lens, if it is complex, are moving; and the gravitational potential and light curves are changing over time. The ability to simulate time-changing lensing events would be a significant advance over all current approaches.

\section{Conclusion}

We have generated a new version of a ray-shooting microlensing simulation tool  that can be used to run huge simulations and continue  research in quasar dark matter microlensing. We have discovered that the ray-shooting is easily
parallelizable and simple load-balancing works well; parallelizing the
stars and cell generation  is not so easy, and memory caching could
be improved with more research into the patterns of how the data is accessed.

Our new approach will now be used to continue research in microlensing; based on its performance and usefulness we can determine what modifications to pursue for the future.

\section{Acknowledgements}

We thank the anonymous reviewer for comments that improved the quality of
this paper.

redpajama_set_name: RedPajamaArXiv


text:
Q: setEmpty() is not working for ListView with Custom Adapter :: Android i am trying to print message like "NO ALARM ADDED" in ListView when ever there is nothing in database.
I have set EmptyView but still it is showing me a single row with default values of row layout i have defined(issue)
Empty view is not displaying.
My XML Layout:-
<RelativeLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content" >

    <ListView
        android:id="@+id/listView_main"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:clickable="true"
        android:divider="#66F5F5F5"
        android:dividerHeight="1dp"
        android:focusable="true"
        android:paddingTop="5dp" >
    </ListView>

    <TextView
        android:id="@+id/empty"
        style="@android:style/TextAppearance.Large"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="center"
        android:text="NO ALARM ADDED" >
    </TextView>

</RelativeLayout>

My Custom Adapter GetView Method is here:-
@Override
public View getView(int position, View convertView, ViewGroup parent) {
    // TODO Auto-generated method stub
    View vi = convertView;
    ViewHolder vh;

    if (convertView == null) {
        vi = inflater.inflate(R.layout.row_layout, null);

        vh = new ViewHolder();
        vh.time = (TextView) vi.findViewById(R.id.time);
        vh.isEnabled = (ImageView) vi.findViewById(R.id.switch_img_rowLayout);

        vh.days = new TextView[7];
        for (int i = 0; i < vh.id.length; i++) {
            vh.days[i] = new TextView(context);
            vh.days[i] = (TextView) vi.findViewById(vh.id[i]);
        }

        vi.setTag(vh);
    } else
        vh = (ViewHolder) vi.getTag();

    Typeface titleFont = Typeface.createFromAsset(main.getAssets(), "digital1.ttf");

    vh.time.setTypeface(titleFont);
    vh.time.setPaintFlags(vh.time.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG);
    vh.isEnabled.setOnClickListener(this);

    if (list.size() > 0) {
        model = null;
        model = (ListModel) list.get(position);

        vh.time.setText(model.getTime());
        // vh.note.setText(model.getNote());

        String day[] = model.getRepetition().split(",");

        for (int i = 0; i < day.length; i++) {
            for (int j = 0; j < 7; j++) {
                if (day[i].equalsIgnoreCase(vh.days[j].getText().toString())) {
                    vh.days[j].setTextColor(Color.GREEN);
                }
            }
        }
    } else {

    }

    return vi;
}

May Main.java code is here:-
listView.setAdapter(swipe_adapter_undoable);
listView.setOnItemClickListener(new onItemClickListnerForLitView());

listView.setFocusable(true);
listView.setClickable(true);
listView.setEmptyView(findViewById(R.id.empty));

swipe_adapter_undoable.notifyDataSetChanged();

Anybody can help my message is not displaying but a default layout row is displaying?

A: Change your getCount method:
@Override
public int getCount() {
    return list == null ? 0 : list.size();
}


text:
Japan enters two weeks of state of emergency and the number of people leaving the country does not decrease
Streets of Japan (Kyodo News Agency)
According to the Japan Broadcasting Association TV, there were 4,717 confirmed cases of new coronary pneumonia in Japan on the 23rd, and the total number of confirmed cases exceeded 360,000.
There were 83 new deaths that day, and the cumulative number of deaths exceeded 5,000.
The 23rd is the second weekend after the expansion of the Japanese emergency to 11 prefectures.
According to Japan Broadcasting Association TV, statistics show that the flow of people going out in Osaka Prefecture and Fukuoka Prefecture has not been significantly controlled.
Japan Broadcasting Association TV reported that on the 23rd, Osaka Prefecture and Fukuoka Prefecture had 525 and 214 new confirmed cases respectively in a single day.
Japan's cumulative death toll exceeds 5,000 cases
According to Kyodo News, the number of new cases of pneumonia deaths in Japan has accelerated since November last year. On November 24 last year, the cumulative number of fatal cases in Japan was 2015 cases.
Two months later, on January 23 this year, there were more than 5,000 deaths.
At the same time, the epidemic has not eased in areas where the state of emergency has been re-entered, and the number of serious illnesses has been at a record high almost every day.
In this regard, Japanese medical professionals warned that "if the epidemic continues to spread like this, it may lead to the lives that could be saved can not be saved.
Tags: JapanPandemic
January 15 - On the 14th local time, students went on strikes in Chicago, Boston and other cities in the...
December 27 - According to the British Mirror on the 27th, Belgian fighting champion Frederic Sinistra has recently died of complications...
The city government of New Delhi, the capital of India, announced on the 26th that due to the recent increase...
Zimbabwe President Mnangagwa: confident that Zimbabwe will eventually overcome the pandemic
Intensive Military Exercises in the Middle East, Strongly Calling Out Iran Releases These Signals