Browsed by
Category: Technical

error LNK2019: unresolved external symbol _vmlsLn4

error LNK2019: unresolved external symbol _vmlsLn4

If you get this message while converting some code from compiling with the Intel Compiler over to using Visual Studio, then I have a solution for you:

error LNK2019: unresolved external symbol _vmlsLn4 referenced in function “BLAHBLAH”
fatal error LNK1120: 1 unresolved externals

Problem:
The Short Vector Math Library (SVML) which has the vmlsLn4() function is implemented in  svml_disp.lib.  Now this lib is usually only for the Intel Compiler’s use in vectorizing code but if someone used any of the SVML instructions, you can do the below trick to fix it.  See this article for more details about using SVML.

Solution:
1. Install the latest Intel Compiler (with Visual Studio links if it asks).  If that doesn’t come with the library you need, install Install Intel Parallel Studio as well. Between the two, you’ll get the svml_disp.lib you need.

2.  At the top of the .h/.cpp file that uses , declare this external:
extern
 “C” { __m128d vmldLn2(__m128d a); }

3. Go to your project settings, and for the library includes, add:
svml_disp.lib

4. In the ‘Additional Library Directories” box, add a path to wherever you installed the Intel compiler’s lib directory.  The default location is:
C:Program Files (x86)IntelCompiler11.167libia32

Hit F7 in Visual Studio and you should build like a champ and run just fine.

Bees can solve the traveling salesman problem

Bees can solve the traveling salesman problem

Researchers at Queen Mary, University of London and Royal Holloway have discovered that bees learn to fly the shortest possible route between flowers even if they discover the flowers in a different order. This ‘Travelling Salesman Problem’ often takes supercomputers days to solve, but Bees are now the first animals proven to do it. Computer-controlled artificial flowers were used to track the bee’s path and found they quickly learned the shortest route. Since a bee’s brain is only the size of a pinhead, researchers are hoping to identify the neural circuitry required and use that understanding to construct their own systems that rival the computational power of existing machines

Fascinating. A humbling reminder that despite the fact we consider computers near godlike in their abilities – there are solutions even the brightest minds can’t duplicate with a Turning-based machine. Or even reproduce at all.

Has often made me wonder if some day we’ll have a quantum or other non-Turing ‘co-processor’ with our current machines that is based on an architecture more suited to solving these types of difficult problems.

Earth shattering…

Earth shattering…

While it might not look like much, this software program called the Eureka machine uses standard video input, examines the behavior of a system, and with no previous knowledge of a system’s physics, kinetics, etc – it generates equations that accurately describe what is going on.

The program, from simple video input and a little massaging, it was able to generate the Hamiltonian equation for the difficult double-pendulum problem in about 30 minutes.  And a Lagrangian Equation that describes a double harmonic oscillator in another case – all in very short periods of time:



While this is very cool and to some degree just an expansion of what we have been able to do with neural net programming that ‘learns’ by trying out techniques and checking their results against reality – the ability for the program to generate equations takes this all a step further.To give an example of what this brings about – they recently applied the algorithm to some complex data collected in cell interaction.  While the scientists had struggled to make any meaning of the patterns, the program was able to come up with a formula that accurately described how these cells worked.  But this presented a new problem.  While the equation seemed to match exactly what was going on, the scientists who fed the data couldn’t figure out what physical components the variables the equation related too. They made the decision NOT to publish the equation in any papers with the accurate modeling equation because they didn’t actually understand how the equation modeled the system. While not unsurprising from an program that simply generates an equation from data; its the first time that these computers might actually be out-matching us for models of systems.  However, since they are unfettered by making the actual variables equate to real-world  phenomenon – they are free to generate equations who’s variables aren’t necessarily based on the underlying physical phenomenon.  THIS is the interesting part.It seems (rightly) that just modeling the situation isn’t sufficient to say you understanding it.  Does understanding of a phenomenon require the understanding of the underlying principles?  Should it? Sure, you might be able to come up with an equation that models what’s going on for the cases you have, but without understanding the principles behind it, you’re just putting your faith in the equations generated.  But is this what we do today?

I was taught since 6th grade science class that every scientific principle was only one repeatable converse case away from being refuted at any time.  History is full of such events – including the most deeply held ones such as Newton’s laws of motion. Depending on the size scale of use, they either work very well, or in the quantum/astrophysical realms – fall apart completely.  Those rules have been getting ‘touch-ups’ for years.  While Newton certainly isn’t categorically wrong – it’s clear we didn’t (and still don’t) have all the corners fleshed out.

So we find the crux of the matter -why shouldn’t the equations generated by this program be any more deserving of our trust than Newton’s?  I’d say the key lies in several ways: mostly in the requirement for rigorous review, numerous experimentally repeatable verifications, and apparently that the equation needs to be explainable with principles and terms that we DO understand.  The first part is very understandable.  No scientific statement worth it’s salt should be accepted without lots of peer review, repetition of the experiment by others in different conditions, public discussion, and confirmation via different methods.  This program required user intervention to get a balance between absolute accuracy and ‘simplicity’.  Which means it had to go through numerous iterations and a little bit of pre-known knowledge to get it to generate equations that corresponded to principles we understand. This implies it could generate different equations for the same phenomenon.  More on this later…

But the second reason, and the one the jury appears to be out on, appears that one needs to be able to explain WHY the equation works, or at least be based on terms we do understand.  In other words, just pulling the ‘answer’ out of the back of the book isn’t real understanding.  The right answer doesn’t seem to be sufficient by itself for science to classify as real knowledge.  For science, we also apparently need to be able to explain why it’s right too.  Only then can we actually say we have a decent understanding of something.

The unanswered question is if that requirement of being built on understood principles needlessly inhibits us.  What if we just ‘went with the flow’ and let machines like this generate those horribly difficult equations for us?  What would that look like/imply?  The equations that the software could generated didn’t always correspond to previously known/modeled phenomenon – and needed to be ‘guided’ by the user to answers in the form they wanted.  But this implies the computer in other circumstances might be revealing a different *kind* of thinking that we could backtrace?  What if those equations are just like another ‘culture’ or ‘language’ that sees the same reality in a different, but no less valid, way that we could explore and understand? I think that could be an interesting discussion for another entry.

This instance reminds us that there are very important philosophical principles behind what is considered scientifically known and not.  Principles that have real and interesting effects; and depending on when/where you lived, there were/are very different requirements for what is considered knowledge.

In case you’re interested, philosophically, this question of what is knowing is called Epistomology – and might be worth a look.  (Is my philosophy undergrad work showing?)

Really? We’re still worried about path variables, and that they have a maximum length?

Really? We’re still worried about path variables, and that they have a maximum length?

I mean, come on already.  I have 8 gigabytes of memory in my machine; and 3 terabytes of storage.  Yet, I just spent 30 minutes getting hosed by an (admittedly poorly written/buggy) installer because I’d exceeded my DOS path length in Windows 7.  Yes, here’s the official solution to an error if you install the Intel Compiler and get this message:

Unable to install the integration into Visual Studio. Failure in “<blahblah>integrate.bat” “<blahblah>Microsoft Visual Studio 9.0Common 7Tools”

If you see it, do this:

Because some others seen the same problem, I’m posting the solution and the rootcause here.

The rootcause: our installation adds the “bin” directories to the “path” environment variable. so after installed many compiler updates, the “path” exceeded the max and the “C:Windowssystem32;C:Windows;” dirs got pushed out; and potentially off the end of the path.

The solution:
1. uninstall the last compiler update that has reported the error
2. clean-up the “path” to remove all the bin directories added by Intel Compiler installation.
As for how to clean up, goto the property dialog of “my computer”.
make sure the system directories are there.
3. install the compiler update again: it will add the bin dir again. this is so you can run your program without adding the bin dir.

The installation of newer compiler does check the length of “path” if I remember correctly. But I need to verify this.

But I mean – why am I still losing productivity with this kind of bug?  Haven’t we the technology to make a path variable as long as we want now?  Ring, ring!  Hello?  1984 called and wants its operating system back.

Seriously…what?

Seriously…what?

Rant mode on:

Microsoft, we’ve been friends.  Good friends in fact – for many years.  And that one time we got drunk at the bar and … well.  But you’re doing me wrong.  Not just wrong, your KILLING ME.  WHAT THE F* IS WRONG WITH YOUR SEARCH IN WIN7 (and to lesser degree Vista)???

Why is it if I want to find a real, honest file, I need to open a command prompt and type: ‘dir fileIwanttofind.dae /s’ to actually find the thing?   Why is it if I type the filename in the ‘search’ box of my file explorer YOU NEVER SEEM TO FIND IT.  EVEN IF I POINT YOU TO THE RIGHT DIRECTORY.  EVEN IF I GO TO ADVANCED AND SELECT ALL THE CRYPTIC OPTIONS.  What. The. Hell.  You can’t even find a file anymore.

I was trying to walk a friend through a virus attack the other day (which turned out just to be a HORRIBLY written app), and needed to delete an auto-starting program called foo.exe.  I had her type it into the search dialog.  No luck.  I had her open the advanced options and select system+hidden files  – no luck.  We tried wildcards like foo.* and so forth – no luck.  I had her open the dos prompt and type the search in – bam – answer in 2 seconds.

You have this crazy service running constantly scanning and indexing my drives, you have search helper services running all the time and chewing up resources – but you can’t find a single file when I look for it.  I ALWAYS end up resorting to a seperate tool or command prompt.

How did you get so messed up?  Are you drunk? What’s wrong with you?

Launching a business from your idea in a nutshell

Launching a business from your idea in a nutshell

Sure, it obviously is a bit simplistic, but at it’s core, this is one of the best short descriptions of how you should go about converting your software idea into a business – and when not to – in as few as words as I have seen.

Quoted here for availability:

I’ll save you the time of getting an MBA (note this primarily applies if you are building a B2B product company, consumer is much harder to validate):

Before you start your new company, figure out what your product is, then figure out who will buy it (I mean, who is the specific person in an organization that would need to make a purchase decision). Then, go talk to 2 or 3 of those people.

At this stage, if you can’t figure out who those people are, then you have a problem that isn’t going to go away once you’ve spent 12 months building your product. You have no market, do something else.

If you can’t get a meeting with those people, then you also have a problem that isn’t going to go away after you’ve built your product. You can’t penetrate your market, do something else.

When you get a meeting with them, don’t try to pitch them your idea. Tell them that you are exploring a market opportunity, and that you’d like to describe a product and ask them if they would buy it. Make it clear to them that they are very welcome to say “no, I won’t buy that”. In fact, you should try to get them to tell you they won’t buy it. If they tell you they won’t buy it, your market doesn’t want it, do something else.

If they say they’ll buy it, ask them if they would sign a non-binding letter of intent saying that if you build the product, and it does what you say it will do, that they will purchase it. This commits them to nothing, but these LoIs are gold if you are ever pitching investors. They are also a robust sign that they aren’t just telling you what you want to hear. If they won’t sign LoIs, then they weren’t serious when they said they’d buy your product, your market doesn’t want it, do something else.

Get 2 or three LoIs in your back pocket, then you’re ready to quit your job and start your business.

I guess the key idea here that most entrepreneurs miss is that you really need to vet your own ideas. Many aspiring entrepreneurs dream up an idea, and then stick to it doggedly, either because its the only idea they have, or they find it technically interesting. They don’t want to discover that it won’t work, so they don’t try to figure it out! This is a bit like writing some code, and then not testing it because you really don’t want to discover that its buggy.

The one thing worse than not starting a company is wasting 6 or 12 months of your life on an idea that has no market. Be smart, and do your due diligence on your own ideas before you take the plunge and start a company.

And one guy responds:

Fantastic. Pure gold. But I’d like to add some stuff on the other side about avoiding bullshit.

The business field is absolutely chock full of narcissistic idiots. The tech field is particularly bad because we had a big bubble about 10 years ago and the field is still full of get-rich-quick morons. Do not listen to these people.

How to spot them? They’re fast talkers, make lots of promises, pad their resumes, name drop like mad, and if you probe a bit you find out that they really don’t know what they’re talking about.

Most of them position themselves as middle-men who will “get you funded” or as “business accelerators.” A few pretend to be entrepreneurs themselves, but what they’re really looking to do is get someone entangled with them so they can ride. They’re almost never willing to do any real work. (This is another red flag.) In the valley the slang for them is “wantrepreneurs.”

http://gawker.com/315809/wantrepreneur

http://valleywag.gawker.com/archive/ustream’tv/whats-a-wantrepreneur-ask-ustreamtvs-founders-326951.php

You want hackers at first, preferably ones who know a little bit about business. Then you want sales contacts who will go out and sell for you in exchange for some commission. The latter should be familiar with your target market. You’ll probably meet them when you’re doing the parent post’s advice.

Remember: it’s easy to get someone to sell for you. Just give them a cut. They don’t even have to be a “salesman” per se. They just have to have a market available to them. For them, it’s all upside and very little downside. Structure the deal this way, and people will sell your product (if it has value to anyone that is).

Finally, a lot of bullshit circulates about the subject of business. This is business, in a nutshell:

To succeed in business, what you need is: 1) a product or service that people want and are willing to pay for, and 2) a way of delivering that product or service such that the amount of money you take in is larger than the amount of money it costs to deliver it.

That’s it. There are a lot of tangential ideas, but most of them “orbit” that one. (marketing, sales, margins, etc.) There’s also the topic of financing, equity, investment, and exits, but you don’t even need to go there until you have the big thing down or until you have some idea of how you’re going to get there.

The whole cult of the ever-ephemeral “what it takes” to succeed in business (hand-wave, hand-wave, bullshit, bullshit), “other peoples’ money,” etc. is just the aforementioned narcissistic idiots blowing hot air. Ignore it. Business ideas are like chemical reactions, and money is like energy. If a reaction is exothermic, it’s a source of energy. If a reaction is endothermic, it consumes energy. Same goes with profitability and money. That’s it. All the rest is bullshit. Bad business ideas are bad, and no amount of narcissistic bullshit will change that. Good business ideas are good, and if they are executed well then “normal” non-sociopaths can make them work just fine. Execution is mostly a matter of hard work, good planning, attention to detail, multi-tasking, and a lot of “boring” management stuff.