Patrick Ian Smith | 22 years old | Manic Depressive, Drug Addiction | FC: Ezra Miller | OPEN
If one thing is certain, Patrick always loved music. This passion paid off when at the age of 19, he was skyrocketed into stardom. Thus began his mental breakdown. Patrick had been diagnosed bipolar but didn’t let it get to him. He quickly became a sort of teen heart throb, and eventually married a supermodel at twenty. Patrick was, on the surface, happy. But, underneath the glamor of rock and roll was a beast just waiting to rear its ugly head. One night, the opportunity arrived. Patrick had been under the influence of several drugs as well as copious amounts of stress. He became completely delusional, believing that he was being watched by the government. He destroyed seven mailboxes, two squad cars, and a 2.5 million dollar statue. It was then that his wife decided she could no longer put up with his constant mood swings, and shipped him off to Pineridge with divorce papers.
Patrick absolutely hates being in the asylum. The music program is limited, and because of his ‘incident’, he was not allowed to bring any of his guitars with him. To make matters worse, he’s had an incredibly hard time convincing people that he’s more than just a celebrity. He avoids the women’s wings in order to keep from being bombarded by fans. He has attempted suicide three times since his arrival and is on constant watch.
Sam Oliver Bosner | 19 years old | Depressive, Alcoholic | FC: Cole Sprouse | OPEN
Sam never knew his mother. She’d been anorexic, and severely underweight when she’d gone into labor. Sam was her fourth child, all other’s having been girls. Due to complications during childbirth, and having been severely malnourished, Angela died and Sam was born completely deaf. Due to his lack of hearing, angsty birth and being the youngest, his sisters absolutely coddled him. He learned to write in order to communicate with the general public, keeping a note pad handy at all times. Sam can only speak sign language. His feelings of isolation led him to become depressed. Sam took to the bottle as a means of coping with his guilt over the death of his mother. No longer being able to keep up with his son, Mr. Bosner sent him off to Pineridge.
At the asylum, Sam often feels alone and misses the constant attention he’d always received from his sisters. He rarely makes attempts at friends, however, because he doesn’t want to be pitied, and fears the language barrier may be too much. He’s getting better at reading lips, though, and has come to find he has a knack for sculpting.
Theo Helford | 23 years old | Insomnia, OCD, Super-sensitivity | Face Claim: Donald Glover | OPEN
Theo was diagnosed with supersensitivity at a young age but was expected to grow out of it. He was a bright kid with a bright future: he got fantastic grades and blew everyone away with his sports skills. He earned a sports scholarship and aced his exams – he was set for life. Gradually, he started to develop OCD, related to his supersensitivity. At first, it was simple enough. Different foods couldn’t touch; his clothes couldn’t be made of certain fabrics, etc. Then, over time, it stemmed into more general, anxiety-based OCD. Washing his hands twice after every meal, folding all his clothes and especially that everything had to be in its place. But still, he managed, and so did his family.
Unfortunately, when he badly injured his knee in a football match and was no longer able to play, he found himself also unable to leave the house for pain and embarrassment. He became nightmarish, suddenly irritable, his OCD escalating until he was spending hours at night pushing furniture around his room, insisting it just wasn’t right. This aggravated his injury, prolonging the healing process, but he no longer cared about sports. He started spending a majority of his time either on the computer or rearranging his room, finding it almost impossible to sleep at all. Since he’s come to Pineridge, his OCD has calmed somewhat and his knee is much better now he’s taking care of it.
Working on an OpenMP application I came across an interesting race condition. The application involved iteration over the contents of a matrix, using a for-loop and a second nested for-loop, during which the values in each row were arithmetically modified by an offset proportional to the foremost non-zero value in each column. Within the serial implementation, in the first for-loop, the offset was computed, prior to modification of the values within a given row using the computed offset.
A naive approach to the optimization of the application was to introduce a parallel section within the outer for-loop to perform the arithmetic modification of each value within a given row of the matrix in parallel. This was done by simply by introducing a ‘pragma omp parallel’ section around the contents of the outer for-loop, and a ‘pragma omp for’ section around the inner for-loop.
After running the application and observing that the production of the expected output was inconsistent, I hypothesized that there was likely a race condition in the application. After spending time debugging, I observed that, since the offset was proportional to the foremost, non-zero value in the current row, and that a thread would modify this value, there was a race condition which necessitated the synchronization of the threads in the parallel section after the computation of the offset, in order to ensure that all threads had computed the same offset before proceeding to modify the contents of the matrix using that offset, since one of the threads, in modifying the matrix, would alter subsequent computations of the offset. After the addition of a ‘pragma omp barrier’ which followed the computation of the offset in the parallel section, before the inner for-loop, the application consistently produced the correct result.
Observation: even locally scoped and instantiated thread variables can be vulnerable to race conditions if the values of those variables depends on shared data, which is modified by one or more threads in a team within the parallel section. Bear in mind that if shared data is being modified and read within a parallel section, a thread may modify the shared data which is subsequently read by another thread which was created after the first thread.
elemental function fe(x) result(r) double precision, intent(in) :: x double precision :: r integer, save :: i = 0 r = i + x**2 i = i + 1 end function fe
function my_func(x) result(r) double precision, intent(in) :: x double precision :: r integer, save :: i = 0 r = i + x**2 i = i + 1 end function my_func program test !$ use omp_lib implicit none interface function func(x) result(r) double precision, intent(in) :: x double precision :: r end function end interface type :: fptr procedure(func), pointer, nopass :: p => null() end type type(fptr) :: pt procedure(func) :: my_func double precision :: x(10), y(10) integer :: i x = [((i-1)*0.5d0, i = 1,10)] pt%p => my_func !$omp parallel workshare y = call_pt(pt, x) !$omp end parallel workshare write(*,*) x write(*,*) y stop contains elemental function call_pt(f, x) result(r) type(fptr), intent(in) :: f double precision, intent(in) :: x double precision :: r r = f%p(x) end function call_pt end program test
function my_func(x) result(r) double precision, intent(in) :: x double precision :: r integer, save :: i = 0 r = i + x**2 i = i + 1 write(*,*)i end function my_func