sogno-platform / dpsim

Real-time power system simulator including powerflow, (dynamic) phasors and EMT
https://sogno.energy/dpsim/
Mozilla Public License 2.0
67 stars 49 forks source link

Getting Error fatal error: 'DPsim.h' file not found #313

Open morje-datta opened 3 days ago

morje-datta commented 3 days ago

Hello, Current I have install fedora 36 install on my desktop.I have tried to build the dpsim library by step from following page https://dpsim.fein-aachen.org/docs/getting-started/build/

completed step mentioned on web pages. when i tried to run the WSCC-9bus_CIM or any other file getting error saying 'DPsim.h' file not found. Added the path for it but error remains the same.

Screenshot from 2024-07-03 17-21-38

leonardocarreras commented 2 days ago

Hi @morje-datta, welcome to DPSim! As far as our knowledge goes, Fedora 36 is fully supported and our CI is actually using that specific version to build and test.

We would be keen to help, but we need more information. If you are a beginner with DPSim, one good starting point is to try to compile using the docker image that already includes all the things you need to succeed. That being said, if you are trying to compile natively then you need to self-support yourself a bit, you may want to ensure you have all the required dependencies installed. You can figure that out from the docker container and/or the scripts.

Another point to take in account, is that usually it is a little easier to compile using gcc than clang, some library support is better. That does not seems to be your choice from the screenshot provided. In the documentation steps we are using gcc.

Additionally, two more things to try: 1) run cmake from the terminal as it is described in the documentation, and include the target (for this case --target WSCC-9bus_CIM) and 2) run the file generated in the build folder using the terminal for example ./build/dpsim/examples/cxx/WSCC-9bus_CIM (and not via Visual Studio Code). Configuring cmake in VSC can be a tricky task.

If you need more support, feel free to provide more details here. Another option is to join the slack channel #sogno-dpsim (as described in the repo) and ask there.

morje-datta commented 2 days ago

Hie @leonardocarreras above reply was help to me. Library was build using docker image. I have run the command(./build/dpsim/examples/cxx/WSCC-9bus_CIM) from terminal it got run and shown the output.

when i made changes to the WSCC-9bus_CIM.cpp file(change finalTime =0.1=>finalTime =1) and try to build it give me following error

/usr/bin/ld: cannot find -lGSL_LIBRARY-NOTFOUND /usr/bin/ld: cannot find -lGSL_CBLAS_LIBRARY-NOTFOUND collect2: error: ld returned 1 exit status

Screenshot from 2024-07-04 12-32-47

leonardocarreras commented 1 day ago

Hi, I cannot reproduce the error, would you mind to maybe start again from scratch? image The output for me is image

For the time/timestep, actually there is a small error in the code, you need to change https://github.com/sogno-platform/dpsim/blob/204eb27629d96a6625d858cbd773d08fb95f5f7f/dpsim/examples/cxx/CIM/WSCC-9bus_CIM.cpp#L60-L61 for image