Comments (6)
Mmh, this is just a debug log message, not an error message and not a message regarding the calculation. Without more details (server setup, native libraries loaded or not, database, what does not work) it is hard to say something.
from olca-modules.
Hi @msrocka. Thank you for your response and sorry for the delay.
I am starting the server running the following line in my terminal
.\ipc-server.cmd ecoinvent_v3_10_Consequential_Unit_Processes_2024_01_22_rodolpho
After that, I run something similar the example below (which runs into the same problem).
It never prints the "Finished"
string, so it is probably something wrong in the calculation part.
import olca_ipc
import olca_schema
client = olca_ipc.Client(8080)
group = olca_schema.new_unit_group('Mass units', 'kg')
mass = olca_schema.new_flow_property('Mass', group)
client.put_all(group, mass)
concrete = client.get(olca_schema.Flow, 'ef5d9b7f-0d4a-49b9-a2eb-eef36ded1c38')
steel = client.get(olca_schema.Flow, '0c826417-e870-4c43-95c4-b38ff2ff47d2')
output_product = olca_schema.new_product("MyProduct", mass)
client.put(output_product)
process = olca_schema.new_process("MyProcess")
exchange = olca_schema.new_input(process, concrete, 10)
exchange.is_quantitative_reference = True
exchange = olca_schema.new_input(process, steel, 5)
exchange.is_quantitative_reference = True
exchange = olca_schema.new_output(process, output_product, 1)
exchange.is_quantitative_reference = True
created_process = client.put(process)
product_system = client.create_product_system(created_process)
method = client.get_descriptors(olca_schema.ImpactMethod)[0]
calculationSetup = olca_schema.CalculationSetup(
target = product_system,
impact_method = method,
)
print("Start calculation")
result = client.calculate(calculationSetup)
result.wait_until_ready()
print("Finished!")
impacts = result.get_total_impacts()
from olca-modules.
Hi @msrocka !
I was wondering if you had time to look at my example.
Thanks!
from olca-modules.
The script works for me (but it should not create mass and a unit group but should instead get it from the database like it is done for the linked products). What is missing currently in the server startup script is the loading of the calculation libraries, the calculation then takes quite some time. The -native
parameter needs to be set to a location where the calculation libraries can be found (it is described in the ipc-doc). If the script is started from a current MKL version it should point to the installation folder; something like
%java% -Xmx3584M -cp * org.openlca.ipc.Server -timeout 30 -native %script_dir%\.. -db %1
from olca-modules.
Hi @msrocka ! Thank you so much for your response.
I understand that I have to point the calculation libraries folder. But I am having trouble to find it.
Shouldn't it be inside the database? I am getting confused because when I open the database with OpenLCA, there is a folder (that seems to be inside the database) with the methods. However, when I double click on the database, this is what I see
from olca-modules.
Also, if it is not too much trouble, could you send me a command example (with all the necessary parameters) that I should run in order for my code to work?
from olca-modules.
Related Issues (20)
- Database update v8
- Close mapped byte buffers
- OLCA-Geo Maven links out of date HOT 2
- Could not find artifact org.openlca:olca-core:jar:2.0.0 in central HOT 1
- Loading zolca file in olca-ipc HOT 4
- Compilation fails for olca-proto module HOT 1
- Publish Jar to a maven repository HOT 5
- Lower Java dependency HOT 2
- es2 import: include more attributes for generating the process IDs
- How to connect to collaboration server? HOT 2
- Compilation fails on olca-formula HOT 5
- Calculation via IPC Server Fails With `NullPointerException` HOT 1
- Howto use olca-core in custom project HOT 1
- No result after "Impact factor matrix ready"
- Multiple Issues with MySQL schema on version 1.11.0 HOT 3
- Switch to another framework for primitive collections
- importing via json for impact categories does not link sources
- Binaries are not properly imported when merging to a database. HOT 1
- Error when building modules HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from olca-modules.