Questions about multi-threads

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #49887
    liu xuanliu xuan
    Participant

    Hi James,

    I have been simulating microwave radiation transmission in multiple locations recently. I want to run the program with multiple threads. I set nthreads=50 in the run_scatt.sh script. But I found that it is not multi-threads when running. Looking forward to your reply.

    Best wishes.

    LiuXuan

    #49889
    James HockingJames Hocking
    Keymaster

    Hi Liu Xuan,

    I assume you are referring to the run_example_rttovscatt_fwd.sh script which runs the example RTTOV-SCATT program?

    To take advantage of multiple threading via the RTTOV parallel interface, you must compile RTTOV using the OpenMP-enabled compiler flags. When you compile RTTOV you should select a compiler flag file (in build/arch/) with a name ending in “-openmp”, such as gfortran-openmp.

    You must also (obviously) be running on a computer with multiple cores/CPUs that allows for multiple threading via OpenMP. It is generally not worth setting nthreads larger than the number of cores available, although you may wish to experiment with that as I suppose the optimum value of nthreads could be system-dependent and might differ (slightly) to the number of available cores.

    Best wishes,
    James

    #49890
    liu xuanliu xuan
    Participant

    Hi James,

    I use ‘perl run_rttov_scatt_simulate.sh ARCH=gfortran-openmp’ statements to run scripts. I am running the program on a server with multiple cores. Is there anything else that needs to be changed? Looking forward to your reply.

    Best wishes.

    LiuXuan

    #49892
    James HockingJames Hocking
    Keymaster

    Hi LiuXuan,

    Did you compile RTTOV with OpenMP compiler flags? There is nothing else you need to do than that when running the example programs provided with the package.

    It sounds like you have modified one of the provided programs which is absolutely encouraged. Did you keep the part that reads in “nthreads” and runs RTTOV through the parallel interface (e.g. rttov_parallel_direct) if nthreads>1? Try comparing your code with the original example source file you based it on.

    Best wishes,
    James

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.