problem for running openquake

97 views
Skip to first unread message

hasan mousavi

unread,
Dec 10, 2012, 8:14:18 AM12/10/12
to openqu...@googlegroups.com
Dear all
I installed OpenQuake on  Laptop with Ubuntu 12.04 32bit machine (2 month ago) and run it correctly.
OpenQuake version 0.8.3, released 2012-10-23T08:31:12Z
now, I want to run it
hasan@hasan:~/Desktop/openquake-test/test1$ openquake --config-file config.gem

it give some error

Traceback (most recent call last):
  File "/usr/bin/openquake", line 9, in <module>
    load_entry_point('openquake==0.8.3', 'console_scripts', 'openquake')()
  File "/usr/lib/pymodules/python2.7/openquake/bin/oqscript.py", line 190, in main
    ajob = engine.prepare_job(user_name)
  File "/usr/lib/pymodules/python2.7/openquake/engine.py", line 654, in prepare_job
    job.save()
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 460, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 553, in save_base
    result = manager._insert(values, return_id=update_pk, using=using)
  File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 195, in _insert
    return insert_query(self.model, values, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 1436, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 791, in execute_sql
    cursor = super(SQLInsertCompiler, self).execute_sql(None)
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 735, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/python2.7/dist-packages/django/db/backends/postgresql_psycopg2/base.py", line 44, in execute
    return self.cursor.execute(query, args)
django.db.utils.DatabaseError: column "description" of relation "oq_job" does not exist
LINE 1: INSERT INTO "uiapi"."oq_job" ("owner_id", "description", "pa...
                                                  ^


I will be glad if anyone can help me on this issue.
hasan mousavi

Lars Butler

unread,
Dec 10, 2012, 9:54:50 AM12/10/12
to openqu...@googlegroups.com
Hi Hasan,

The error you're getting indicates that your postgres database is running a version of the schema that doesn't match what the software is expecting.

I would start with the easy and simple stuff first: try to upgrade the package, then delete/reinstall if that doesn't work.

To upgrade:
$ sudo apt-get install --only-upgrade python-oq

To delete/reinstall:
$ sudo apt-get remove --purge python-oq
$ sudo apt-get install python-oq

Try that and let us know if you still have problems.

Thanks,
Lars

hasan mousavi

unread,
Dec 10, 2012, 12:00:36 PM12/10/12
to openqu...@googlegroups.com
Dear Lars
Thanks a million because of your useful answer. It solved my problem, but unfortunately when I run this command

hasan@hasan-Vostro-1400:~/Desktop/openquake-test1$ openquake --config-file config.gem
[2012-12-10 17:18:19,718 #27 hasan-Vostro-1400 PROGRESS MainProcess/3447 root] ** initializing (hazard)
[2012-12-10 17:18:20,857 #27 hasan-Vostro-1400 PROGRESS MainProcess/3447 root] ** pre_executing (hazard)
[2012-12-10 17:18:21,057 #27 hasan-Vostro-1400 PROGRESS MainProcess/3447 root] ** executing (hazard)
[2012-12-10 17:18:39,163 #27 hasan-Vostro-1400 PROGRESS MainProcess/3447 root] **  > hazard 100% complete
[2012-12-10 17:18:39,525 #27 hasan-Vostro-1400 PROGRESS MainProcess/3447 root] ** post_executing (hazard)
[2012-12-10 17:18:39,570 #27 hasan-Vostro-1400 PROGRESS MainProcess/3447 root] ** clean_up (hazard)
hasan@hasan-Vostro-1400:~/Desktop/openquake-test1$

received this warning in celeryd terminal

hasan@hasan-Vostro-1400:/usr/openquake$ celeryd
[2012-12-10 17:17:48,566: WARNING/MainProcess] 

 -------------- celery@hasan-Vostro-1400 v2.4.6
---- **** -----
--- * ***  * -- [Configuration]
-- * - **** ---   . broker:      amqp://guest@localhost:5672//
- ** ----------   . loader:      celery.loaders.default.Loader
- ** ----------   . logfile:     [stderr]@WARNING
- ** ----------   . concurrency: 2
- ** ----------   . events:      OFF
- *** --- * ---   . beat:        OFF
-- ******* ----
--- ***** ----- [Queues]
 --------------   . celery:      exchange:celery (direct) binding:celery
                 

[2012-12-10 17:17:48,575: WARNING/MainProcess] celery@hasan-Vostro-1400 has started.
Dec 10, 2012 5:18:22 PM org.jredis.ri.alphazero.support.Log log
INFO: WARNING:
heartbeat is disabled.

At first I want to know this is a serious problem or not.
After that, the output of this running is:

<?xml version='1.0' encoding='UTF-8'?>
<nrml xmlns:gml="http://www.opengis.net/gml" xmlns="http://openquake.org/xmlns/nrml/0.3" gml:id="ID0">
  <disaggregationResultField gml:id="ID1" poE="0.1" IMT="PGA" endBranchLabel="1">
    <disaggregationResultTypes>MagPMF DistPMF TRTPMF MagDistPMF MagDistEpsPMF LatLonPMF LatLonMagPMF LatLonMagEpsPMF MagTRTPMF LatLonTRTPMF FullDisaggMatrix</disaggregationResultTypes>
    <disaggregationResultNode gml:id="ID2">
      <site>
        <gml:Point>
          <gml:pos>0.0 0.0</gml:pos>
        </gml:Point>
      </site>
      <disaggregationResult groundMotionValue="0.312215899093" path="/var/lib/openquake/disagg-results/job-27/disagg-results-sample:1-gmv:0.3122159-lat:0.0000000-lon:0.0000000.h5"/>
    </disaggregationResultNode>
  </disaggregationResultField>
</nrml>

Now, I want to know how could open h5 file or convert to xml or dat file, as was shown in Demo folders.
Another question: could you please introduce me any software to make or edit XML files and plot outputs of openquake.

Thanks a lot
Hasan

Lars Butler

unread,
Dec 10, 2012, 12:28:18 PM12/10/12
to openqu...@googlegroups.com
Hi Hasan,

Comments below.

Lars


This is just warning; you can safely ignore it.
 

At first I want to know this is a serious problem or not.
After that, the output of this running is:

<?xml version='1.0' encoding='UTF-8'?>
<nrml xmlns:gml="http://www.opengis.net/gml" xmlns="http://openquake.org/xmlns/nrml/0.3" gml:id="ID0">
  <disaggregationResultField gml:id="ID1" poE="0.1" IMT="PGA" endBranchLabel="1">
    <disaggregationResultTypes>MagPMF DistPMF TRTPMF MagDistPMF MagDistEpsPMF LatLonPMF LatLonMagPMF LatLonMagEpsPMF MagTRTPMF LatLonTRTPMF FullDisaggMatrix</disaggregationResultTypes>
    <disaggregationResultNode gml:id="ID2">
      <site>
        <gml:Point>
          <gml:pos>0.0 0.0</gml:pos>
        </gml:Point>
      </site>
      <disaggregationResult groundMotionValue="0.312215899093" path="/var/lib/openquake/disagg-results/job-27/disagg-results-sample:1-gmv:0.3122159-lat:0.0000000-lon:0.0000000.h5"/>
    </disaggregationResultNode>
  </disaggregationResultField>
</nrml>
 
Now, I want to know how could open h5 file or convert to xml or dat file, as was shown in Demo folders.

If you're familiar with MATLAB, it is an option for reading HDF5: http://www.mathworks.ch/ch/help/matlab/ref/hdf5read.html
If you're more into Python, you can try h5py: http://code.google.com/p/h5py/
 
Another question: could you please introduce me any software to make or edit XML files and plot outputs of openquake.

The short answer is, there is nothing in particular I can recommend. Since this mailing is mostly for technical and development issues, you may want to post a question about this in the openquake-users group (https://groups.google.com/forum/?fromgroups#!forum/openquake-users). It is more likely that someone in that group will have some suggestions about how to visualize and post-process calculation results. That's the best I can offer at the moment, sorry.

hasan mousavi

unread,
Dec 10, 2012, 3:34:39 PM12/10/12
to openqu...@googlegroups.com
Hi Lars
Thanks for your useful comment
Hasan
Reply all
Reply to author
Forward
0 new messages