Yes, by using ":SYNCHRONIZED t" to "make-hash-table",
the hash table issue goes away.

Next is "SPAD_READER" exception.  Looks like our parser code relies
heavily on global variables and stack.

I'll try to only compile Lisp files in parallel later then.

- Qian

On 10/29/24 10:46 AM, Waldek Hebisch wrote:
On Mon, Oct 28, 2024 at 08:21:58PM +0800, Qian Yun wrote:
I just found out that SBCL can COMPILE-FILE in parallel (threads).

I wonder if we can compile SPAD files in parallel.

A little bit of naive trying shows that we should first handle
a issue related with dynamic variable "$inclAssertions".

Then fails in "abbreviationsSpad2Cmd" because
   Unsafe concurrent operations on #<HASH-TABLE :TEST EQUAL :COUNT 14
{1000543DE3}> detected.

I wonder if this is easy to solve and if there are more races ahead.

I think doing early Spad compilation in parallel is hopeless.  Early
compilation is done is serial way because we need to get information
into symbol tables.  Trying to make symbol tables to work in parallel
is IMO more tricky than making them faster as serial thing.  In
principle there could be some gain from parallel compilation of
generated Lisp.


--
You received this message because you are subscribed to the Google Groups "FriCAS - 
computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/fricas-devel/0eef705a-58fd-49f1-8850-19453044ae6e%40gmail.com.

Reply via email to