technical problem using intel parallel studio with cilk_spawn - spawn

I work with intel parallel studio 2011 and I included:
#include <cilk/cilk.h>
which seemed to be included just fine.
Then I tried using the command:
cilk_spawn (and also _Cilk_spawn)
and got the following error:
Error: identifier "_Cilk_spawn" is undefined.
Does anyone know how to solve this problem?

"Some mysterious problem with the text view which makes look like it is a syntax error" which you refer to in the comment probably means that Microsoft's Intellisense cannot recognize Cilk keywords, which are Intel's extension to C/C++.
I was unable to find any fix or workaround for that, so suggest you ask at Intel's Cilk Plus forum; maybe Intel Parallel Studio can take care of it. Also see a bug report to Microsoft.

Related

What's different between -d.lib and just normal like SFML-system.lib?

I'm just starting to learn SFML with Visual Studio. I am faced with problems that my image doesn't loaded with texture.loadFromFile("path"). I found that someone solved this by changing every sfml-~~.lib in linker-input-additional dependency, to sfml-~~-d.lib. So I changed it and solved it! Now I'm wondering what makes the difference: What's "-d"?
-d is the debug library.
As stated on their installation tutorial:
It is important to link to the libraries that match the configuration: "sfml-xxx-d.lib" for Debug, and "sfml-xxx.lib" for Release. A bad mix may result in crashes.
SFML and Visual Studio

Trouble getting started with Lua

I wanted to learn Lua so I bought a book. The problem I'm having is finding a compiler/interpreter. I downloaded the binary compiler for Windows from http://luadist.org/ (Windows x86 (MinGW32 4.7.1)). But every time I try to start it up I just says:
The program can't start because lua53.dll is missing from your
computer. Try reinstalling the program to fix this problem.
Which I did several times to no avail. I've tried to find another compiler but this seems to be the only one... which I find hard to believe. There are "demo" compilers but I want one I can install so I can do the examples in the book. There are instructions on how to "compile" the compiler at the Lua site on Linux and Mac machines but I'm working on a Windows machine.
Any help?
ZeroBrane Studio is the best for Lua. It works on Windows, Mac, and Linux. It was specifically designed for beginners, but it a full featured IDE for writing and debugging Lua code.
https://studio.zerobrane.com/
Be sure to try the "Run as Scratchpad" feature which provides a "live-coding" experience.

z3 MaxSAT example error

I'm interested in playing around with the MaxSAT/MaxSMT c example (specifically, maxsat.c) provided on the z3 (Microsoft Research) website. Using Visual Studio 2010, I eventually got the example to compile (using a fresh install of z3 4.0). However, I can't get any of my (SMT 2.0) models to run using them. Further, I cannot get the example posted in this question to work either.
In the first case, my compiled program crashes when it tries to call Z3_get_smtlib_num_formulas in get_hard_constraints of the file. I don't know why, instead, I get the standard windows 7 "this program has stopped working" popup.
In the second case, it reports unsupported ;benchmark.
In order to help me to get this work, I was wondering if
(a) Has anyone had similar issues when compiling this code, and if so, how did you resolve them?
or
(b) How can I debug either compilation of the file (assuming it is correct)? Namely, can someone enumerate the correct libraries (and library versions - e.g., z3 4.0?) to include in the compiler options to get this example working?
In either case, information on the error reported in the second case would also be appreciated: what does it mean exactly? The keyword was not valid? That the SMT input is the wrong version? Or something else?
Thanks.
The MaxSAT example has not been updated to SMTLIB 2.0 yet. It uses the function Z3_parse_smtlib_file to parse the input, which means that it supports only SMTLIB 1.0 at the moment.
This example is distributed alongside Z3, i.e., you should have received a copy in Z3-4.0/examples/maxsat/, which also contains compilation and execution scripts.
Compilation should be straight-forward by running build.cmd in a Visual Studio Command Prompt, or build.sh on Linux.

F#'s fshtmldoc.exe using Mono/OS X

This is doubtless something obvious, but downloading the F# PowerPack from codeplex and running fshtmldoc produces this error:
clements$ mono ./fshtmldoc.exe FSharp.PowerPack.dll
Processing 'FSharp.PowerPack.dll'...
Unexpected failure while writing HTML docs: An exception was thrown by the type initializer for Microsoft.FSharp.Metadata.AssemblyLoader
This is using mono 2.6.3, F# 2.0 1.9.9.9, & OS X 10.6.3 on a 32-bit intel processor.
Any help would be appreciated.
Many thanks,
John Clements
(repost from powerpack online discussion group--no response there)
At IntelliFactory we are so fed up with fshtmldoc.exe that we started an alternative project:
https://bitbucket.org/IntelliFactory/if-doc
It is still in beta but it quickly approaching being useful. I have not tried it on Mono yet but am interested in supporting it on Mono.
The key difference between our tool and fshtmldoc is that our tool uses Mono.Cecil instead of linking to the assemblies being documented. This means that it does not fail when those assemblies are in a different folder or their references are missing.

Anyone got --standalone option to work in F# CTP?

I may have this completely wrong, but my understanding is that the --standalone compiler option tells the compiler to include the F# core and other dependencies in the exe, so that you can run it on another machine without installing any 'runtime'.
However, I can't get this to work in the CTP - it doesn't even seem to change the size of the output file (docs I've read say about 1M extra).
"Google may know, but if it does, it ain't telling, or I'm not looking in the right place"
UPDATE:
It seems to work with latest CTP update 1.9.6.2
UPDATE2:
I have since experienced another error:
FSC(0,0): error FS0191: could not resolve assembly Microsoft.Build.Utilities.
If you get errors like this when trying to compile --standalone, you need to explicitly include them as references in your project.
Answer from MS:
There is a CTP update 1.9.6.2 that fixed some --standalone bugs.
I'm reinstalling now...
UPDATE:
Works for me - so the my accepted answer is download CTP update 1.9.6.2.
F# manual: Statically linking the F# library using "--standalone"
Did you try to run peverify.exe utility?
This has been a pet hatred of mine for a long time (it has been broken in every CTP release ever including the latest 1.9.6.16 May 2009 release). The "solution" is essentially to write your own build system that is not broken.
This is a real problem for me because I have accumulated hundreds of great F# programs that I would like to put on our site but it takes hours to build each one into a standalone executable.

Resources