<div dir="ltr"><div>Hello,</div><div><br></div><div>Thank you for your response. The command used was:</div><div> $ ./test_primeFactors_gmp 1234567</div><div>A listing for test_primeFactors_gmp.m appears below.</div><div>I too suspect the needed grade is not installed. You</div><div>can see from the list of 10 installed grades what's</div><div>there, but the file was compiled two years ago on a</div><div>different system and I don't know what grades it had.</div><div><br></div><div>I tried to recompile but it told me that there was</div><div>nothing to compile. Perhaps I can make a trivial change</div><div>to the file and recompile.</div><div><br></div><div>How does one know or find out what grade is used when </div><div>compiling when no particular grade has been specified?</div><div><br></div><div>Best regards,</div><div>Robert Buckley</div><div><br></div><div><br></div><div>%----------------------------------------------------------------------%</div><div>% language: Mercury</div><div>% module: test_primeFactors_gmp</div><div>% file: test_primeFactors_gmp.m</div><div>% version: 20 MAY 2015 @ 10:10PM</div><div>% purpose: tests the function primeFactors/1</div><div>%----------------------------------------------------------------------%</div><div><br></div><div>:- module test_primeFactors_gmp.</div><div><br></div><div>:- interface.</div><div><br></div><div>:- import_module io.</div><div>:- pred main(io::di, io::uo) is det.</div><div><br></div><div>%----------------------------------------------------------------------%</div><div><br></div><div>:- implementation.</div><div><br></div><div>:- import_module bool, char, int, gmp_int, list, math, require, string.</div><div>:- import_module primes_gmp.</div><div><br></div><div>%----------------------------------------------------------------------%</div><div>main(!IO) :-</div><div> command_line_arguments(Args, !IO),</div><div> filter(is_all_digits, Args, CleanArgs),</div><div> Arg1 = list.det_index0(CleanArgs, 0),</div><div> M = gmp_int.det_from_string(Arg1),</div><div> %--------------------------------------------------------%</div><div> % TEST THE PRIMEFACTORS FUNCTION</div><div> % $ ./test_primeFactors_mpm M</div><div> %--------------------------------------------------------%</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>( P = primeFactors(M) -></div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span> io.format(" primeFactors(%s) = [",</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>[s(gmp_int.to_string(M))],!IO),</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span> io.write_string(string.join_list(", ", </div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span> map(gmp_int.to_string, P)), !IO),</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span> io.write_string("].\n", !IO)</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>;</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span> io.format(" primeFactors(%s) failed.\n", </div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span> [s(gmp_int.to_string(M))],!IO)</div><div><span class="gmail-Apple-tab-span" style="white-space:pre"> </span>).</div><div><br></div><div>%----------------------------------------------------------------------%</div><div>:- end_module test_primeFactors_gmp.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 6, 2017 at 11:09 AM, Tomas By <span dir="ltr"><<a href="mailto:tomas@basun.net" target="_blank">tomas@basun.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I think you need to post the exact command you are trying to execute.<br>
<br>
The problem is likely to be that you do not have the right grade installed.<br>
<br>
/Tomas<div><div class="h5"><br>
<br>
<br>
<br>
On 2017-06-06 19:48, Robert Buckley wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hello,<br>
<br>
Have Mercury-14.01.1 installed under Ubuntu 16.04.2-desktop-AMD64<br>
under VMWare Fusion ver. 8.5.7 on an early 2009 MacPro running OS X<br>
ver. 10.11.6.<br>
<br>
Have the following grades installed:<br>
libgrades=erlang,hlc.gc,hlc.gc<wbr>.trseg,reg.gc,reg.gc.debug.sts<wbr>eg,reg.gc.decldebug.stseg,reg.<wbr>gc.memprof,reg.gc.prof,reg.gc.<wbr>trseg<br>
<br>
Most things work correctly, so far as I can tell. But I'm getting the<br>
following error message:<br>
error while loading shared libraries: libmer_std.so: cannot open<br>
shared object file: No such file or directory<br>
<br>
There are multiple copies of libmer_std.so:<br>
<br>
robertbuckley@ubuntu:~/Applica<wbr>tions/Sources/Mercury/gmp$ locate<br>
libmer_std.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/hlc.gc/libmer_std<wbr>.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/hlc.gc.pregen/lib<wbr>mer_std.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/hlc.gc.trseg/libm<wbr>er_std.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/reg.gc/libmer_std<wbr>.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/reg.gc.debug.stse<wbr>g/libmer_std.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/reg.gc.decldebug.<wbr>stseg/libmer_std.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/reg.gc.memprof/<wbr>libmer_std.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/reg.gc.prof/libme<wbr>r_std.so<br>
/usr/local/mercury-14.01.1/lib<wbr>/mercury/lib/reg.gc.trseg/libm<wbr>er_std.so<br>
/usr/local/mercury-srcdist-14.<wbr>01.1/library/libmer_std.so<br>
<br>
If this is a known problem, is there a work-around, and if so, what is<br>
it?<br>
<br>
Best regards,<br>
Robert Buckley<br></div></div>
______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@lists.mercurylang.org" target="_blank">users@lists.mercurylang.org</a><br>
<a href="https://lists.mercurylang.org/listinfo/users" rel="noreferrer" target="_blank">https://lists.mercurylang.org/<wbr>listinfo/users</a><br>
</blockquote>
</blockquote></div><br></div>