-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I am using the provided VM and trying to test the following code:
#include <stdlib.h>
#include <cmath>
# define N 4
#define sincos(t, s, c) *s=sin(t); *c=cos(t)
int christoffel(double dst[4][4][4], double const pos[4])
{
const double spin_ = 0;
const double a2_=spin_*spin_;
int a, mu, nu;
for (a=0; a<4; ++a)
for(mu=0; mu<4; ++mu)
for(nu=0; nu<4; ++nu)
dst[a][mu][nu]=0.;
double r = pos[1];
double sth, cth;
sincos(pos[2], &sth, &cth);
double
sth2 = sth*sth, cth2 = cth*cth, sth4=sth2*sth2,
s2th = 2.*sth*cth, c2th=cth2-sth2,
s4th = 2.*s2th*c2th,
s2th2= s2th*s2th, ctgth=cth/sth;
double r2=r*r, r4=r2*r2, r6=r4*r2;
double Sigma=r2+a2_*cth2, Sigma2=Sigma*Sigma;
double Delta=r2-2.*r+a2_;
double Deltam1=1./Delta,
Sigmam1=1./Sigma,
Sigmam2=Sigmam1*Sigmam1,
Sigmam3=Sigmam2*Sigmam1,
a2cthsth=a2_*cth*sth,
rSigmam1=r*Sigmam1,
Deltam1Sigmam2=Deltam1*Sigmam2,
r2plusa2 = r2+a2_;
dst[1][1][1]=(1.-r)*Deltam1+rSigmam1;
dst[1][2][1]=dst[1][1][2]=-a2cthsth*Sigmam1;
dst[1][2][2]=-Delta*rSigmam1;
dst[1][3][3]=-Delta*sth2*(r+(a2_*(-2.*r2+Sigma)*sth2)/Sigma2)/Sigma;
dst[1][3][0]=dst[1][0][3]=spin_*Delta*(-2*r2+Sigma)*sth2*Sigmam3;
dst[1][0][0]=-Delta*(-2.*r2+Sigma)*Sigmam3;
dst[2][1][1]=a2cthsth*Deltam1*Sigmam1;
dst[2][2][1]=dst[2][1][2]=rSigmam1;
dst[2][2][2]=-a2cthsth*Sigmam1;
dst[2][3][3]=
-sth*cth*Sigmam3 * (Delta*Sigma2 + 2.*r*r2plusa2*r2plusa2);
dst[2][0][3]=dst[2][3][0]=spin_*r*r2plusa2*s2th*Sigmam3;
dst[2][0][0]=-2.*a2cthsth*r*Sigmam3;
dst[3][3][1]=dst[3][1][3]=
Deltam1*Sigmam2 * (r*Sigma*(Sigma-2.*r) + a2_*(Sigma-2.*r2)*sth2);
dst[3][3][2]=dst[3][2][3]=
Sigmam2*ctgth * (-(Sigma+Delta)*a2_*sth2 + r2plusa2*r2plusa2);
dst[3][0][1]=dst[3][1][0]=spin_*(2.*r2-Sigma)*Deltam1Sigmam2;
dst[3][0][2]=dst[3][2][0]=-2.*spin_*r*ctgth*Sigmam2;
dst[0][3][1]=dst[0][1][3]=
-spin_*sth2*Deltam1Sigmam2 * (2.*r2*r2plusa2 + Sigma*(r2-a2_));
dst[0][3][2]=dst[0][2][3]=Sigmam2*spin_*a2_*r*sth2*s2th;
dst[0][0][1]=dst[0][1][0]=(a2_+r2)*(2.*r2-Sigma)*Deltam1Sigmam2;
dst[0][0][2]=dst[0][2][0]=-a2_*r*s2th*Sigmam2;
return 0;
}
int main ( void )
{
double pos[N]; // Random position array
double dst[4][4][4]; // Output array
for ( int indx = 0; indx < N ; indx ++ )
{
pos[indx] = rand() % 100;
}
christoffel(dst, pos);
return 0;
}
using this synthesis script:
set_project .
set_top_file main.cpp
set_period 15.0
analyze
elaborate
synthesize
optimize
write_hdl
exit
I am getting the following error though:
Adding elastic buffers with period=15 and buffer_delay=0
======================
ADDING ELASTIC BUFFERS
======================
Extracting marked graphs
buffers: src/DFnetlsit_BasicBlocks.cpp:269: bool Dataflow::BasicBlockGraph::calculateBackArcs(): Assertion `entryBB != invalidDataflowID' failed.
Aborted (core dumped)
mv: cannot stat './reports/main_elaborated_graph_buf.dot': No such file or directory
Error: dot: can't open ./reports/main_elaborated_optimized.dot
Done
Write hdl
write_hdl . ./reports/main_elaborated_optimized
Is there some obvious error on my part, or a way to get more information on what's going on?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels