aeon_flux

joined 1 year ago
[โ€“] aeon_flux@sh.itjust.works 1 points 1 year ago (1 children)

I might have worded things a bit poorly - it's not only about the internship (I'll be going, of course) but more about things changing and trying to decide between paths(do I move abroad or do I stay where I am? do I even like my field as a job? what do I value/want from life? et. al.) im not sure how to handle not having a streamlined path ahead anymore.

[โ€“] aeon_flux@sh.itjust.works 2 points 1 year ago (1 children)

I'll definitely be going, there's no going back on that, it would be incredibly silly of me not to. I think I'm just finding it hard to adjust to life changing around me again. I had a really rough time growing up and university did me a whole lot of good, I adapted really well, got good grades, was social, and I'm just afraid of taking myself out of my comfort zone by moving when this was pretty much the first and only time in my life that I've felt fine.

It's even more silly because I'm not even done with uni yet, I still have one more year to go in my master's. I'm just the kind of person that tries their hardest to plan their future, but right now I'm staring at a great unknown that I can't rationally manage and find it hard to just "go with the flow" - is it even wise for me to do that?

 

Hi,

I'm at that point in life where I'm facing big changes/having to take decisions for the first time and I'm scared.

I'll soon be starting an internship abroad with a good company and, silly to say, I'm getting cold feet. I'm scared of the move and about the future - at the possibility that I'll like it and want to go there, and leave the people here behind.

I'm also scared that my partner wouldn't want to come with me if that were the case. They say they aren't sure yet. I understand, but it still makes me feel anxious for the future. I would hate to be in the situation where I would have to choose between a good job and losing my partner. It's so silly writing this down.

I think I'm just rambling and could use someone older to give me some advice about the way their life went. I dont really have older role models around, I'm on my own with this one. I guess that's part of the problem. I'm full of internal conflict, on so many topics at once - from practical life direction to things like philosophical/ideological matters.

Thanks for reading this. Hope life is kind to you.

 

Hi,

I'm studying for an exam coming up soon and I'm trying to figure out what is the functional difference between these two approaches:

#pragma omp parallel for
	for(unsigned int i = 0; i < G.Out.bucket_count(); i++){
		for(auto itv = G.Out.begin(i); itv != G.Out.end(i); itv++){

			unsigned int v = itv->first;

			#pragma omp parallel for
			for(unsigned int j = 0; j < G.Out[v]._map.bucket_count(); j++){
				for(auto ite = G.Out[v]._map.begin(j); ite != G.Out[v]._map.end(j); ite++){

					unsigned int w = ite->first;

					if(o[v] > o[w])
					 #pragma omp critical
					 p[o[v]] = min(p[o[v]],o[w]);

				}
			}

		}

and

	#pragma omp parallel for
	for(unsigned int i = 0; i < G.Out.bucket_count(); i++){
		for(auto itv = G.Out.begin(i); itv != G.Out.end(i); itv++){

			unsigned int v = itv->first;

			if(p[v] == v){

				unsigned int parent = v; //=p[v]

				#pragma omp parallel for reduction(min : parent)
				for(unsigned int j = 0; j < G.Out[v]._map.bucket_count(); j++){
					for(auto ite = G.Out[v]._map.begin(j); ite != G.Out[v]._map.end(j); ite++){
						unsigned int w = ite->first;
						if(v > w)
						 parent = min(parent,w);
					}
				}

				p[v] = parent;
				if(p[v] != v) changes = 1;

			}

		}
	}

In the first example, the minimum between the two values is calculated using a critical section, while the second one uses a reduction. Both work, and they seem equivalent to me, when would one choose one or the other?

Thanks, and sorry if the question is too niche. Any other info about OpenMP is greatly appreciated :D