Date   
Re: PROBLEM atom_levelN: dgetrs finds singular or ill-conditioned matrix for Na I

Gary Ferland
 

Hi Mitchell,

Thanks for reporting this - it is an interesting problem.  The proximate problem is the very large model atoms - we had tested a few simple models with all levels included but you may be the first to try doing a complex models with all solvers working and all levels used.  The problem with Na may be a physical one - there were cases where we could not include all levels due to linear algebra problems due to sparse atomic data.  Lowering the number of levels for Na to <=142 gets around the singular matrix problem.  But that then reveals a deeper problem, at 142 levels we get a segfault and with fewer levels, insanity.  I will keep looking at this and it will be in our bug tracker.

The fix may not be quick - the semester is starting.  But a workaround might be to not do so many levels.  
sorry,
Gary

Re: Neutral hydrogen initial temperature

Gary Ferland
 

heating and cooling and thermal equilibrium are discussed in the Osterbrock & Ferland textbook in Chapter 3.  Cloudy does much more than is in the text but it gives the right idea for what is going on.

On Sat, Aug 8, 2020 at 1:07 PM <mounmeenakshi123@...> wrote:
Hi Gary, 

Thanks for the reply.
Well, does this mean that the cloud is illuminated by CMB and cosmic rays to calculate the local heating and cooling rates to estimate this temperature.?



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Neutral hydrogen initial temperature

mounmeenakshi123@...
 

Hi Gary, 

Thanks for the reply.
Well, does this mean that the cloud is illuminated by CMB and cosmic rays to calculate the local heating and cooling rates to estimate this temperature.?

Re: Flux instead flux per octave

Marios Chatzikos
 

Hi Lucas,

Take a look at the documentation, especially the QuickStart guide and Hazy 1.  I think you'll find the answers you search for in there.

I hope this helps,

Marios

On 8/7/20 09:22, Lucas Victor da Conceição wrote:
I'm just starting working with cloudy. Then I would like to know how to create an output with luminosity and flux instead luminosity and flux per octave. 
I also would like to know how to identify intrinsic line intensities units.
Thanks in advance.

Re: Buffer Overflow with save species densities

Gary Ferland
 

Fran's change in this thread should fix it.    

This has to be a libraries issue - the ones that come with recent ubuntu's detect the overrun, but it is not detected on a current Mac (gcc and llvm) or the CentOS workstations we normally test on, even with valgrind (gcc and llvm).  

We need to track down what is different in the libraries and see if we can get updated to whatever ubuntu ships with.  I have both LTS 18 and 20 installed under VMWare on my Mac and they detect the problem.

I added your SAVE command to a sim in the test suite so we will exercise that long string - but, as Fran pointed out it should not happen again because of coding changes.
thanks,
Gary

On Thu, Aug 6, 2020 at 4:03 AM Stefano Bianchi <bianchi@...> wrote:
Hi Gary,

I confirm the error I originally posted, but grid_h2coronal goes perfectly fine.

Configuration:

c17.02
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:    bionic

Stefano



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Buffer Overflow with save species densities

Stefano Bianchi
 

Hi Gary,

I confirm the error I originally posted, but grid_h2coronal goes perfectly fine.

Configuration:

c17.02
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
LSB Version:    core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID:    Ubuntu
Description:    Ubuntu 18.04.4 LTS
Release:    18.04
Codename:    bionic

Stefano

PROBLEM atom_levelN: dgetrs finds singular or ill-conditioned matrix for Na I

Mitchell Young
 

Hi All,

I'm running into an error in the title only a few seconds into my simulation.  I've attached both the *.in and *.out files that produce and record this error.  With a little experimenting, I've found that if the hydrogen density at the illuminated surface of the cloud is turned up by an order of magnitude, the simulation doesn't encounter this problem.

Any advice?

Cheers,
Mitchell

Re: Continuum Optical Depth as a function of geometric depth?

Gary Ferland
 

the thread " Lyman continuum optical depth output" on this forum has a patch to add the 912A optical depth to the end of the overview output.  this will be part of the 17.03 release.

On Thu, Jul 30, 2020 at 7:50 AM Mitchell Young <mitchell.young.lab@...> wrote:
Hi Peter,

That will work great for my purposes, thank you.

Cheers,
Mitchell



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Continuum Optical Depth as a function of geometric depth?

Mitchell Young
 

Hi Peter,

That will work great for my purposes, thank you.

Cheers,
Mitchell

Re: Continuum Optical Depth as a function of geometric depth?

peter_van_hoof
 

Hi Mitchell,

On 30/07/2020 11.20, Mitchell Young wrote:
Hi All,
Is there a way to have Cloudy print out the continuum optical depth as a function of depth into the cloud?  I see that it can do this for specific lines, and it can print out the continuum optical depth for the last zone, but not for each zone.  Ideally I would like to have the full wavelength dependent optical depth data saved for each zone, but I would be happy with being able to give a single wavelength like for the line optical depths.
The SAVE CONTINUUM EMISSIVITY command comes close. It saves the continuum opacity at a specified frequency as a function of depth, which can easily be integrated to give the optical depth... See 16.44.13 in Hazy 1.


Cheers,

Peter.

--
Peter van Hoof
Royal Observatory of Belgium
Ringlaan 3
1180 Brussel
Belgium
http://homepage.oma.be/pvh

Re: Pressure broadening of line profiles?

Mitchell Young
 

Hi Gary,

Thanks for the reply.  I'll take a look at the Voigt function angle and 
see if I can make something work there.

Cheers,

Mitchell

Re: PROBLEM non-conservation of nuclei

Mitchell Young
 

Hi Gary,

Thanks for the idea, I will try it.  I understand this is pushing the 
boundaries of what Cloudy was designed for, so it's not a big surprise 
to me that it causes problems.

Cheers,

Mitchell

Continuum Optical Depth as a function of geometric depth?

Mitchell Young
 

Hi All, 

Is there a way to have Cloudy print out the continuum optical depth as a function of depth into the cloud?  I see that it can do this for specific lines, and it can print out the continuum optical depth for the last zone, but not for each zone.  Ideally I would like to have the full wavelength dependent optical depth data saved for each zone, but I would be happy with being able to give a single wavelength like for the line optical depths.

Thanks,
Mitchell

Re: Halpha or Lyman alpha intensity greater than total cooling

Huanian Zhang
 

I checked the Osterbrock Chapter 3. The equilibrium condition is G = L_R + L_C + L_FF. However, I set constant temperature for the gas, which means it is non equilibrium. I suspect the "G" is the total heating in Cloudy. The total cooling explanation in Cloudy is "Cooling is the total energy in collisionally excited lines and part of the recombination energy, but does not include
recombination lines (AGN3 Chapter 3)", so I suspect the total cooling is L_C + L_FF. Then I would need L_R to account for the truly total cooling for the gas. It looks I found it in the output file, one example from my output file is as follows:

 ENERGY BUDGET:  Heat:  -6.775  Coolg:  -6.761  Error:  3.1%  Rec Lin:  -6.755  F-F  H  0.000    P(rad/tot)max     8.93E-03    R(F Con):1.737e+05


There is still one place that I do not understand. Since for low temperature (T < 10^4 K), the Rec Line (Cloudy explanation is "The next numbers give “Rec Lin”, the log of the total luminosity in
recombination lines") is still less than the Lyman alpha or Halpha intensity. I am quite confused since Lyman alpha or Halpha is from recombination for those low density gas. WHy the Lyman/Balmer series is not included for recombination lines? 

Thanks,
Huanian

 

Re: PB with negative population of Ca 1

Gary Ferland
 

try your grid with this patch - apply it in the c17 source directory.  Please let me know what happens with your grid.
thanks,
Gary

On Fri, Jul 17, 2020 at 5:55 PM Gary Ferland via groups.io <gary=g.uky.edu@groups.io> wrote:
Hi Christophe,
can you create a single model that I can run and see the crash and send it?  It would need to have any helper files so that I can run it locally.
thanks,
Gary

On Fri, Jul 17, 2020 at 2:38 PM chris_morisset <chris.morisset@...> wrote:
The grid is running on burst ages and log U (other parameters also vary, but do not relate to the Ca 1 problem). The crashing models are all for ages between 30 and 180 Myr, when almost no ionizing photons are emitted by the source, and for log U high (between -2.5 and -1.5). Anyway, there must be something wrong for the code to obtain negative populations, a threshold of 0.0 or 1e-80 is missing somewhere?
Best regards,
Christophe



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Halpha or Lyman alpha intensity greater than total cooling

Gary Ferland
 

heating / cooling is described in the Osterbrock book in Chapter 3.  It is also extensively discussed in the Spitzer 1978 and 1962 books, and his 1948, 1948 ApJ papers.

On Mon, Jul 27, 2020 at 4:46 PM Huanian Zhang <fantasyzhn@...> wrote:
Hi Gary,

Thank you very much for the explanation. I wonder how can we account for those recombination/ionization energy for the cooling/heating? I checked the hazy documentation, but I could not find such content, neither the total radiative losses. 

Would you shed a light on me? 

Thanks,
Huanian



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Buffer Overflow with save species densities

Gary Ferland
 



On Mon, Jul 27, 2020 at 6:35 PM Marios Chatzikos <mchatzikos@...> wrote:
Previously I was testing c17_branch.  So, to summarize:
 - grid_h2coronal does not FPE with either c17.02 or c17_branch
 - Stefano's problem is there in c17.02, and fixed on c17_branch

These tests are done g++ version 7.5.

It sounds like the problem exists on Ubuntu 18.04 only.  I wonder what is different about it.

the problem is *detected* in 18.04.  I bet it exists everywhere.
PS: Apologies for being pedantic, but you did use 'make clean' before 'make' on the 18.04 system, right?  I'm sure you did, but since we're looking for a bug, it is worth asking.

better than that - I reflexively do "make distclean"

thanks,
Gary


On Mon, Jul 27, 2020 at 6:28 PM Gary Ferland <gary@g.uky.edu> wrote:
in your thread two hours ago the problem did not reproduce.   Was that 17.02 or a patched version?

have both versions reproduced the error with 17.02?

it does not reproduce on cloud9 - the OP runs clean at 17.02

On Mon, Jul 27, 2020 at 6:12 PM Marios Chatzikos <mchatzikos@...> wrote:

With c17.02 I can reproduce Stefano's original problem (as expected), but I cannot reproduce the FPE with grid_h2coronal.in.

$ ../../source/cloudy.exe -r grid_h2coronal
$ echo $?
0

Marios


On 7/27/20 18:03, Gary Ferland wrote:


On Mon, Jul 27, 2020 at 4:02 PM Marios Chatzikos <mchatzikos@...> wrote:

I have installed gcc v7.5 on my machine:

$ g++-7 --version
g++-7 (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and I compiled Cloudy with it.

The original problem does not manifest itself.  This is presumably solved with Fran's fix.  (Using strings instead of char label[20] provides a more robust fix, but much more invasive.)

I could not reproduce the FPE in grid_h2coronal.  If there is a problem on the VMWare version of Ubuntu, it may well be with the system libraries.  Gary, for the record, what version of Ubuntu and g++ does it run?


I doubt that VMWare has anything to do with it - Fran has a self maintained ubuntu and i bet the OP had native ubuntu.  The versions were in my post above in this thread.  

gcc 
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

gary@ubuntu:~/cloudy/trunk/tsuite/auto$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

The OP was a real problem that our current toolset cannot detect.

Gary

Thanks,

Marios

On 7/27/20 15:29, Marios Chatzikos wrote:

I have not been able to reproduce these problems (original & grid_h2coronal) on my Ubuntu 16.04 machine.  If this is a Ubuntu-specific problem, I'd guess it affects only recent versions of the system.  For the record, here is the gcc version:

$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Marios

On 7/27/20 13:11, Gary Ferland wrote:
I posted Fran's fix on c17_branch and this will be in the c17.03 release.  I also added this SAVE command to one of the test suite cases to make sure it passes in the future.

However, I came across something troubling.  I believe Fran and Stefano were using Ubuntu and probably gcc.  At first, I can the sim using gcc and llvm on my Mac and nothing happened - no overflow.  Then I tried a cluster machine using a relative of Red Hat & gcc and again no buffer overrun.  Finally, I tried Ubuntu under VMWare on my Mac - this reproduced the overflow.

The versions of gcc on the mac and ubuntu are similar so the buffer overrun protection seems to be unique to ubuntu.  The system libraries are different and I suspect the source of the distinction.

Finally, I tried the entire test suite with gcc / ubuntu and found an FPE in grid_h2coronal.  This had passed clean with valgrind / gcc on the cluster machine.  I don't have access to a regular ubuntu machine and am limited to VMWare on this Mac - which is OK for single tests but not production work.  The test suite does not pass in ubuntu, and the problem with this sim goes at least as far back as c17.  This means nobody had run the test suite under ubuntu.

apparently Ubuntu includes bounds testing not found in other systems?  Does anybody have any idea what is happening?  It would be good if our cluster machine could have picked up this problem with gcc/valgrind - we do that test once a week.

bewildered,
Gary


--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Buffer Overflow with save species densities

Gary Ferland
 

went back to cloud9 to make sure - c17.02 runs the sim without complaint in both gcc and llvm

On Mon, Jul 27, 2020 at 6:35 PM Marios Chatzikos <mchatzikos@...> wrote:
Previously I was testing c17_branch.  So, to summarize:
 - grid_h2coronal does not FPE with either c17.02 or c17_branch
 - Stefano's problem is there in c17.02, and fixed on c17_branch

These tests are done g++ version 7.5.

It sounds like the problem exists on Ubuntu 18.04 only.  I wonder what is different about it.

Marios

PS: Apologies for being pedantic, but you did use 'make clean' before 'make' on the 18.04 system, right?  I'm sure you did, but since we're looking for a bug, it is worth asking.


On Mon, Jul 27, 2020 at 6:28 PM Gary Ferland <gary@g.uky.edu> wrote:
in your thread two hours ago the problem did not reproduce.   Was that 17.02 or a patched version?

have both versions reproduced the error with 17.02?

it does not reproduce on cloud9 - the OP runs clean at 17.02

On Mon, Jul 27, 2020 at 6:12 PM Marios Chatzikos <mchatzikos@...> wrote:

With c17.02 I can reproduce Stefano's original problem (as expected), but I cannot reproduce the FPE with grid_h2coronal.in.

$ ../../source/cloudy.exe -r grid_h2coronal
$ echo $?
0

Marios


On 7/27/20 18:03, Gary Ferland wrote:


On Mon, Jul 27, 2020 at 4:02 PM Marios Chatzikos <mchatzikos@...> wrote:

I have installed gcc v7.5 on my machine:

$ g++-7 --version
g++-7 (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and I compiled Cloudy with it.

The original problem does not manifest itself.  This is presumably solved with Fran's fix.  (Using strings instead of char label[20] provides a more robust fix, but much more invasive.)

I could not reproduce the FPE in grid_h2coronal.  If there is a problem on the VMWare version of Ubuntu, it may well be with the system libraries.  Gary, for the record, what version of Ubuntu and g++ does it run?


I doubt that VMWare has anything to do with it - Fran has a self maintained ubuntu and i bet the OP had native ubuntu.  The versions were in my post above in this thread.  

gcc 
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

gary@ubuntu:~/cloudy/trunk/tsuite/auto$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

The OP was a real problem that our current toolset cannot detect.

Gary

Thanks,

Marios

On 7/27/20 15:29, Marios Chatzikos wrote:

I have not been able to reproduce these problems (original & grid_h2coronal) on my Ubuntu 16.04 machine.  If this is a Ubuntu-specific problem, I'd guess it affects only recent versions of the system.  For the record, here is the gcc version:

$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Marios

On 7/27/20 13:11, Gary Ferland wrote:
I posted Fran's fix on c17_branch and this will be in the c17.03 release.  I also added this SAVE command to one of the test suite cases to make sure it passes in the future.

However, I came across something troubling.  I believe Fran and Stefano were using Ubuntu and probably gcc.  At first, I can the sim using gcc and llvm on my Mac and nothing happened - no overflow.  Then I tried a cluster machine using a relative of Red Hat & gcc and again no buffer overrun.  Finally, I tried Ubuntu under VMWare on my Mac - this reproduced the overflow.

The versions of gcc on the mac and ubuntu are similar so the buffer overrun protection seems to be unique to ubuntu.  The system libraries are different and I suspect the source of the distinction.

Finally, I tried the entire test suite with gcc / ubuntu and found an FPE in grid_h2coronal.  This had passed clean with valgrind / gcc on the cluster machine.  I don't have access to a regular ubuntu machine and am limited to VMWare on this Mac - which is OK for single tests but not production work.  The test suite does not pass in ubuntu, and the problem with this sim goes at least as far back as c17.  This means nobody had run the test suite under ubuntu.

apparently Ubuntu includes bounds testing not found in other systems?  Does anybody have any idea what is happening?  It would be good if our cluster machine could have picked up this problem with gcc/valgrind - we do that test once a week.

bewildered,
Gary


--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Buffer Overflow with save species densities

Marios Chatzikos
 

Previously I was testing c17_branch.  So, to summarize:
 - grid_h2coronal does not FPE with either c17.02 or c17_branch
 - Stefano's problem is there in c17.02, and fixed on c17_branch

These tests are done g++ version 7.5.

It sounds like the problem exists on Ubuntu 18.04 only.  I wonder what is different about it.

Marios

PS: Apologies for being pedantic, but you did use 'make clean' before 'make' on the 18.04 system, right?  I'm sure you did, but since we're looking for a bug, it is worth asking.


On Mon, Jul 27, 2020 at 6:28 PM Gary Ferland <gary@g.uky.edu> wrote:
in your thread two hours ago the problem did not reproduce.   Was that 17.02 or a patched version?

have both versions reproduced the error with 17.02?

it does not reproduce on cloud9 - the OP runs clean at 17.02

On Mon, Jul 27, 2020 at 6:12 PM Marios Chatzikos <mchatzikos@...> wrote:

With c17.02 I can reproduce Stefano's original problem (as expected), but I cannot reproduce the FPE with grid_h2coronal.in.

$ ../../source/cloudy.exe -r grid_h2coronal
$ echo $?
0

Marios


On 7/27/20 18:03, Gary Ferland wrote:


On Mon, Jul 27, 2020 at 4:02 PM Marios Chatzikos <mchatzikos@...> wrote:

I have installed gcc v7.5 on my machine:

$ g++-7 --version
g++-7 (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and I compiled Cloudy with it.

The original problem does not manifest itself.  This is presumably solved with Fran's fix.  (Using strings instead of char label[20] provides a more robust fix, but much more invasive.)

I could not reproduce the FPE in grid_h2coronal.  If there is a problem on the VMWare version of Ubuntu, it may well be with the system libraries.  Gary, for the record, what version of Ubuntu and g++ does it run?


I doubt that VMWare has anything to do with it - Fran has a self maintained ubuntu and i bet the OP had native ubuntu.  The versions were in my post above in this thread.  

gcc 
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

gary@ubuntu:~/cloudy/trunk/tsuite/auto$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

The OP was a real problem that our current toolset cannot detect.

Gary

Thanks,

Marios

On 7/27/20 15:29, Marios Chatzikos wrote:

I have not been able to reproduce these problems (original & grid_h2coronal) on my Ubuntu 16.04 machine.  If this is a Ubuntu-specific problem, I'd guess it affects only recent versions of the system.  For the record, here is the gcc version:

$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Marios

On 7/27/20 13:11, Gary Ferland wrote:
I posted Fran's fix on c17_branch and this will be in the c17.03 release.  I also added this SAVE command to one of the test suite cases to make sure it passes in the future.

However, I came across something troubling.  I believe Fran and Stefano were using Ubuntu and probably gcc.  At first, I can the sim using gcc and llvm on my Mac and nothing happened - no overflow.  Then I tried a cluster machine using a relative of Red Hat & gcc and again no buffer overrun.  Finally, I tried Ubuntu under VMWare on my Mac - this reproduced the overflow.

The versions of gcc on the mac and ubuntu are similar so the buffer overrun protection seems to be unique to ubuntu.  The system libraries are different and I suspect the source of the distinction.

Finally, I tried the entire test suite with gcc / ubuntu and found an FPE in grid_h2coronal.  This had passed clean with valgrind / gcc on the cluster machine.  I don't have access to a regular ubuntu machine and am limited to VMWare on this Mac - which is OK for single tests but not production work.  The test suite does not pass in ubuntu, and the problem with this sim goes at least as far back as c17.  This means nobody had run the test suite under ubuntu.

apparently Ubuntu includes bounds testing not found in other systems?  Does anybody have any idea what is happening?  It would be good if our cluster machine could have picked up this problem with gcc/valgrind - we do that test once a week.

bewildered,
Gary


--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary

Re: Buffer Overflow with save species densities

Gary Ferland
 

in your thread two hours ago the problem did not reproduce.   Was that 17.02 or a patched version?

have both versions reproduced the error with 17.02?

it does not reproduce on cloud9 - the OP runs clean at 17.02

On Mon, Jul 27, 2020 at 6:12 PM Marios Chatzikos <mchatzikos@...> wrote:

With c17.02 I can reproduce Stefano's original problem (as expected), but I cannot reproduce the FPE with grid_h2coronal.in.

$ ../../source/cloudy.exe -r grid_h2coronal
$ echo $?
0

Marios


On 7/27/20 18:03, Gary Ferland wrote:


On Mon, Jul 27, 2020 at 4:02 PM Marios Chatzikos <mchatzikos@...> wrote:

I have installed gcc v7.5 on my machine:

$ g++-7 --version
g++-7 (Ubuntu 7.5.0-3ubuntu1~16.04) 7.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and I compiled Cloudy with it.

The original problem does not manifest itself.  This is presumably solved with Fran's fix.  (Using strings instead of char label[20] provides a more robust fix, but much more invasive.)

I could not reproduce the FPE in grid_h2coronal.  If there is a problem on the VMWare version of Ubuntu, it may well be with the system libraries.  Gary, for the record, what version of Ubuntu and g++ does it run?


I doubt that VMWare has anything to do with it - Fran has a self maintained ubuntu and i bet the OP had native ubuntu.  The versions were in my post above in this thread.  

gcc 
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

gary@ubuntu:~/cloudy/trunk/tsuite/auto$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic

The OP was a real problem that our current toolset cannot detect.

Gary

Thanks,

Marios

On 7/27/20 15:29, Marios Chatzikos wrote:

I have not been able to reproduce these problems (original & grid_h2coronal) on my Ubuntu 16.04 machine.  If this is a Ubuntu-specific problem, I'd guess it affects only recent versions of the system.  For the record, here is the gcc version:

$ gcc --version
gcc (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Marios

On 7/27/20 13:11, Gary Ferland wrote:
I posted Fran's fix on c17_branch and this will be in the c17.03 release.  I also added this SAVE command to one of the test suite cases to make sure it passes in the future.

However, I came across something troubling.  I believe Fran and Stefano were using Ubuntu and probably gcc.  At first, I can the sim using gcc and llvm on my Mac and nothing happened - no overflow.  Then I tried a cluster machine using a relative of Red Hat & gcc and again no buffer overrun.  Finally, I tried Ubuntu under VMWare on my Mac - this reproduced the overflow.

The versions of gcc on the mac and ubuntu are similar so the buffer overrun protection seems to be unique to ubuntu.  The system libraries are different and I suspect the source of the distinction.

Finally, I tried the entire test suite with gcc / ubuntu and found an FPE in grid_h2coronal.  This had passed clean with valgrind / gcc on the cluster machine.  I don't have access to a regular ubuntu machine and am limited to VMWare on this Mac - which is OK for single tests but not production work.  The test suite does not pass in ubuntu, and the problem with this sim goes at least as far back as c17.  This means nobody had run the test suite under ubuntu.

apparently Ubuntu includes bounds testing not found in other systems?  Does anybody have any idea what is happening?  It would be good if our cluster machine could have picked up this problem with gcc/valgrind - we do that test once a week.

bewildered,
Gary


--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary



--
Gary J. Ferland
Physics, Univ of Kentucky
Lexington KY 40506 USA
Tel: 859 257-8795
https://pa.as.uky.edu/users/gary