Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I'm trying to implement parallelization in someone else code that searches through a very big parameter space (a.k.a. all the possible combinations of the possible values of the defined parameters).
Is it possible that you are solving an Optimization problem? I.e. could you define a loss function which would show how far are you from your goal? If that's the case, take a look at existing optimization libraries such as NLopt which take that function and arrive at the solution by faster means than space-exhausting search. They do make assumptions about "good behaviour" of said function (i.e. it should reasonably decrease when you are approaching closer to the solution) and some of them require partial derivatives of this function with respect to all variables optimized (but sometimes you can use a numeric finite difference approximation instead).

Unfortunately, there are no NLopt bindings for Perl right now (which may make most of my post moot). Twice unfortunately, most optimizing algorithms are single-threaded by design (but there are exceptions). But if you write your task in C or C++ (Fortran isn't likely to be the language of choice for bioinformatics) you could use OpenMP to launch several parallel optimizing threads with different settings.

NB: It is usually considered good thing to parallelize the most outer loops, not the most inner ones.


In reply to Re: Parallelization of multiple nested loops by Anonymous Monk
in thread Parallelization of multiple nested loops by biosub

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2024-03-29 00:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found