Skip to content

Known Issues

R. Sommariva edited this page Oct 11, 2022 · 2 revisions

Execution error on macOS

When AtChem2 is run for the first time, it may give an error like this:

dyld: Library not loaded: @rpath/libsundials_cvode.2.dylib
Referenced from: /Users/username/AtChem2/./atchem2
Reason: image not found
Abort trap: 6

In this case, type at the terminal prompt the following command (change the path to the CVODE library as appropriate):

export DYLD_LIBRARY_PATH=$HOME/atchem-lib/cvode/lib

To make the change permanent, add the command to .bash_profile or .profile.

Advanced users may wish to use instead the accepted answer in this Stack Overflow post and hardcode rpath in this instance for each of libsundials_cvode.2.dylib, libsundials_fvecserial.2.dylib, libsundials_vecserial.2.dylib.

Build error with MCM v3.3.1 mechanisms

Chemical mechanisms (*.fac) extracted recently from the MCM v3.3.1 website may cause an error when building the model. The build process is interrupted with the following error message:

Reading input file
looping over inputted RO2s
Traceback (most recent call last):
  File "./build/mech_converter.py", line 503, in <module>
    main()
  File "./build/mech_converter.py", line 498, in main
    convert(input_filename, mech_dir, mcm_dir)
  File "./build/mech_converter.py", line 281, in convert
    new_rhs = tokenise_and_process(value, variablesDict)
  File "./build/mech_converter.py", line 94, in tokenise_and_process
    new_rhs += 'q(' + str(variablesDict[varname]) + ')'
KeyError: 'NO'

The error is caused by the following lines in the Complex reactions section of the .fac file:

KNO = KRO2NO*NO ;
KHO2 = KRO2HO2*HO2*0.706 ;
KRO2 = 1.26D-12*RO2 ;
KNO3 = KRO2NO3*NO3 ;
KTR = KNO + KHO2 + KRO2 + KNO3 ;
K16ISOM = (KTR*5.18D-04*EXP(1308/TEMP)) + (2.76D07*EXP(-6759/TEMP)) ;

The K16ISOM rate coefficient is part of CRI, the reduced version of the MCM (http://cri.york.ac.uk/), and has been included in the MCM database by mistake. It is unclear when this mistake will be corrected. In the meantime, the recommended workaround is to delete or comment (using *) the above lines in the .fac file and rerun the build_atchem2.sh script.