mma

56 Reputation

4 Badges

15 years, 280 days

MaplePrimes Activity


These are replies submitted by mma

first set

kernelopts(opaquemodules=false): then i saw that maple does not parse the version of the compiler in a correct way. Maple uses the pattern:

> print(Compiler:-Tools:- gccversion_patterns);
[["gcc (GCC) %d.%d.%d.%d", 4], ["gcc-%d.%d.%d.%d", 4], ["gcc (GCC) %d.%d.%d", 3], ["gcc-%d.%d.%d", 3], ["gcc (GCC) %d.%d", 2],

    ["gcc-%d.%d", 2], ["egcs-%d.%d.%d.%d", 4], ["egcs-%d.%d.%d", 3], ["egcs-%d.%d", 2],

    ["powerpc-apple-darwin8-gcc-%d.%d.%d.%d", 4], ["powerpc-apple-darwin8-gcc-%d.%d.%d", 3],

    ["powerpc-apple-darwin8-gcc-%d.%d", 2], ["powerpc-apple-darwin9-gcc-%d.%d.%d.%d", 4],

    ["powerpc-apple-darwin9-gcc-%d.%d.%d", 3], ["powerpc-apple-darwin9-gcc-%d.%d", 2],

    ["i686-apple-darwin8-gcc-%d.%d.%d.%d", 4], ["i686-apple-darwin8-gcc-%d.%d.%d", 3], ["i686-apple-darwin8-gcc-%d.%d", 2],

    ["i686-apple-darwin9-gcc-%d.%d.%d.%d", 4], ["i686-apple-darwin9-gcc-%d.%d.%d", 3], ["i686-apple-darwin9-gcc-%d.%d", 2],

    ["gcc version %d.%d.%d", 3], ["gcc version %d.%d", 2], ["gcc version %d", 1]]

but my gcc gives its version as:

gcc-4.3 (SuSE) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]

so Maple has a problem with the string (SuSE) i.e.  i had to subtitute the gcc link to the gcc-4.3 binary with a shellcript and delete the SuSE string #! /bin/sh
gcc-4.3  $* | sed 's/(SUSE Linux)//' 2. then i discovered that the linker does not  find the 32bit library libm.so, despite that the library exists:  cy := Compiler:-Compile(y),
>
> cy( 1.1 );
ld: skipping incompatible /usr/lib64/libm.so when searching for -lm
ld: skipping incompatible /usr/lib64/libm.a when searching for -lm
Error, recursive assignment so i changed the linker setting from print(Compiler:-Build:-GetBuildVariable("LDLIBS"));
                                                    "-lhf -lmaple -lmrt -lm"

to Compiler:-Build:-SetBuildVariable("LDLIBS","-lhf -lmaple -lmrt /lib/libm.so"):
  and then it worked!!!!
>
> cy( 1.1 );
                                                      2.52999999999999980
This is all very ugly and i wonder whether there exists a nicer solution.  

i pasted not correctly, the dump indeed shows that maple does not get the GCC Version:

Platform: unix
System: IBM_INTEL_LINUX
GCC Version: FAIL
 

 

Hi

thanks for advices. This helps me to get further. Now the generated *.c file is not deleted is remains but i get a linker error now:

y := proc( x :: float ) 2.3 * x end proc:
cy := Compiler:-Compile(y,keeptemps=true)
cy( 1.1 );
cy := Compiler:-Compile(y,keeptemps=true):
ld: /var/tmp/mma-5131/_mc5e1da263822248e59c8a3a2731a39f3.o: No such file: No such file or directory
Error, (in LinkDSO) linker exited with nonzero status 1:
 

and the *.c file does exist indeed:

ls -l /var/tmp/mma-5131/
-rw-r--r-- 1 mma users 768 13. Sep 16:41 mc5e1da263822248e59c8a3a2731a39f3.c


and the options for the compiler are shown below  (I belief the point is that maple can not get the compiler version, which it must get i dont know why)
 

> kernelopts(opaquemodules=false):
> Compiler:-_DumpConfig();

Platform: unix
System: IBM_INTEL_LINUX
GCC Version:    <========= here is nothing !!!!!!
MAPLE_TEMPDIR: <<NULL>>
Temp: /var/tmp
Compile Command: gcc -m32 -c -fPIC -I. -DMCLIENT_DLL_EXPIMP= -DIBM_INTEL_LINUX=1 -I/opt/maple12/extern/include -O2   -w  DUMMY.c -o DUMMY.o
Link Command: ld -m elf_i386 -shared -L. -L/opt/maple12/bin.IBM_INTEL_LINUX  DUMMY.o -o DUMMY.so -lhf -lmaple -lmrt -lm
EXTRACFLAGS:
EXESUFFIX:
LDOUTPUT_FLAG: -o
CPPFLAGS: -I. -DMCLIENT_DLL_EXPIMP= -DIBM_INTEL_LINUX=1 -I/opt/maple12/extern/include
DLLPREFIX: lib
OBJSUFFIX: .o
LDFLAGS: -L. -L/opt/maple12/bin.IBM_INTEL_LINUX
CFLAGS: -w
CCOUTPUT_FLAG: -o
EXTRALDFLAGS:
DLLSUFFIX: .so
LD: ld -m elf_i386
LDLIBS: -lhf -lmaple -lmrt -lm
LDSHFLAGS: -shared
COMPILE_ONLY_FLAG: -c
CCSHFLAGS: -fPIC
CC: gcc -m32
TMPDIR: /var/tmp
CCOPT: -O2
CCDEBUG:
 

 

No, this also does not work.

But i managed to examine things further: If i subtsitute the gcc wrapper (its a link to gcc binary btw.) with a short shell script to see what arguments the gcc will get i see that the gcc compiler indeed is found:

the gcc script looks like this

all="$*"
echo $all 2>&1 1>/tmp/gcc.out
ls -d /var/tmp/* 2>&1 1>>/tmp/gcc2.out
 

and if i look at the output in gcc.out i see the arguments that gcc would get

-m32 -c -fPIC -I. -DMCLIENT_DLL_EXPIMP= -DIBM_INTEL_LINUX=1 -I/opt/maple12/extern/include -O2 -w /var/tmp/mma-12206 /_mc5e1da263822248e59c8a3a2731a39f3.c -o /var/tmp/mma-12206/_mc5e1da263822248e59c8a3a2731a39f3.o

and a directory is created for the generated *.c and *.o file:

drwxr-xr-x 2 mma  users 4096 Sep 13 13:11 mma-12206

but when i look in the directory i can see only  the name "version" like this

---- version

i do not know what this is, a file or directory. Because if i look by hand teh directoy + conetent is deleted

a couple of times i managed to see a generated c file as e.g.

_mc5e1da263822248e59c8a3a2731a39f3.c

but this also is deleted very fast by maple when the directory is deleted. But i did never see the object file *.o file.

If i add the command to start the binary (gcc-4.3 btw) and give him all the above compiler-flags the whole pc crashed i.e. maple starts to swap as hell.
 

 

the gcc which is be called is a kind of wrapper for the cire-gcc itself, if i want that he produces 32bit code (which only function with maple-32bit) i give him the option -m32. Yes i know there is the define_external(COMPILE_OPTIONS) command which i already tried in vane. I already gave him the option -m32 p := define_external(COMPILE_OPTIONS) p[CFLAGS] := "-m32 "; and also the path where the compiler is: p[COMPILER] := "/usr/bin/gcc "; but all did not help. So i ran out of ideas.

the gcc which is be called is a kind of wrapper for the cire-gcc itself, if i want that he produces 32bit code (which only function with maple-32bit) i give him the option -m32. Yes i know there is the define_external(COMPILE_OPTIONS) command which i already tried in vane. I already gave him the option -m32 p := define_external(COMPILE_OPTIONS) p[CFLAGS] := "-m32 "; and also the path where the compiler is: p[COMPILER] := "/usr/bin/gcc "; but all did not help. So i ran out of ideas.

hello

i succeeded to get the solution myself:
i have to deliver the command

ulimit -v unlimited

hello

i succeeded to get the solution myself:
i have to deliver the command

ulimit -v unlimited

I am using this in the context of a Hartree-Fock Iteration in the Framework of our Relativistic Schroedinger Theory we are developing at our Institut. The right side of that poisson equation (the source term) is a function of 4 wave-functions which itself are depending of 2 independent variables (say r, theta). In the first step they are expressable in closed form. (I use an "ansatz") The poisson equation then will give me a potential A(r,theta) not in closed form. Then this potential i will use in 4 other first order PDE's to get 4 new wave functions but now no more in closed form. Now these no-more-closed wavefunctions i am going to use once again for the source term of the above mentioned potential equation to get a new potential (not in closed form) which then i am using again in the wave-function PDE's to get a more improved non-closed-potential and so on and so on... This already works in the case of radialsymmetric ordinary differential equations (the algorithm converges indeed!) and gives good coincidence with the experimental values. Now i want to generalize this to the 2 dimenional case, because there could come out once again a improvement of the values. if it is not possible to get a solution like that i am going to look at the method of lines. There seems to exist already maple-code which i can perhaps use after some modifications. But it will give me a table of discrete values and so i have to interpolate with 2-dim Splines which i do not like much because this could spoile the convergence of the Hartree-Fock Iteration as i already saw in the 1-dim case. regards Michael Mattes
yes i know, but perhaps there exist already code fragment or a worksheet or perhaps already a package regarding this which i could use to work with.
Page 1 of 1