GridOPTICS / GridPACK

https://www.gridpack.org/
47 stars 22 forks source link

Hello_world example #205

Open Triangel000 opened 9 months ago

Triangel000 commented 9 months ago

I followed the steps to install GridPACK based on Linux. And I am trying to run the hello_world example, but it does not work at my end. I am wondering if that example is workable at your end or not?

abhyshr commented 9 months ago

Haven't tested that example. @bjpalmer @wperkins does this example work?

wperkins commented 9 months ago

@Triangel000, what code branch, develop? master is pretty old and we are overdue with an update. It would also be helpful to document exactly what you did and what error(s) you got.

wperkins commented 9 months ago

FWIW, hello_world.x works on my system (Ubuntu 20) with the develop branch.

As a unit test:

d> ctest -R hello
Test project /home/d3g096/Projects/GridPakLDRD/GridPACK.github/master/src/build
    Start 92: hello_world_serial
1/2 Test #92: hello_world_serial ...............   Passed    0.55 sec
    Start 93: hello_world_parallel
2/2 Test #93: hello_world_parallel .............   Passed    0.55 sec

100% tests passed, 0 tests failed out of 2

Total Test time (real) =   1.11 sec

Running the binary directly:

d> cd applications/examples/hello_world/
d> mpiexec -np 2 hello_world.x 
GridPACK math module configured on 2 processors
1: I have 60 buses and 95 branches
0: I have 60 buses and 95 branches

Message from buses
Hello world from bus 1
[...]
Hello world from bus 100

Message from branches
Hello world from the branch connecting bus 1 to bus 2
[...]
Hello world from the branch connecting bus 90 to bus 100
Triangel000 commented 9 months ago

Thank you so much. It seems to be working now. Thanks a lot!