AtChem / AtChem2

Atmospheric chemistry box-model for the MCM
MIT License
58 stars 23 forks source link

Stack smashing detected when run the test #437

Closed Albert-Chemistry closed 3 years ago

Albert-Chemistry commented 3 years ago

ubuntu@VM-0-12-ubuntu:~/AtChem2$ ./atchem2 AtChem2 v1.2


Directories

Model directory is: model Output directory is: model/output Reaction Rates directory is: model/output/reactionRates Configuration directory is: model/configuration Constraints directory is: model/constraints Environment Constraints directory is: model/constraints/environment Photolysis Constraints directory is: model/constraints/photolysis Species Constraints directory is: model/constraints/species MCM directory is: mcm Shared library is: model/configuration/mechanism.so


Species and reactions

Number of Species = 29 Number of Reactions = 71

Size of lhs = 114 Size of rhs = 100

Reading reactants (lhs) from mechanism.reac... Reading products (rhs) from mechanism.prod... Finished reading lhs and rhs data.

Reading species names from mechanism.species... Finished reading species names.

Reading initial concentrations... 1 CH4 4.900E+13 ... 4 NO2 2.400E+11 Finished reading initial concentrations.


Species requiring detailed rate output

Reading which species require detailed rate output... 1 OH
2 HO2
Finished reading which species require detailed rate output. Species requiring detailed rate output (number of species found): 2

Reading ro2 numbers from mechanism.ro2... Finished reading ro2 numbers. Reading solver parameters from file...

Solver parameters:

        atol:   1.000E-03
        rtol:   1.000E-04
   deltaMain:   1.000E-04
    lookBack:         100
     maxStep:   1.000E+02

preconBandUpper: 750 preconBandLower: 750 solverType: SPGMR + Banded Preconditioner

Finished reading solver parameters from file.

Reading model parameters from file...

Model parameters:

                               number of steps:          48
                                     step size:   0.900E+03
                  species interpolation method: piecewise linear 
               conditions interpolation method: piecewise linear 
             rates output step size, ROPA/RODA:        3600
                              model start time:           0
                     jacobian output step size:           0
                                      latitude:   0.515E+02
                                     longitude:   0.130E+00
               reaction rates output step size:        1800
                                day/month/year:  21/ 6/2010

Finished reading model parameters from file.


Species of Interest

Reading concentration output from file... Finished reading concentration output from file. Output required for concentration of 8 species: 1 CH4
... 8 CH3O2


Photolysis

Reading photolysis numbers from file... 1 ... 61 Finished reading photolysis numbers. Number of photolysis numbers: 35 Looking for photolysis constants file... Checking that photolysis constants exist in file... Photolysis constants file is empty. No photolysis constants applied, so trying constrained photolysis rates file... Looking for photolysis constraints file... Checking that photolysis constraints exist in file... Photolysis constraint file is empty, so all photolysis rates will be calculated. Reading all photolysis rates from file... 1 6.073E-05 1.743E+00 4.740E-01 J1 1.000E+00 ... 61 7.537E-04 4.990E-01 2.660E-01 J61 1.000E+00 Finished reading all photolysis rates. Number of all photolysis rates: 35


Environment variables

Reading environment variables... Number of environment variables: 10 1 TEMP 298.15 2 PRESS 1013.25 3 RH NOTUSED 4 H2O 3.91e+17 5 DEC 0.41 6 BLHEIGHT NOTUSED 7 DILUTE NOTUSED 8 JFAC NOTUSED 9 ROOF OPEN Finished reading environment variables.

Checking for constrained environment variables... Finished checking for constrained environment variables.


Constraints

Counting the variable-concentration species to be constrained (in file speciesConstrained.config)... Finished counting the names of variable-concentration constrained species. Number of names of variable-concentration constrained species: 0 Counting the fixed-concentration species to be constrained (in file speciesConstant.config)... Finished counting the names of fixed-concentration constrained species. Number of names of fixed-concentration constrained species: 0 Setting size of constraint arrays, n = 0 Skipped reading the names of variable-concentration constrained species Reading concentration data for variable-concentration constrained species... Reading in the names and concentration of the fixed constrained species (in file speciesConstant.config)... Finished reading in the names and concentration of fixed-concentration species. Finished reading constrained species. Initialising concentrations of constrained species... Finished initialising concentrations of constrained species.


Problem stats

                    neq = 29

numberOfConstrainedSpecies = 0 t0 = 0.000E+00

setting maxnumsteps ier = 0 setting maxstep ier = 0


**Model run

stack smashing detected : terminated**

Program received signal SIGABRT: Process abort signal.

Backtrace for this error:

0 0x7fdac822732a

1 0x7fdac8226503

2 0x7fdac7c4203f

3 0x7fdac7c41fb7

4 0x7fdac7c43920

5 0x7fdac7c8c966

6 0x7fdac7d37b60

7 0x7fdac7d37b21

8 0x561a7a402e51

9 0x7fdac89fb851

10 0x561a7a403753

11 0x561a7a400009

12 0x561a7a402055

13 0x7fdac7c24bf6

14 0x561a7a3ac349

15 0xffffffffffffffff

Aborted (core dumped)

spco commented 3 years ago

Hi @ShenAlbert - could you please post your version number for GCC and GFortran (if those are the compilers you use) and Ubuntu version? Thank you.

Albert-Chemistry commented 3 years ago

@spco Thank you very much for your reply.

ubuntu@VM-0-12-ubuntu:~/AtChem2$ gfortran --version

GNU Fortran (Ubuntu 7.5.0-3ubuntu1~18.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.

ubuntu@VM-0-12-ubuntu:~/AtChem2$ sudo lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 18.04.4 LTS Release: 18.04 Codename: bionic

rs028 commented 3 years ago

@spco could this be related to #431 and #435?

Albert-Chemistry commented 3 years ago

@rs028 @spco I have updated the ubuntu from 18.04.4 LTS to 20.04.1 LTS, this issue disappeared. However, the same error reported in #435 occurred. I tried changing the gfortran version (9.3.0 to 8.4.0), but it did not work.

spco commented 3 years ago

This should have now been fixed by #438 - please let me know whether it does so. I will close this issue for now, but please reopen if it still doesn't work. Thanks!