Compiling and running the Dynamo Code


This page is related to my problems I run in the development of my Dynamo Code, so far the main problems have appeared while installing the necesary software and the makefile to compile and link the code.


Makefile Creation

The main problem I faced in the Makefile was not to create it in Linux where I initially started working but to get it to work in Solaris, it was horrible, the make command in the solaris machine I was using gave me a lot of trouble because it was not compatible with certain commands that make in Linux can handle:

Make in the SunOS cannot understand the make command "patsubst" so I had to manually tipe each and everyone object dependancy or it would simply not compile any of the object files that I needed, so I had to substitute an expresion like this:

_OBJS  = FITS_header.o Flows_MF_Surya.o Flows_DR_Radial.o Alpha_Surya.o \    
         InitMF_Surya.o Lgndr_As_Pol.o Lgndr_Exp.o PotV_BC.o Lgndr_Jac.o      
OBJS   = $(patsubst %,$(ODIR)/%,$(_OBJS))


for an expression like that:

OBJS  = $(BASE)/Obj/FITS_header.o $(BASE)/Obj/Flows_MF_Surya.o \
        $(BASE)/Obj/Flows_DR_Radial.o $(BASE)/Obj/Alpha_Surya.o \
        $(BASE)/Obj/InitMF_Surya.o $(BASE)/Obj/Lgndr_As_Pol.o \
        $(BASE)/Obj/Lgndr_Exp.o $(BASE)/Obj/PotV_BC.o $(BASE)/Obj/Lgndr_Jac.o  


The other big problem I had was that "cc", the C compiler for the SunOS doesn't include the gcc library which is required by FunTools and so several of the functions needed would appear as not defined:

__ashldi3
__ashrdi3
__divdi3
__fixdfdi
__floatdidf
ld: fatal: Symbol referencing errors.

To fix it I had to look for the needed library until I found it here:

/usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.1/libgcc.a

The reason I wanted to use "cc" instead of "gcc" was that SunOS has optimized BLAS and LAPACK in the library "sunperf"
.

Here is the makefile I used to succesfully compile and link my code:/Dynamo/Makefile

Uploaded on the 5th of March of 2007


Home
Research

Updated on the 5th of March of 2007