The fzn2smt tool allows one to solve flatzinc formulas via Yices.
When I try to run it, the solver answers with UNKNOWN to every formula I test. e.g.:
~$ java -Xmx4096M fzn2smt -ce "./yices-2.5.2/bin/yices -f" -i 2DPacking.fzn
Time1:170
=====UNKNOWN=====
However, on the given example, it seems to correctly create the 2DPacking.fzn.smt instance in the same directory of the 2DPacking.fzn file:
~$ ls
2DPacking.fzn.smt 2DPacking.fzn 2DPacking.mzn 2DPacking.ozn
If I manually run Yices over the smt formula, I get a positive result:
~$ yices-smt -f 2DPacking.fzn.smt
sat
(= x____00002_6_ 0)
...
IMPLICANT:
(>= x____00003_4_ 0)
...
Q: Does anyone else have experience with fzn2smt and know how to fix this issue?
Just to be sure that the issue I am experiencing is not due to the installation part, I will share it here:
main_dir
main_dir/fzn2smt-2-0-02 # unpacked fzn2smt files
main_dir/antlr # unpacked antlr-runtime-3.5 files
main_dir/yices-2.5.2 # unpacked yices files
I also modified the environment variables as requested by the tool instructions:
PATH=${main_dir}/yices-2.5.2/bin/:${PATH}
PATH=${main_dir}/fzn2smt-2-0-02/:${PATH}
CLASSPATH=${main_dir}:${CLASSPATH}
CLASSPATH=${main_dir}/antlr:${CLASSPATH}
CLASSPATH=${main_dir}/fzn2smt-2-0-02:${CLASSPATH}
As #Dekker suggested in the comments, the issue is due to fzn2smt seemingly not being updated in a while.
After some trials and errors, I found out that the most recent version of Yices that appears to be compatible with fzn2smt is version 2.2.1.
It can be executed as follows:
~$ java -Xmx4096M fzn2smt -ce "./yices-2.2.1/bin/yices-smt -f" -i 2DPacking.fzn
Time1:162
Time: 207
Pos: 0
item = array2d(1..2, 1..4, [0, 0, 0, 0, 1, 1, 1, 1]);
obj = 1;
----------
Time: 223
Pos: 0
item = array2d(1..2, 1..4, [0, 0, 0, 0, 1, 1, 1, 1]);
obj = 1;
----------
==========
Time2:228
Originally, fzn2smt was coupled with version 2 of Yices presented at the SMT-COMP 2009. To use that version, the command-line instruction to use the tool is slightly different:
~$ java -Xmx4096M fzn2smt -ce "./yices2smt09/bin/yices -f" -i 2DPacking.fzn
Time1:160
Time: 208
Pos: 0
item = array2d(1..2, 1..4, [0, 0, 0, 0, 1, 1, 1, 1]);
obj = 1;
----------
==========
Time2:223
Notice that
the executable is named yices here, rather than yices-smt
the output is slightly different, for some reasons the solution is printed more than once when using the newer version of the tool
Old versions of Yices can be downloaded from here.
Related
I am getting below error while running an executable in solaris :Illegal Instruction (core dumped)
When i use pstack command to check the core file i get below info:
ffffffff7f501f20 ???????? (0, 0, 0, 0, 0, 0)
0000000000000000 ???????? (0, 0, 0, 0, 0, 0)
pstack: warning: librtld_db failed to initialize; symbols from shared libraries will not be available
I have compiled the makefiles in different linux and generated executable and tried running there and it is running successfully without any issues.
could someone please let me know how to resolve this as the issue is coming only in Solaris.
I have a code in Fortran (program.f) and I have compiled it with Eclipse in \ubuntu 16 and in Windows 7.
The Eclipse configuration for Ubuntu is the follow:
GNU Fortran Compiler: gfortran
Include paths(-l) : /usr/lib/openmpi/include
GNU Fortran Linker : mpif90
Tool Chain Editor : GCC Fortran
The Eclipse configuration for Windows is the follow:
GNU Fortran Compiler: gfortran
Include paths(-l) : C:\cygwin64\usr\include
GNU Fortran Linker : mpif90
Tool Chain Editor : GCC Fortran
When I execute the program in Ubuntu, the program works how it is expected.
In Ubuntu the program is executed with 2 processors by doing
$ mpiexec -np 2 myprogram
And the behavior is the follow
$ mpiexec -np 2 myprogram
There are 2 processors running this job.
Rank# 1 d1= 65 d2= 128
Rank# 0 d1= 1 d2= 64
Where d1 and d2 are pieces of the problem domain assigned to each processors. In this example the total domain is 128. The domain was assigned from 1 to 64 to processor 0, and from 65 to 128 to processor 1. This is the expected behavior: the model of 128 are divided in 2, from 1 to 64 to processor 0, and from 65 to 128 for the processor 1.
For the other hand, in Windows, after compile the code using the mentioned specifications, I execute the program by doing:
$ mpiexec.exe -n 2 myprogram.exe
And the behavior is the follow
$ mpiexec -np 2 myprogram
There are 1 processors running this job.
Rank# 0 d1= 1 d2= 128
Rank# 0 d1= 1 d2= 128
We can see that the behavior is different: the program executed in Windows is not running in parallel as it is expected. In the terminal we can see that 1 processor is running the program, and the domain is assigned as follow: from 1 to 128 (whole domain) to processor 0 and, from 1 to 128 (whole domain again?) to processor 0. This is the problem that I am trying to solve. I am trying to have the same behavior that I have in Ubuntu.
The mpiexec.exe program for Windows was obtained from the official installer MS-MPI.
The gfortran and the OpenMPI libs for Windows were obtained by using cygwin
I tried to change the GNU linker and the compiler in Eclipse for Windows and does not work. I tried to run the code in others machines with Windows 10 and problem is the same.
Any suggestions on how to try solve this issue?
As mentioned by #jcgiret there are a consistency problem: the program is compiled using OpenMPI and it is executed with MS-MPI.
To solve this issue the code was executed using the equivalent to mpiexec defined in the openmpi package:
usr/bin/mpiexec -> orterun.exe
The program is executed in windows by
$ orterun.exe -n 2 myprogram.exe
Then the results is the same that obtained in Ubuntu:
$ orterun.exe -n 2 myprogram.exe
There are 2 processors running this job.
Rank# 1 d1= 65 d2= 128
Rank# 0 d1= 1 d2= 64
I am having some issues installing Bio-DB-HTS (https://github.com/Ensembl/Bio-DB-HTS) requried to run a perl script from a cloned git repository.
System & Perl information
I am on Mac OSx High Sierra v.10.13.6 and using perl 5, version 18, subversion 2 (v5.18.2). I have added this information in my original question now.
Background information
When trying to perform a local installation, according to README instructions, i receive the error...
git clone https://github.com/Ensembl/Bio-DB-HTS.git
cd Bio-DB-HTS-2.10
perl INSTALL.pl
lzma.h library header not found in /usr/include
I tried to install the LZMA library but found that it actually was installed and that the lzma.h header file was simply missing from the path /usr/include. As LZMA is deprecated and replaced with XZ I installed the XZ library
brew install xz
After a quick search i found the lzma.h header in...
/usr/local/Cellar/xz/5.2.4/include/lzma.h
Main Issue
Now this is where I am not sure of how to proceed and if I have messed up something while trying to get around this. Since /usr/include has a directory with restricted access I added a line in the INSTALL.pl script to check existence for the file in both locations (which could probably disrupt something downstream in the analysis as I didn't change anything else except the if condition. However, when running the install this time i ran into a new problem.
perl INSTALL.pl
BioPerl does not seem to be installed. Please install it and try again.
On Debian/Ubuntu systems you can do this with the command:
apt-get install bioperl
On other systems use the CPAN shell:
perl -MCPAN -e 'install Bio::Perl'
And this is where my main issues reside. When trying to install Bio:Perl using cpan tests fail at various stage and I'm not sure which ones are the essential ones. The last lines from the output are
Result: FAIL
Failed 3/325 test programs. 16/19945 subtests failed.
CJFIELDS/BioPerl-1.007002.tar.gz
./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module,
try:
reports CJFIELDS/BioPerl-1.007002.tar.gz
Running Build install
make test had returned bad status, won't install without force
I reconfigured cpan to install dependancies automatically as mentioned here How do I tell CPAN to install all dependencies?.
perl -MCPAN -Mlocal::lib=~/perl5 -e 'my $c = "CPAN::HandleConfig"; $c->load(doit => 1, autoconfig => 1); $c->edit(prerequisites_policy => "follow"); $c->edit(build_requires_install_policy => "yes"); $c->commit'
And tried installing again forcing installation...
perl -f -MCPAN -e 'install Bio::Perl'
But I just get the same error
Result: FAIL
Failed 3/325 test programs. 16/19945 subtests failed.
CJFIELDS/BioPerl-1.007002.tar.gz
./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module,
try:
reports CJFIELDS/BioPerl-1.007002.tar.gz
Running Build install
make test had returned bad status, won't install without force
When I look at what modules have been installed using...
cpan -l
Bio::DB::HTS 2.11
Bio::DB::HTS::ReadIterator 2.11
Bio::DB::HTS::VCF 2.11
Bio::DB::HTS::Faidx 2.11
Bio::DB::HTS::PileupWrapper 2.11
Bio::DB::HTS::Alignment 2.11
Bio::DB::HTS::ConfigData undef
.
.
.
Bio::DB::HTS::VCF::Iterator 2.11
Bio::DB::HTS::VCF::Row 2.11
I can see that many of the ones I need from the Bio-DB-HTS package are there (assuming that they were one of the succesful installations when isntalling Bio::Perl) but now it prompts the error
Can't locate Bio/SeqFeature/Lite.pm in #INC
However, I never manage to actually get Bio:Seq nor Bio::Perl installed. I do have some perl knowledge but mostly work on python so I am feeling a bit lost of how to proceed.
Extra information
My cpan installs modules to
/usr/local/perl
And I have added the path to my environment variable
export PERL5LIB=/usr/local/perl
Edited information (failed tests & errors) as response to Shawn
#Shawn, Its a long list of errors, test failures and recommended installations. I I can post some examples of the first couple of errors. I am not really sure what to look neither.
Recommended installations
Checking prerequisites...
recommends:
* Algorithm::Munkres is not installed
* Array::Compare is not installed
* Bio::Phylo is not installed
* Convert::Binary::C is not installed
* GD is not installed
* Graph is not installed
* GraphViz is not installed
* HTML::TableExtract is not installed
* Inline::C (0.53) is installed, but we prefer to have 0.67
* PostScript::TextBlock is not installed
* SVG is not installed
* SVG::Graph is not installed
* Set::Scalar is not installed
* Sort::Naturally is not installed
* Spreadsheet::ParseExcel is not installed
* XML::DOM is not installed
* XML::DOM::XPath is not installed
* XML::Parser::PerlSAX is not installed
* XML::SAX::Writer is not installed
* XML::Twig is not installed
* YAML is not installed
Checking optional features...
EntrezGene............disabled
requires:
! Bio::ASN1::EntrezGene is not installed
MySQL Tests...........disabled
requires:
! DBD::mysql is not installed
Pg Tests..............disabled
requires:
! DBD::Pg is not installed
Here is the test summary report. I did not print the entire list of failed tests as it is extremely long. But What I cans see is that /LocalDB/SeqFeature_BDB.t is a part of the majority of the failed tests when looking at the verbose output.
Test Summary Report
-------------------
t/LocalDB/Fasta.t (Wstat: 1024 Tests: 109 Failed: 4)
Failed tests: 73, 91, 95, 101
Non-zero exit status: 4
t/LocalDB/Index/Index.t (Wstat: 20224 Tests: 36 Failed: 6)
Failed tests: 12-17
Non-zero exit status: 79
Parse errors: Bad plan. You planned 73 tests but ran 36.
t/LocalDB/Qual.t (Wstat: 1536 Tests: 56 Failed: 6)
Failed tests: 7-9, 49-50, 52
Non-zero exit status: 6
t/LocalDB/SeqFeature_BDB.t (Wstat: 0 Tests: 38 Failed: 4)
Failed tests: 17-19, 24
Parse errors: Bad plan. You planned 116 tests but ran 38.
t/Perl.t (Wstat: 512 Tests: 47 Failed: 16)
Failed tests: 28, 28, 28, 28-29, 29, 29, 29-30, 30, 30
30-31, 31, 31, 31
Non-zero exit status: 2
Parse errors: Tests out of sequence. Found (24) but expected (26)
Tests out of sequence. Found (25) but expected (27)
Tests out of sequence. Found (26) but expected (28)
Tests out of sequence. Found (26) but expected (29)
Tests out of sequence. Found (27) but expected (30)
Displayed the first 5 of 23 TAP syntax errors.
Re-run prove with the -p option to see them all.
t/RemoteDB/BioFetch.t (Wstat: 0 Tests: 83 Failed: 47)
Failed tests: 20-21, 21-22, 22-23, 23-24, 24-25, 25-26
26-27, 27-28, 28-29, 29-30, 30, 30, 30-31
31, 31, 31-32, 32, 32, 32-33, 33, 33, 33-34
34, 34, 34-35, 35, 35, 35-36, 36, 36, 36
Parse errors: Tests out of sequence. Found (4) but expected (6)
Tests out of sequence. Found (6) but expected (7)
Tests out of sequence. Found (7) but expected (8)
Tests out of sequence. Found (5) but expected (9)
Tests out of sequence. Found (6) but expected (10)
Displayed the first 5 of 79 TAP syntax errors.
Re-run prove with the -p option to see them all.
t/RemoteDB/GenBank.t (Wstat: 0 Tests: 658 Failed: 614)
Failed tests: 10-11, 11, 11-12, 12, 12-13, 13, 13-14
14, 14-15, 15, 15-16, 16, 16-17, 17, 17-18
18, 18-19, 19, 19, 19, 19, 19, 19-20, 20
20, 20, 20, 20, 20-21, 21, 21, 21, 21, 21
21-22, 22, 22, 22, 22, 22, 22-23, 23, 23
Thanks to everyone that helped out, I managed to figure it out in the end. I will explain the process here from beginning to end incase anyone else has the same issue.
The question I posted was to solve how to install Bio::Perl using CPAN as I was having issues with tests failing. Although I had some issues installing Bio-DB-HTS (which I solved before posting) and I will explain how I managed to install that as well in case anyone comes across the same issue.
It seems that Mac users tend to have an issue with the lzma.h header missing. In the case of installing Bio-DB-HTS. I had to modify a line in the Bio-DB-HTS/INSTALL.pl file that checked for the existence of the lzma.h file. See "Installing Bio-DB-HTS on Mac OSx" below for instructions.
Solving installation of Bio::Perl
Essentially I solved it by reinstalling/reconfiguring my CPAN installation. Although I believe the issue in the end was due to some environment variables that I had not set as I chose to manual sort out my CPAN directory structure, I recommend letting CPAN do this for you using the local:lib option as it will set or tell you how to set the environment variables at the end of the installation.
I had only set one of the environment variables below (PERL5LIB) which was probably the reason for my error. NOTE! that the paths you see below are specific for my system.
PATH="/Users/sjamal/perl5/bin${PATH:+:${PATH}}"; export PATH;
PERL5LIB="/Users/sjamal/perl5/lib/perl5${PERL5LIB:+:${PERL5LIB}}"; export PERL5LIB;
PERL_LOCAL_LIB_ROOT="/Users/sjamal/perl5${PERL_LOCAL_LIB_ROOT:+:${PERL_LOCAL_LIB_ROOT}}"; export PERL_LOCAL_LIB_ROOT;
PERL_MB_OPT="--install_base \"/Users/sjamal/perl5\""; export PERL_MB_OPT;
PERL_MM_OPT="INSTALL_BASE=/Users/sjamal/perl5"; export PERL_MM_OPT;
If you have already it configured like me but what to start from a clean slate you will need to remove the CPAN folder created on the user that you installed cpan on.
/Users/<USERNAME>/.cpan
rm -rf /Users/<USERNAME>/.cpan
Now you should be able to run the cpan command as done at the first instance and get prompted with lots of questions of how you want to set up the installation and this is where you will be able to chose 'local:lib' (if you are able to access sudo you can choose the 'sudo' option as well). I installed cpanm based on multiple recommendations and also since it prompts less question apparently and then installed Bio::Perl. Although I should mention that the installation did failed a test and refused to install so I had to run the force command for it to build Bio::Perl.
cpan -i App:cpanminus
cpanm --force Bio::Perl
You should now have Bio::Perl installed.
Installing Bio-DB-HTS on Mac OSx
The lzma library is deprecated on Mac OSx but has been replaced with the XZ library so if you are missing the file as well you can install XZ using brew. If you don't have brew installed you can find how to install it here https://brew.sh/
brew install xz
You will now have a lzma.h header file in the location where XZ was installed using brew, in my case /usr/local/Cellar/xz/5.2.4/include/lzma.h.
git clone https://github.com/Ensembl/Bio-DB-HTS.git
cd Bio-DB-HTS-2.10
vim Bio-DB-HTS/INSTALL.pl
So, I changed the line using vim...
-e '/usr/include/lzma.h' or die <<END;
to
-e '/usr/include/lzma.h' **|| '/usr/local/Cellar/xz/5.2.4/include/lzma.h'** or die <<END;
NOTE! You have to change '/usr/local/Cellar/xz/5.2.4/include/lzma.h' path to where you have the lzma.h in XZ package just installed using brew. However, I want to clarify that this does not solve anything other than telling the script that the file does exist. The Install script won't be able to make use of the file (if that is what it needs to do) as nothing else has been changed in the installation script.
You should now be able to install Bio-DB-HTS by simply running the perl script as below
cd Bio-DB-HTS-2.10
perl INSTALL.pl
Hope that helps!
Sabri
I'm trying to run a Yocto Raspberry Pi 2 build on qemu-system-arm.
I got this far:
$ qemu-system-arm -version
QEMU emulator version 2.10.1(Debian 1:2.10+dfsg-0ubuntu3.5)
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
$ qemu-system-arm \
-M raspi2 \
-cpu arm1176 \
-dtb ./tmp/deploy/images/raspberrypi2/bcm2709-rpi-2-b.dtb \
-sd ./tmp/deploy/images/raspberrypi2/berrynux-image-raspberrypi2.rootfs.rpi-sdimg \
-m 1G \
-smp 1 \
-nographic \
-kernel ./kernel-qemu \
-append "rw earlyprintk loglevel=8 console=ttyS0 dwc_otg.lpm_enable=0 root=/dev/mmcblk0p2" \
-serial mon:stdio
Execution hangs with:
WARNING:
Image format was not specified for
'./tmp/deploy/images/raspberrypi2/berrynux-image-raspberrypi2.rootfs.rpi-sdimg' and probing guessed raw.
Automatically detecting the format is dangerous for
raw images, write operations on block 0 will be restricted.
Specify the 'raw' format explicitly to remove the restrictions.
The kernel produced by meta-raspberrypi (kernel7.img) immediately breaks qemu with:
qemu-system-arm: Trying to execute code outside RAM or ROM at 0xe0833006
so i'm using kernel-qemu-4.4.34-jessie instead (tried stretch and wheezy, same result - hang)
Not ever sure where to start debugging here, is this even attempting to boot? Can i hammer it to give me some useful output? Do i need a specially baked kernel, and if so, where do i get it from?
strace didn't get me anywhere (or i don't know how to interpret the output):
...
openat(AT_FDCWD, "./kernel-qemu-4.4.34-jessie", O_RDONLY) = 11
lseek(11, 0, SEEK_END) = 3024048
mmap(NULL, 3026944, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f4ed8106000
lseek(11, 0, SEEK_SET) = 0
read(11, "\0\0\240\341\0\0\240\341\0\0\240\341\0\0\240\341\0\0\240\341\0\0\240\341\0\0\240\341\0\0\240\341"..., 3024048) = 3024048
close(11) = 0
access("./tmp/deploy/images/raspberrypi2/bcm2709-rpi-2-b.dtb", R_OK) = 0
openat(AT_FDCWD, "./tmp/deploy/images/raspberrypi2/bcm2709-rpi-2-b.dtb", O_RDONLY) = 11
lseek(11, 0, SEEK_END) = 16693
close(11) = 0
openat(AT_FDCWD, "./tmp/deploy/images/raspberrypi2/bcm2709-rpi-2-b.dtb", O_RDONLY) = 11
lseek(11, 0, SEEK_END) = 16693
lseek(11, 0, SEEK_SET) = 0
read(11, "\320\r\376\355\0\0A5\0\0\0H\0\0;0\0\0\0(\0\0\0\21\0\0\0\20\0\0\0\0"..., 16693) = 16693
close(11) = 0
futex(0x563f38608c3c, FUTEX_WAKE_PRIVATE, 2147483647) = 1
futex(0x563f383d040c, FUTEX_WAKE_PRIVATE, 2147483647) = 1
futex(0x563f384305cc, FUTEX_WAKE_PRIVATE, 2147483647) = 1
ppoll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 5, {tv_sec=0, tv_nsec=0}, NULL, 8) = 0 (Timeout)
futex(0x563f372cac00, FUTEX_WAKE_PRIVATE, 1) = 1
ppoll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 5, {tv_sec=1, tv_nsec=0}, NULL, 8) = 0 (Timeout)
ppoll([{fd=0, events=POLLIN}, {fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 5, {tv_sec=1, tv_nsec=0}, NULL, 8) = 0 (Timeout)
The POLLIN event repeats indefinitely every second.
The SD card image boots just fine on real hardware Pi2.
EDIT
I copied over kernel7.img and bcm2709-rpi-2-b.dtb from the latest Raspbian Stretch image and i'm stil getting the same exact hang. I'm starting to think there's something screwy with my QEMU build - it's the stock Ubuntu 17.10 .deb package.
EDIT #2
Compiled qemu-2.12.0-rc2 from source, same deal. I must be doing something terribly wrong.
"Nothing happens" and "tried to execute from a bogus address" are often the result of either:
misconfigured kernel (is this kernel definitely intended to boot on the raspi2 board, and not on something else?)
something goes wrong in early boot before the kernel manages to produce output (though usually this causes a hang rather than a bad-address output)
For the latter, assuming this really is a raspi2 kernel, you might try using
earlycon=pl011,0x3f201000
in your kernel append arguments. (The Linux kernel can produce earlycon output for the PL011 UART, but not for the raspi-specific 'mini UART'.)
I would suggest also dropping "-nographic" and "-serial mon:stdio" for the moment. Then you can use the graphical UI to check both UART outputs. (You can do this without using the GUI by redirecting them both correctly using two lots of -serial command line options, but then you have to figure out sensible places to send them; the GUI's simpler.) The first serial port will be the PL011, and the second the mini-UART, so if you only tell QEMU where to send the first serial port output and the guest is writing to the second, you'll never see it.
When it comes to QEMU on arm Yocto is tested for versatilepb machine. Therefore, there might be issues for other configs. It is recommended to look into runqemu script for all the options on how qemu is configured to run.
I have a series of experiments that were written for MATLAB, but recently we are trying to run them through Octave instead. I realize they are mostly compatible, but I have been running into a few problems, and none of the online FAQs or directions I have found have addressed these at all. It's complicated a bit because there are multiple .m files that interact; however, for now I am going to focus on the main program. Anyway, so when I try to run the file (MLP.m) through octave, I get the following errors in the Terminal window:
error: dir: expecting directory or filename to be a char array
error: called from:
error: /Applications/Octave.app/Contents/Resources/share/octave/3.2.3/m/miscellaneous/dir.m at line 128, column 5
error: /Applications/MATLAB_R2008a/toolbox/psychoacoustics/MLParameters.m at line 86, column 7
error: /Applications/MATLAB_R2008a/toolbox/psychoacoustics/MLP.m at line 9, column 3
The lines it is referencing are as follows:
1)
d = dir([cd myslash 'Experiments_MLP' myslash '*.m']);
2)
s = MLParameters;
What about these lines is incompatible with Octave? I can't find anything online that indicates that these won't work.
After that, the Terminal window gives me this batch of nonsense:
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /usr/X11R6/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
Referenced from: /usr/X11R6/lib/libfontconfig.1.dylib
Reason: Incompatible library version: libfontconfig.1.dylib requires version 13.0.0 or later, but libfreetype.6.dylib provides version 10.0.0
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71: 1077 Trace/BPT trap GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.2.6" "$#"
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71: 1083 Trace/BPT trap GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.2.6" "$#"
error: you must have gnuplot installed to display graphics; if you have gnuplot installed in a non-standard location, see the 'gnuplot_binary' function
I have GNUPlot installed, and I checked the gnuplot_binary function, which didn't give me any answers. GNUPlot is installed in my /Applications directory, along with Octave itself. Why shouldn't this work? The README file that came with GNUPlot didn't indicate a special directory for it to be installed in. What about the the dyld library not loaded errors? Is that related to the GNUPlot problem, or is it something else?
Anyway, thanks for your help
I know you already solved your problem, but if you have problems again here are some links with basic information about the differences between Matlab and Octave:
Porting programs from Matlab to Octave
Differences between Octave and MATLAB
Addressing your first error, it's easier to explain with an example:
dirName = '/some/path'; %# base directory
filesPath = fullfile(dirName, 'MLP', '*.m'); %# full path string
d = dir(filesPath); %# expand/enumerate files
for i=1:numel(d)
disp( d(i).name )
end
You also could have built the path using string concatenation yourself:
%# '/some/path/MLP/*.m'
filesPath = [dirName filesep 'MLP' filesep '*.m'];
The above should work for both MATLAB and Octave