CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Problem with parallel running using LookUp table

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 18, 2022, 08:30
Default Problem with parallel running using LookUp table
  #1
Member
 
Peng Liang
Join Date: Mar 2014
Posts: 59
Rep Power: 12
tjliang is on a distinguished road
Dear Foamers,


I have developed a code recently for looking up transport properties of argon plasma from a dictionary in my case directory. This set of transport properties are dependent of both plasma temperature (T2) and metal vapor fraction (Xb). I could successfully use this code to run simulation in serial. However, when I run this in parallel, there's always the case that my simulation died with the following errors:




[1] #0 Foam::error:rintStack(Foam::Ostream&) at ??:?
[1] #1 Foam::sigFpe::sigHandler(int) at ??:?
[1] #2 ? in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #3 ? in "/home/liang/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/MSGFoam"
[1] #4 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #5 ? in "/home/liang/OpenFOAM/OpenFOAM-7/platforms/linux64GccDPInt32Opt/bin/MSGFoam"
[Dell:18360] *** Process received signal ***
[Dell:18360] Signal: Floating point exception (8)
[Dell:18360] Signal code: (-6)
[Dell:18360] Failing at address: 0x3e8000047b8
[Dell:18360] [ 0] /lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7fc7a8ed8090]
[Dell:18360] [ 1] /lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcb)[0x7fc7a8ed800b]
[Dell:18360] [ 2] /lib/x86_64-linux-gnu/libc.so.6(+0x43090)[0x7fc7a8ed8090]
[Dell:18360] [ 3] MSGFoam(+0x8005c)[0x55599b31b05c]
[Dell:18360] [ 4] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf3)[0x7fc7a8eb9083]
[Dell:18360] [ 5] MSGFoam(+0x9a38e)[0x55599b33538e]
[Dell:18360] *** End of error message ***



Interesting is that, the fewer processors I use, the longer it could run before it report errors. I once even managed to run this code for one day with two processors in parallel before it finally report the same error which I will usually get very quickly if I use e.g. 6 processors.


I have attached my code bellow for showing how I lookup the two-dimensional dictionaries. It will be very much appreciated if I could know from you what's wrong with my code.Thank you.


//look up from a dictionary transport properties based on local (Yb,T2) values
IOdictionary ioDictObj
(
IOobject
(
"LookUpTransport", /// The dictionary file
runTime.constant(), /// Relative path (from case root)
runTime, /// The Time object
IOobject::MUST_READ, /// Read for constructor
IOobject::NO_WRITE /// Foam::Time writeControl
)
);
//look-up table for specific heat
List<scalar> tcp_(ioDictObj.lookup("cp_temperature"));
List<scalar> xcp_(ioDictObj.lookup("cp_Xb"));
List<scalar> cp_(ioDictObj.lookup("cp_value"));

//look-up table for thermal conductivity
List<scalar> tkappa_(ioDictObj.lookup("kappa_temperature"));
List<scalar> xkappa_(ioDictObj.lookup("kappa_Xb"));
List<scalar> kappa_(ioDictObj.lookup("kappa_value"));

//look-up table for viscosity
List<scalar> tmu_(ioDictObj.lookup("mu_temperature"));
List<scalar> xmu_(ioDictObj.lookup("mu_Xb"));
List<scalar> mu_(ioDictObj.lookup("mu_value"));

//look-up table for electrical conductivity
List<scalar> tsigma_(ioDictObj.lookup("sigma_temperature"));
List<scalar> xsigma_(ioDictObj.lookup("sigma_Xb"));
List<scalar> sigma_(ioDictObj.lookup("sigma_value"));

//look-up table for binary combined diffusion coefficient
List<scalar> tdiff_(ioDictObj.lookup("diff_temperature"));
List<scalar> xdiff_(ioDictObj.lookup("diff_Xb"));
List<scalar> diff_(ioDictObj.lookup("diff_value"));

//look-up table for net emission coefficient
List<scalar> tnec_(ioDictObj.lookup("NEC_temperature"));
List<scalar> ynec_(ioDictObj.lookup("NEC_Yb"));
List<scalar> nec_(ioDictObj.lookup("NEC_value"));

//List<scalar> xcp_(ioDictObj.lookup("metalic_vapor_proportion")) ; //metalic vapor proportion look-up table
//List<scalar> cp_(ioDictObj.lookup("viscosity")); //gaseous viscosity look-up table

const vector x(1., 0, 0);
const vector y(0, 1., 0);
const vector z(0, 0, 1.);

volVectorField fx("fx", x*(T2/t) + y*Xb + z*Yb); //combine two independent varaibles T2 and Xb
volVectorField fx1("fx1", x*(T1/t) + y*Xb + z*Yb); //combine two independent varaibles T1 and Xb

forAll(sigma2,j)

{
forAll(tsigma_,i) //lookup electrical conductivity

{
if((fx[j].x() <tsigma_[i+1]) && (fx[j].x()>=tsigma_[i]))
{
forAll(xsigma_,a)
{
if((fx[j].y()< xsigma_[a+1])&& (fx[j].y()>= xsigma_[a]))
{

sigma2[j]=((sigma_[a*30+i]+(fx[j].x()-tsigma_[i])/(tsigma_[i+1]-tsigma_[i])*(sigma_[a*30+i+1]-sigma_[a*30+i]))

+ (fx[j].y()-xsigma_[a])/(xsigma_[a+1]-xsigma_[a])*

((sigma_[(a+1)*30+i]+(fx[j].x()-tsigma_[i])/(tsigma_[i+1]-tsigma_[i])*(sigma_[(a+1)*30+i+1]-sigma_[(a+1)*30+i]))

- (sigma_[a*30+i]+(fx[j].x()-tsigma_[i])/(tsigma_[i+1]-tsigma_[i])*(sigma_[a*30+i+1]-sigma_[a*30+i]))));

}
}
}

}
}


forAll(Dab,j)

{
forAll(tdiff_,i) //lookup diffusion coefficient

{
if((fx[j].x() <tdiff_[i+1]) && (fx[j].x()>=tdiff_[i]))
{
forAll(xdiff_,a)
{
if((fx[j].y()< xdiff_[a+1])&& (fx[j].y()>= xdiff_[a]))
{

Dab[j]=((diff_[a*30+i]+(fx[j].x()-tdiff_[i])/(tdiff_[i+1]-tdiff_[i])*(diff_[a*30+i+1]-diff_[a*30+i]))

+ (fx[j].y()-xdiff_[a])/(xdiff_[a+1]-xdiff_[a])*

((diff_[(a+1)*30+i]+(fx[j].x()-tdiff_[i])/(tdiff_[i+1]-tdiff_[i])*(diff_[(a+1)*30+i+1]-diff_[(a+1)*30+i]))

- (diff_[a*30+i]+(fx[j].x()-tdiff_[i])/(tdiff_[i+1]-tdiff_[i])*(diff_[a*30+i+1]-diff_[a*30+i]))));
}

}
}

}
}

forAll(cp2,j)

{
forAll(tcp_,i) //lookup specific heat

{
if((fx[j].x() <tcp_[i+1]) && (fx[j].x()>=tcp_[i]))
{
forAll(xcp_,a)
{
if((fx[j].y()< xcp_[a+1])&& (fx[j].y()>= xcp_[a]))
{

cp2[j]=((cp_[a*59+i]+(fx[j].x()-tcp_[i])/(tcp_[i+1]-tcp_[i])*(cp_[a*59+i+1]-cp_[a*59+i]))

+ (fx[j].y()-xcp_[a])/(xcp_[a+1]-xcp_[a])*

((cp_[(a+1)*59+i]+(fx[j].x()-tcp_[i])/(tcp_[i+1]-tcp_[i])*(cp_[(a+1)*59+i+1]-cp_[(a+1)*59+i]))

- (cp_[a*59+i]+(fx[j].x()-tcp_[i])/(tcp_[i+1]-tcp_[i])*(cp_[a*59+i+1]-cp_[a*59+i]))));
}
}
}

}
}

forAll(kappa2,j)

{
forAll(tkappa_,i) //lookup thermal conductivity

{
if((fx[j].x() <tkappa_[i+1]) && (fx[j].x()>=tkappa_[i]))
{
forAll(xkappa_,a)
{
if((fx[j].y()< xkappa_[a+1])&& (fx[j].y()>= xkappa_[a]))
{

kappa2[j]=((kappa_[a*58+i]+(fx[j].x()-tkappa_[i])/(tkappa_[i+1]-tkappa_[i])*(kappa_[a*58+i+1]-kappa_[a*58+i]))

+ (fx[j].y()-xkappa_[a])/(xkappa_[a+1]-xkappa_[a])*

((kappa_[(a+1)*58+i]+(fx[j].x()-tkappa_[i])/(tkappa_[i+1]-tkappa_[i])*(kappa_[(a+1)*58+i+1]-kappa_[(a+1)*58+i]))

- (kappa_[a*58+i]+(fx[j].x()-tkappa_[i])/(tkappa_[i+1]-tkappa_[i])*(kappa_[a*58+i+1]-kappa_[a*58+i]))));
}
}
}

}
}

forAll(kappa3,j)

{
forAll(tkappa_,i) //lookup thermal conductivity

{
if((fx1[j].x() <tkappa_[i+1]) && (fx1[j].x()>=tkappa_[i]))
{
forAll(xkappa_,a)
{
if((fx1[j].y()< xkappa_[a+1])&& (fx1[j].y()>= xkappa_[a]))
{

kappa3[j]=((kappa_[a*58+i]+(fx1[j].x()-tkappa_[i])/(tkappa_[i+1]-tkappa_[i])*(kappa_[a*58+i+1]-kappa_[a*58+i]))

+ (fx1[j].y()-xkappa_[a])/(xkappa_[a+1]-xkappa_[a])*

((kappa_[(a+1)*58+i]+(fx1[j].x()-tkappa_[i])/(tkappa_[i+1]-tkappa_[i])*(kappa_[(a+1)*58+i+1]-kappa_[(a+1)*58+i]))

- (kappa_[a*58+i]+(fx1[j].x()-tkappa_[i])/(tkappa_[i+1]-tkappa_[i])*(kappa_[a*58+i+1]-kappa_[a*58+i]))));
}
}
}

}
}

forAll (mu2,j)
{
forAll(tmu_,i) //lookup viscosity

{
if((fx[j].x() <tmu_[i+1]) && (fx[j].x()>=tmu_[i]))
{
forAll(xmu_,a)
{
if((fx[j].y()< xmu_[a+1])&& (fx[j].y()>= xmu_[a]))
{

mu2[j]=((mu_[a*34+i]+(fx[j].x()-tmu_[i])/(tmu_[i+1]-tmu_[i])*(mu_[a*34+i+1]-mu_[a*34+i]))

+ (fx[j].y()-xmu_[a])/(xmu_[a+1]-xmu_[a])*

((mu_[(a+1)*34+i]+(fx[j].x()-tmu_[i])/(tmu_[i+1]-tmu_[i])*(mu_[(a+1)*34+i+1]-mu_[(a+1)*34+i]))

- (mu_[a*34+i]+(fx[j].x()-tmu_[i])/(tmu_[i+1]-tmu_[i])*(mu_[a*34+i+1]-mu_[a*34+i]))));
}
}
}

}
}

forAll (nec, j)
{
forAll(tnec_,i) //lookup net emission coefficient

{
if((fx[j].x() <tnec_[i+1]) && (fx[j].x()>=tnec_[i]))
{
forAll(ynec_,a)
{
if((fx[j].z()< ynec_[a+1])&& (fx[j].z()>= ynec_[a]))
{

nec[j]=((nec_[a*14+i]+(fx[j].x()-tnec_[i])/(tnec_[i+1]-tnec_[i])*(nec_[a*14+i+1]-nec_[a*14+i]))

+ (fx[j].z()-ynec_[a])/(ynec_[a+1]-ynec_[a])*

((nec_[(a+1)*14+i]+(fx[j].x()-tnec_[i])/(tnec_[i+1]-tnec_[i])*(nec_[(a+1)*14+i+1]-nec_[(a+1)*14+i]))

- (nec_[a*14+i]+(fx[j].x()-tnec_[i])/(tnec_[i+1]-tnec_[i])*(nec_[a*14+i+1]-nec_[a*14+i]))));
}
}
}

}

}

Info<< "Min/max gas phase viscosity mu2:"
<< " " << min(mu2).value() << ' '
<< max(mu2).value() << endl;

Info<< "Min/max gas phase specific heat cp2:"
<< " " << min(cp2).value() << ' '
<< max(cp2).value() << endl;

Info<< "Min/max gas phase electrical conductivity sigma2:"
<< " " << min(sigma2).value() << ' '
<< max(sigma2).value() << endl;

Info<< "Min/max gas phase thermal conductivity kappa2:"
<< " " << min(kappa2).value() << ' '
<< max(kappa2).value() << endl;

Info<< "Min/max gas phase binary diffusion coefficient Dab:"
<< " " << min(Dab).value() << ' '
<< max(Dab).value() << endl;

Info<< "Min/max net emission coefficient nec:"
<< " " << min(nec).value() << ' '
<< max(nec).value() << endl;
tjliang is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem running parallel simulation denis08 OpenFOAM Running, Solving & CFD 3 May 27, 2022 01:56
Long output in terminal. ssa_cfd OpenFOAM Running, Solving & CFD 1 March 18, 2019 05:25
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
Problem in Running OpenFoam in Parallel himanshu28 OpenFOAM Running, Solving & CFD 1 July 11, 2013 09:19
RSH problem for parallel running in CFX Nicola CFX 5 June 18, 2012 18:31


All times are GMT -4. The time now is 02:52.