I want to run C++ simulations from a jupyter notebook. The program needs three values in input, i.e. 10
, 0.2
and 0.6
.
This what I am doing now and it works fine:
## Compile
! mpicxx -o main main.cpp Node.cpp Agent.cpp -std=gnu++11
## Run
! mpirun -np 1 ./main 10 0.2 0.6
But if try to declare those values before, it does not recognizes them.
a = 10
b = 0.2
c = 0.6
! mpirun -np 1 ./main a b c