Can I get the version of Z3 after starting it with the options -smt2 -in? Something like
(get-z3-version)
; Z3 4.3.2 x64 // Desired reply
In the SMT-LIB 2.0 front-end, we can use the command
(get-info :version)
This command is part of the standard, and should also work for other solvers.
We can test the command here.
We can also use the command line option -version. Example:
z3 -version
>> Z3 version 4.3.1
Related
I am working on a remote Linux server where I have my application running in parallel with MPI. I want to profile it and test how good is the load balance in each MPI process and which are the heaviest parts of the code.
To run my application in parallel I usually run it like this:
mpirun -n # ${location}/myApp arg1 arg2 etc.
In the machine there is a module about Intel Advisor which I am going to use. The GUI command
advixe-gui does not work so I have to do it with advixe-cl
In case is helpful, when I type:
advixe-cl
it returns me this:
Intel(R) Advisor Command Line Tool
Copyright (C) 2009-2019 Intel Corporation. All rights reserved.
Usage: advixe-cl <--action> [--action-option] [--global-option] [[--] <target> [target options]]
Use --help for details.
Any idea about how to proceed further with profiling?
You have to use Advisor's command line (advixe-cl) and you have to "wrap" your advixe-cl command line by mpirun. And you can copy and view obtained profiles with GUI afterwards - with individual "result view" for each rank profiled.
You can "wrap" the command line in few ways, for example (Intel MPI specific):
$ mpirun -n 1 -gtool "advixe-cl -collect survey -no-auto-finalize -project-dir /user/test/vec_project:0" /user/test/vec_samples/vec_samples
or (generic MPI with SLURM):
$ srun –n 1 –c 32 advixe-cl --collect=survey --project-dir=./adv -- ./miniFE.x
This topic is described in many details (including selective rank analysis or e.g Cray or Intel MPI specifics) in following Intel "Cookbooks" and articles:
Intel MPI-specific : Analyzing Intel MPI applications with Intel Advisor
Generic MPI, SLURM, for famous WRF workfload: Analyze Vectorization and Memory Aspects of an MPI Application "cookbook"
Advisor for MPI apps on Cray system: Analyze Performance on Cray Systems "cookbook"
Advisor Documentation chapter
Yet another article
You need to provide an action in the command line - it is not optional according to the syntax:
$ advixe-cl <--action> [--action-options] [--global-options] [[--] target [target options]]
Where action would be to either collect or report. And each command has exactly one action. For example, you cannot use both the collect and report actions in the same command.
You can review the User Guide for Advisor here.
I want to set a a break-point in the C implementation for model.matrix. I tried Selva's solution in How can I view the source code for a function?:
> debug(C_modelmatrix)
Error in debug(C_modelmatrix) : object 'C_modelmatrix' not found
> debug(modelmatrix)
Error in debug(modelmatrix) : object 'modelmatrix' not found
The function I'm interested can be found here.
SEXP modelmatrix(SEXP call, SEXP op, SEXP args, SEXP rho
I'm building and running from R source code. How do I set a break-point?
There is still-useful video tutorial by Seth Falcon on how to debug R packages with native code which shows this.
In essence, launch R with R -d gdb to invoke the gdb debugger which you then instruct to set breakpoints in the right places.
If you (or your operating system) prefers a different compiler, you obviously need to substitute it in the invocation: R -d lldb.
I think Dirk's answer is perfect. Note that gdb is not supported in OS-X, we'd have to use lldb.
> /bin/R -d lldb
> b modelmatrix
> r
Now, run any one-factor ANOVA experiment to trigger the breakpoint.
The RFC from May 2015 Y. Nir et al, ChaCha20 and Poly1305 for IETF Protocols
(https://www.rfc-editor.org/rfc/rfc7539) contains a reference to the MIT/Public domain C library https://github.com/floodyberry/poly1305-donna.
I am just porting the C code to Pascal. The 8 bit code works OK (self-test, example, and RFC test vectors).
The port from poly1305-donna-16.h using 16->32 bit multiples and 32 bit additions failed. After some testing I compiled the original source with DJGPP GCC 4.7.3, MS VC 6.0 and BC 3.1 and all three failed too (poly1305 self-test).
Questions: Does this C version (build with -DPOLY1305_16BIT) fail for other compilers too? Is there a known fix available? (The blog of the author Andrew Moon at https://floodyberry.wordpress.com/ is inactive since 6 years)
I can confirm a build failure on a pretty vanilla Fedora 22 system:
% gcc poly1305-donna.c -c -DPOLY1305_16BIT
% gcc example-poly1305.c -o ex poly1305-donna.o -DPOLY1305_16BIT
% ./ex
poly1305 self test: failed
Notice that the test succeeds when I omit -DPOLY1305_16BIT.
Also notice:
% uname -rmp
4.0.8-300.fc22.x86_64 x86_64 x86_64
% gcc --version
gcc (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
I suggest you submit a bug report. Andrew has been responsive in the past.
EDIT:
Compiling with clang version 3.5.0 yields the same results as the above gcc test.
I try to create a shared memory about cygwin in a Windows 7 environment. I compile it as normal c-program, all is working fine. If I try to call the function as R-Extension, the shmget-function is going crashed. The next step is to use semaphore. I hope this will run as well, if I solve this problem.
Is there any compiler option or something like else what I have to do? Maybe, have I to change the mingw to cygwin in R or what can I do. I'm really frustrated!
Actually I try to compile the extension with:
R CMD SHLIB wrappers.c IPC.c -Wall -pthread
And this is the problem child:
_smID = shmget(SHAREDMEMORYID, sizeof(struct sSharedMemory), IPC_CREAT |0666);
My R version:
_
platform x86_64-w64-mingw32
arch x86_64
os mingw32
system x86_64, mingw32
status
major 3
minor 1.0
year 2014
month 04
day 10
svn rev 65387
language R
version.string R version 3.1.0 (2014-04-10)
nickname Spring Dance
cygwin is up to date.
I am trying to get the last modified time from a file in Clojure, by executing a Java command.
By using java.io.File.lastModified I am supposed to be able to get the UNIX-time, this does not work by execution of the script or in the REPL.
My code is:
(java.io.File.lastModified "/home/lol/lolness.txt")
and my error is:
java.lang.ClassNotFoundException: java.io.File.lastModified (NO_SOURCE_FILE:24)
(java.io.File.separator) works, however.
EDIT:
Clojure version 1.2.0-master-SNAPSHOT
Java version OpenJDK 1.6.0
lastModified is a method of java.io.File objects. To access it in Clojure, use the following syntax:
(.lastModified (java.io.File. "/home/lol/lolness.txt"))
Note that the namespaces clojure.contrib.java-utils (1.1) / clojure.java.io (bleeding edge) provide a function file which makes the creation of java.io.File objects more convenient. Since you're on the bleeding edge, the following should work for you:
(require '[clojure.java.io :as io])
(.lastModified (io/file "/home/lol/lolness.txt"))