ECJ-INTEREST-L Archives

December 2007

ECJ-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Michael B Sullivan <[log in to unmask]>
Reply To:
ECJ Evolutionary Computation Toolkit <[log in to unmask]>
Date:
Thu, 6 Dec 2007 23:04:19 -0500
Content-Type:
text/plain
Parts/Attachments:
text/plain (13 lines)
Hi All,

I have a simple question: What would be the best way to have some initialization code called at the beginning of an ECJ run (before the evaluation threads are spawned)?

I have an evaluation function which requires data to be loaded into memory before the first time it is run.  Currently, I have it such that the data is loaded upon the first time it is called, but I could load the data through an initialization function (or some equivalent), if necessary.  

My problem is that a multithreaded ECJ run will call the function multiple times before the data is fully loaded into memory, resulting in ugly results for the first couple evaluations.

If this issue doesn't fit nicely into the ECJ world view, I can fix it with mutex locks, etc.  However, if there's an easy way to execute code at the beginning of an ECJ run, I would love to hear it.

Thanks!
Mike

ATOM RSS1 RSS2