Hi.
I am trying to install SPC Tool v5. Everything is ok until I created a user account in pgsql and when I run ./sptool_reqd_checks.sh, I got this error:
------PERL------
Perl
-DBI
-DBD-Pg
-Text-CSV
—POSTGRESQL—
PostgreSQL
Error: pg_wrapper: createlang was not found in /usr/lib/postgresql/14/bin
-PL/pgSQL
Anyone could help me how to solve it?
Best regard.
Thanks for your response.
I did what you said. Although the previous problem is solved, I have another problem for executing ./init_sptooldb_v5.0.csh.
I recive this when I run ./init_sptooldb_v5.0.csh:
SPTOOL_SRC_HOME = /home/farzad/SPTOOL/Speciation-Tool-Speciation_Tool_5.0/src
PERL_DBI = Pg
New database: SPTOOL_DB = sptoolv5_0alpha_t1
SPTOOL_USER = farzad
PERL_BIN = /usr/bin
POSTGRES_BIN = /usr/bin
/home/farzad/SPTOOL/Speciation-Tool-Speciation_Tool_5.0/import_data/speciate5.0_exports/export_profiles_2019_0826.txt_clean
/home/farzad/SPTOOL/Speciation-Tool-Speciation_Tool_5.0/import_data/speciate5.0_exports/export_species_properties_2020_0313.txt_clean
Database sptoolv5_0alpha_t1 created
CREATE SCHEMA
Shared schema created
GRANT
Create permissions granted on sptoolv5_0alpha_t1
GRANT
All permissions granted on shared schema
Defining custom functions and initializing tables. …working
Speciation Tool functions and tables successfully defined in sptoolv5_0alpha_t1.
Importing mechanisms /home/farzad/SPTOOL/Speciation-Tool-Speciation_Tool_5.0/import_data/mechanism_forImport.11Feb2020.csv
Cannot open file: /home/farzad/SPTOOL/Speciation-Tool-Speciation_Tool_5.0/import_data/mechanism_forImport.11Feb2020.csv
Issuing rollback() due to DESTROY without explicit disconnect() of DBD::Pg::db handle dbname=sptoolv5_0alpha_t1 at /home/farzad/SPTOOL/Speciation-Tool-Speciation_Tool_5.0/src/import_rawdata.pl line 325.
ERROR: perl script failed for importing mechanisms file /home/farzad/SPTOOL/Speciation-Tool-Speciation_Tool_5.0/import_data/mechanism_forImport.11Feb2020.csv
There’s a mismatch between the names of the data files in the import_data directory and those specified in the Assigns.sptool file. To fix it, update the filenames for MECHANISM, MECHANISM_DESCRIPTION, and CARBONS in the Assigns.sptool file:
@cseppan.
Thanks for your response.
I did what you said. Although the previous problem is solved, I received another error. error.txt (3.4 KB) Assigns.sptool.txt (4.5 KB)
Looks like there was an update to the mechanism description file, but the file in the CMAS package didn’t get updated. You can download the fixed file from the following location, then put it into the import_data directory.
Thanks for your response. @eyth.alison
I did what you recommended, but I received the same error I sent here before. of course it needs to be spoken that the UNK that were produced in gspro.cb6_ae6_voc is solved.
Thanks
It is ok, I set it to CB6R3_AE7.
anyway, the end of the run is written, it was completed but also before it is written unabel to open some files.
NOTICE: ...renormalizing profile weights
NOTICE: ...calculating moles per gram emissions
NOTICE: ...calculating mole percent
NOTICE: ...calculating moles per mole emissions
NOTICE: ...summing on AQM pollutant
NOTICE: ...calculating mole weight percent
NOTICE: ...calculating average molecular weight by species
NOTICE: ...calculating average molecular weight by AQM
Completed splits calculations
NOTICE: Preparing output tables ...
NOTICE: ...completed nonHAP
NOTICE: ...rename output AQM pollutants
Completed output preparations
SUMMARY: Number of profiles generated in run farzad12 is 2543
Unable to open SPECIATE VP output file for writing: ../outputs/SPECIATE5_VP.IVOCP6-SVOCN1.2021Nov6.txt
Completed writing the output files for run farzad12
Finished run_sptool.pl
This may be an error that results from the outputs directory not being created prior to creating the file into that directory.
You could use something like the following command to make the outputs directory and ru-run the script.
(I can’t tell where the outputs directory needs to be created, but if you run this command from the same location where you have your run script, this may work.)
As Liz suggested, the program isn’t able to open the SPECIATE VP output file for writing. Your RUNCTL file explicitly sets the locations for the GSPRO and GSCNV files, e.g.
The location of the SPECIATE VP output file isn’t configurable, and it tries to be written to a directory relative to the Speciation Tool’s “src” directory (…/outputs). This directory already exists as part of the Speciation Tool download package, so I’m not sure why the program can’t write to it. Maybe double-check the permissions, or if you’ve manually moved things around, make sure the outputs directory exists where expected.
Regarding the SPECIATE VP output file, I’m not sure what it’s used for (if anything). It’s not an input file needed for running SMOKE. There’s a sample output file provided in the outputs directory (outputs/SPECIATE5_VP.IVOCP6-SVOCN1.2020Mar18.txt). So it’s probably safe to ignore the error.
Thanks for your response. @cseppan @lizadams
So it’s safe to ignore it.
But I wonder why the programme needs to find SPECIATE5_VP.IVOCP6-SVOCN1.2021Nov11.txt file,
of course, there is that file in the output directory as SPECIATE5_VP.IVOCP6-SVOCN1.2020Mar18.txt.
The file SPECIATE5_VP.IVOCP6-SVOCN1.[run_date].txt is an output file that gets created when the Speciation Tool is run. The outputs directory contains sample outputs from previous runs.
You are right.
Based on this code I have found in write_outputs.pl it should be produced but I do not know why it is not produced.
if ( $runout eq “” || $runout eq “VOC” && $runtype ne “HAPLIST” )
{
$outvoc = “…/outputs/SPECIATE5_VP.IVOCP6-SVOCN1.$runDate.txt”;
open(VOCFILE, “>$outvoc”) or die “Unable to open SPECIATE VP output file for writing: $outvoc\n”;