Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

line-profiler :  pip install line-profiler

gprof2dot : pip install gprof2dot 


How to run?

  1.  prepare a standard launch 
  2. Copy python   folder directory from /gss_efgw_work/work/g2fjc/jintrac/v220922/python   to some location on pfs for example: /pfs/work/g2pbloch/python 
  3. Change JINTRAC_PYTHON_DIR  in rjettov (430 line) to python folder directory on pfs from step 2
  4. Change run_python_driver (line 49) in /pfs/work/g2pbloch/python :
  5. cProfile :  mpirun --allow-run-as-root -np $NPROC python -u  -m cProfile -o jintrac.prof /pfs/work/g2pbloch/jetto_profiler/jintrac_imas_driver.py  mpi 
  6. line-profiler : mpirun --allow-run-as-root -np $NPROC python -u  -m kernprof -l /pfs/work/g2pbloch/jetto_profiler/jintrac_imas_driver.py  mpi 
  7. When we use line-profiler we must add wrapper to profiling function. In this case we should add @profile  upper jintrac_imas_driver function in jintrac_imas_driver.py  : 

    Code Block
    languagepy
    titlefunction wrapper
    @profile
    def jintrac_imas_driver(params, components, mpi='no'):
    
        """JINTRAC-IMAS generic workflow driver."""


  8. Run ./rjettov -S -I -p -x64 test v220922 g2fjc 

...

View file
namecProfile_result.txt
height250

We can also make an image from data:

...