« first day (918 days earlier)      last day (2134 days later) » 

4:28 AM
Please take a look at my Community question Stochastic root finding with Mathematica‌​. I didn't post it here because it's a bit of a discussion starter.
 
4:41 AM
don't know if it counts as "boat programming" over there ...
 
4:54 AM
Could anyone help me fix this? {# + Transpose[#]} &[{{a, b}, {c, d}}] ({{{2 a,b+c},{b+c,2 d}}})
What can I do to display a+a instead of 2a?
This also did not help
HoldForm[# + Evaluate[Transpose[#]]] &[{{a, b}, {c, d}}]
 
@seismatica Really only for displaying, yes?
 
yes
 
:16755218
{# + Transpose[#]} &[{{a, b}, {c, d}}] /. {2*sym_Symbol :>
   HoldForm[sym + sym]}
 
ah neat trick! I guess that's the easiest way to do it.
thanks @halirutan! mwah.
 
@seismatica np
 
5:11 AM
do you nomw why Evaluate would still not work?
the result of HoldForm[# + Evaluate[Transpose[#]]] &[{{a, b}, {c, d}}] gave {{a,b},{c,d}}+Evaluate[Transpose[{{a,b},{c,d}}]].
I wondered why Evaluate[Transpose[{{a,b},{c,d}}]] wouldn't evaluate.
HoldForm[Evaluate[Transpose[{{a, b}, {c, d}}]]] alone will give me {{a, c}, {b, d}} but it doesn't there.
perhaps it has to do with the pure function?
 
@seismatica Evaluate needs to be the in the top-level to act.
@seismatica Compare:
Hold[Evaluate[1 + 1]]
which works
and
Hold[1 + Evaluate[1 + 1]]
which doesn't work because Evaluate is nested too deep.
 
5:28 AM
gotcha!
 
 
2 hours later…
8:39 AM
@chris None of the additional shortkeys is not working in v10 even thought I've got the same keyeventranslations.tr file in v10 directory.
moreover I've got a problem with InputAliases -.-
"[" -> RowBox[{"[LeftDoubleBracket]", "[SelectionPlaceholder]", "[RightDoubleBracket]" results in only placeholder inside
 
9:45 AM
@Silvia hi, do you have v10?
 
@Kuba Yes but still the trial version, waiting for the 10.0.1 (you know home edition doesn't get upgrade after 30 days :)
 
@Silvia so there is 10.01?
 
@Kuba I think it's a bug. I remember some days ago someone asked a Q about ESC intt ESC not placing the cursor right.
 
@Silvia I was not aware of this, it worked on v9, but @Oska said it does not on v8
quite annoying...
 
@Kuba See last paragraph :) mathematica.stackexchange.com/a/54640/17
 
9:57 AM
@Silvia thanks I was not following se lately :)
 
@Kuba Wasn't too! Got a lot of things to do recently.
Like studying javascript things :)
 
@Silvia same here, and I was afraid v10 "issues" could overwhelm me :P I've started learning js too, but had to stop, I hope I will back to this after "holidays"
 
@Kuba The buggy of 10 remember me the 9.0.0. Hopefully everything will get right when 10.0.1
 
@Silvia the problem is I've both versions but I can't even set up v9 as the default one ;P
 
@Kuba Regarding the js, I hope I can do some web app using W-cloud as data source and js as client UI, but still learning and haven't had confidence about the doability.
@Kuba Why's that? I'm on windows and it lets me select which one I would prefer to use to open nb.
 
10:05 AM
@Silvia I have only done some basic courses so I can't help you. But as far as i know I think @Pickett can help you with questions :)
@Silvia I'm on win7 and v9 is set as default but everything is opened in v10 anyway
 
@Kuba That's sweet! Thanks for the information :)
 
@Silvia so you have both and v9 works as default without problems?
 
@Kuba No I use 10 as default for the Dataset, but I see windows prompt dialog to let me choose a default one.
 
@Silvia I had no prompt but I set it in configuration panel
ehh
 
@Kuba Just tried, and yes I can make v9 as the default one.
 
10:09 AM
@Silvia me too, but does it work?
because even if I use Open with -> mma9 it still opens v10
the only way is to open v9 and open a notebook from there
 
It works, double click on a nb will open it in 9. Just right click on a nb file and choose open with -> choose default program
 
@Silvia I did this :/ what windows are you using?
 
@Kuba I'm using windows 8.1 x64.
 
@Silvia maybe it matters, I'm on win7
x64
 
@Kuba Maybe.. I don't have a win7 any more, so can't try it for you :(
 
10:13 AM
@Silvia I think I will uninstall it now.
and wait for 10.0.1
 
@Kuba Maybe you can try install 10 first then install 9?
 
@Silvia I don't have time for such acrobatics now :P and I don't need it so much too :)
but it is a pitty, I would love to try some new functions in a meantime;)
 
@Kuba Then let's wait for 10.0.1 together :P
@Kuba I think you can still try them on the cloud version.
 
@Silvia I think so.
@Silvia ok, thanks for tests :) have a good evening (I suppose). Have to go back to work
Cya :)
 
@Kuba See you! :)
 
 
3 hours later…
1:33 PM
I'm going to drop this here again in hope of more attention: How to do stochastic root finding with Mma? I made the mistake of mentioning in the hour of lowest traffic.
 
1:50 PM
@Szabolcs You already got my upvote there although I guess your question is kind of specific. I rarely had luck when I asked very specific questions where I already had spent some time thinking about it.
 
2:25 PM
What can cause someone to down vote me because I took the trouble and the time to report a problem I found in DSolve? Very strange.
someone really does not like me here. I wish I know why.
3
Q: 1/0 encountered when solving an ODE

NasserWhat can cause this error to show up? Clear[lambda, a, b, x, y]; ode = lambda y[x] + a b y'[x] + a (-1 + b x) y''[x] + y''''[x] == 0; DSolve[ode, y[x], x] Verion 10, windows 7.

 
 
1 hour later…
3:29 PM
@halirutan I have an issue running mathematica on linux clusters. I have a compiled function with listable and parallelization true. I requested 8 cores, but when it runs, it uses 1 core with 300% usage
do I need to specify Needs["SubKernelsLocalKernels`"] LaunchKernels[LocalMachine[8]]`
in the script?
 
3:48 PM
Hi @brama C U in a bit. I'm dressed with a gray suit white shirt with stripes
where do you want to meet?
 
I will meet you in the lobby in 30 mins
 
4:23 PM
@rm-rf I request you to help me for following question: I am sure you like my questions :) mathematica.stackexchange.com/questions/55495/…
 
@brama Compiled parallel functions don't run on parallel kernels unless you specified it. Have you read the link I gave you?
This is an answer from the Wolfram support regarding one of my Linux Graphics bug reports:
> It would be helpful if you can send us a description of the problem along with a notebook that can reproduce the issue. External links are subject to change hence technical support will need a copy of the problem to keep track of issues and in case it needs to be forwarded to developers.
Am I nit-picking here when this answer kind of annoys me?
I'm testing the software to try to find every possible bug in the beta phase that concerns my work. After the final release which costs much much money and which introduces more bugs, I again take the time to write a bug report. Since I want that others know of this issue, I write it up here so users can comment and get notified when it is fixed. And the support is complaining that it needs to copy and paste the following description:
> "The moment I click on the graphics to drag it, it seems like it zooms the whole graphics for a fraction of a second."
 
 
1 hour later…
5:58 PM
@Nasser I looked at the question, tried a few things, and upvoted when it seemed clear it wasn't a simple mistake. OTOH, I've had a couple random downvotes on Qs (downvotes on Qs don't cost the voter any rep).
Hmm:
NIntegrate[ BesselJ[0, x - 1] BesselJ[0, x + 1], {x, 0, Infinity},  Method -> "DoubleExponentialOscillatory"]

> First::normal: Nonatomic expression expected at position 1 in First[0]. >>
On both V9, V10 (beta). I don't have V10 yet. (Reported to WRI.)
 
6:30 PM
@Nasser The 1/0 error tends to occur pretty often when using DSolve and NDSolve. It usually appears in the boundary conditions for when the independent variable equals 0 or something.
@Nasser Can't think of what it is off the top of my head in the case you posted though
 
 
3 hours later…
9:50 PM
@halirutan Sorry had a afternoon long meeting..just got back
@halirutan I read your link mathematica.stackexchange.com/questions/7017/… and implemented SetSystemOptions["ParallelOptions" -> "ParallelThreadNumber" -> $ProcessorCount], but eventhough I specify 6 processors in my PBS script, it shows only 1 MathKernal when I use "ps -A |grep MathKernel"
 
10:13 PM
WRI just tweeted about a contest: "The 17th annual ICFP Programming Contest begins tomorrow! We encourage all Wolfram users to participate"
From the competition website: "This is an open contest. Anybody may participate except for the contest organisers and members of the same group as the the contest chairs. No advance registration or entry fee is required. Contestants are free to organize themselves into teams of any size."
I have no idea what kind of problems are included since they don't have any examples though.
 
@brama And $ProcessorCount is what? PBS typically allows you one CPU for the controlling process; the rest of the processes are expected to be started using TM. Aside from that, ps shows processes, not threads.
 
@OleksandrR. Hey @OleksandrR. good to see you again.....
 
@Pickett I participated in the ICFP contest on the F# team at Microsoft for two years. It was the best programming contest I've ever participated in.
 
@OleksandrR. you got to go slow..I am new to this Linux stuff. So my PBS scrpit looks like this: #PBS -l nodes=1:ppn=8 #PBS -l mem=2gb
 
@MichaelHale I've never participated in a contest before. What kind of knowledge is required?
 
10:23 PM
The first time I participate we had to implement a virtual machine from designs from a hypothetical ancient clay tablet based computer. It then turned out to have a mini unix like operating system that it could run, and some folders you had to hack, and each folder contained a separate programming problem.
The second time it was something about encoding pictures in DNA. I don't remember all the details, but I'm sure the links are still around.
 
@blochwave NelderMeadMinimize is just a front-end for the other function. If you want to manipulate the compiled code directly, you have to set it up yourself.
 
@MichaelHale Hm ok, nice.
 
The ICFP is more focused on a big problem (sometimes a meta-problem with smaller sub-problems) that you spend a weekend on with a team. The ACM contest is a bunch of unrelated small problems that you solve in a few hours with your team.
Those are the only programming contests I've participated in.
Except the Mathematica one liner.
 
:)
 
@OleksandrR. what do you mean by "...started using TM" and "ps shows processes, not threads" ?
 
10:26 PM
@brama seems okay. You should run a job that prints out $ProcessorCount and record it (is it the number of physical CPUs? is it the number of processors requested from PBS? something else?). PBS typically gives you a particular CPU affinity for your controlling process and you may not be able to run other threads in parallel except using TM-launched processes
TM is the Torque Manager. It is an API that user programs call to request cluster services such as process startup.
And you are trying to start threads here, not processes. So you would expect only one MathKernel, even if there are several parallel threads within it.
 
@OleksandrR. I I want to use the 8 cores I have specified in PBS. I want to make sure my program utilizes all the resources and runs parallel. so you think instead of $ProcessorCount I will put 8 as specified in my PBS
 
@brama well I know nothing about your program. So I can't say what you need to do.
@brama actually apparently ps can show threads (I always find ps a bit obscure). Try e.g. ps -eLo pid,cmd,nlwp
 
@OleksandrR. check this out pastebin.com/WYWvcXx8
@OleksandrR. first 2 lines is of my concern
 
You have a lot of Parallelization -> True without RuntimeAttributes -> Listable. This does not have any effect. You know that, right?
It especially does not have any effect if you then inline that bytecode into another compiled function
What is the structure of your parallelization here?
 
@OleksandrR. the initial few functions are just compiled functions used in the later main function`f=With[..Compile[..` which is parallelized and listable
@OleksandrR. I want that to be run in parallel
 
10:40 PM
@brama you are performing many different minimizations in parallel?
 
@OleksandrR. nope..I think DE can't be parallelized in MMA
 
@brama no I mean what is the reason for you to use ParallelEvaluate
Your code is too complicated for me to understand its structure at first glance
 
@OleksandrR. Sorry for the trouble
 
@brama he is solving a specific problem with specific requirements. Are yours the same?
 
@OleksandrR. To be honest with you..I do not have a good understanding of kernels, subkernels, and processors. My understanding is every processor is a subkernel..with that in mind, I am assuming I should see 8 subkernals for 8 processors in my PBS script
 
10:44 PM
What are aa and bb?
 
@OleksandrR. Three input parameters aa, bb, and ii
 
Either or both of them vectors or higher order tensors?
 
@OleksandrR. all scalers
I took out the header of the program to avoid complexity
 
@brama then all your attempts at parallelization are futile. The problem does not express any parallelism!
 
@OleksandrR. what??? Ok..Let me see if I understand this right..The function g is to be parallized....
So I use it as a compiled function with parallelization
 
10:48 PM
@brama maybe I misunderstood the code. How is g parallelized`? What operation does it do in parallel?
It parallelizes over its first argument?
 
@OleksandrR. g:=f for memoization and f is a compiled function that performs matrix manipulations
 
@brama yes I appreciate that. But what is f doing? It seems that it takes one vector and two scalars. How does it extract any parallelism out of this?
If you want to make a vector function run in parallel, you have to pass it a matrix, or if you want to make a scalar function run in parallel, you have to pass it a vector, for example
I also don't see the reason for using ParallelEvaluate? Your random seed is something different for each parallel kernel perhaps?
 
@OleksandrR. you are welcome!! I guess I made a stupid mistake that is throwing you off....The variable aa in f is a vector of parameters to be optimized. a21 and a22 are the input parameters. Did you already figure this?
 
@brama yes I saw that. But if you want your function f to be run in parallel, you have to pass higher order values than the ones your function operates on.
 
@OleksandrR. I guess then f does not run in parallel. All the functions it calls need to run parallelization "code in lines 4-16" on the pastebin
 
10:58 PM
@brama I don't want to sound patronizing, but I hope you are already aware that parallelization is all about your problem structure, rather than throwing in as many Parallel -> True as possible? The structure of this problem just seems not amenable to parallelization. But maybe I'm wrong--sample inputs for f would help?
 
@OleksandrR. kind of understand it, but may not have done it that way....The philosophy is f is a numerical solution for the set of parameters and NMinimizer does parameter optimization. f has several matrices and f calls several other functions to perform matrix manipulations
 
Could you please post a sample input for f?
Just to make it produce some result
 
@OleksandrR. f[{5,5,5,5,5,5,5,5,5,5},1800,0.05]
 
thanks
@brama okay, I apologise. There is some parallelization here. I am just trying to figure out where it happens
 
@OleksandrR. that is the most pleasant thing I heard today!!
@OleksandrR. Thank you so much for looking into this...
@OleksandrR. Any questions?
 
11:16 PM
@brama I removed the parallelization from NsupR, den, inflow. The result seems the same but the function is now 50% faster. Can you confirm this?
 
@OleksandrR. you just remove "Parallelization->True" right? I am seeing an increase in //AbsoluteTiming
@OleksandrR. do you want me to use timeAvg
 
@brama both Parallelization -> True and RuntimeAttributes -> Listable are removed. Also "InlineExternalDefinitions" -> True is added to f. I'm more interested in correctness than timings at this stage
 
@OleksandrR. Let me check!!
 
@brama the reason is that changing some of the other functions changed the result. Since you know what the inputs and outputs should be better than I do, hopefully you can tell at a glance if the modification is correct or not
 
@OleksandrR. The "InlineExternalDefinitions" -> True was already there in f. Did you mean inlining?
 
11:23 PM
@brama sorry, yes, my mistake
"InlineCompiledFunctions"
Compile produces some messages with this option. But they are just for your information; you can ignore them.
By the way ExpressionOptimization -> True is the default.
 
@OleksandrR. yes...I was worried for a second
@OleksandrR. yes..it improved by about 30%
@OleksandrR. Also, if you have noticed, I did not use CompilationTarget
 
@brama yes, for testing I would rather not compile to C every time
How about the correctness? Is it still semantically correct with these changes?
 
@OleksandrR. The result looks identical, so I guess it should.
@OleksandrR. Let me check with another set of inputs
 
@brama well yes, but if you e.g. remove demR parallelization, a result is still produced, but a different one. That's why I want you to check that the inputs and outputs are of the correct ranks
 
@OleksandrR. It works fine (same result) with the second set of inputs
 
11:32 PM
@brama I checked with 2 different inputs already. But maybe this is not enough; and maybe the problem appears only for specific inputs. Maybe our modification introduces a small error somewhere that is only noticeable sometimes. So I need semantic verification, not experimental!
 
@OleksandrR. I have never done that before..how do I do that?
 
Is it possible to run the mathematica notebook directly in the non-interactive mode? I find keeping two copies of file hard.
 
@brama you know the problem you are solving. So go through the code with it in mind that NsupR, den, inflow are no longer taking vector arguments but pure scalars. Is the calculation still correct?
And why should demR be listable but demF not? It changes the result...
 
@OleksandrR. ok..got it
@OleksandrR. I think I made those changes after going through this mathematica.stackexchange.com/a/54459/11116
@OleksandrR. you do not have to go thru it..I remember it now...
Since demR is used in f I left the listable in place and removed the inlining in f. In the case of demF, it is only used in floF and gamma, which are both listable, I removed the listable and made them inline
 
@brama okay, I see
 
11:44 PM
@OleksandrR. so based on your understanding, where do you think the parallelization is happening and how do I use more processors in my linux cluster runs?
 
Well, I think I have to go now (late here), but we can resume this discussion another time. It looks to me that the code could benefit from a bit of tidying up/commenting, which should help with optimization. At the moment, with just the code in front of me, I find it extremely hard to tell what ranks each of the values (should) have, and what they actually have by the time all the functions operate on them.
@brama the parallelization is happening in that you are threading scalar operations over matrices. But what these matrices mean in the calculation I don't know and this disturbs me.
I think ParallelEvaluate is hopeless; the parallelization happens inside the compiled function.
If you can use NM rather than DE it will help (DE is inefficient for function evaluations)
 
Let me comment it and send you a cleaner version with comments. Would you prefer that!!
 
@brama well let's come back here another time and discuss it further. But yes, I think I would prefer that.
 
@OleksandrR. any specific time you can think of for our meeting?
 
@brama I don't know. Some time at the weekend perhaps
 
11:49 PM
@OleksandrR. that sounds good. Thanks
@OleksandrR. Good night then!!
 
@brama okay, you're welcome. At least you have a 30% performance increase now I suppose. But I'm still worried about correctness. Hopefully we can resolve this with proper consideration of the problem. And we should get our own chat room too as the main chat will be busy at the weekend.
Bye!
 
@OleksandrR. Sure..Thanks!!
 

« first day (918 days earlier)      last day (2134 days later) »