One of my students is having a severe problem with their project (assignment is: http://turing.plymouth.edu/~kgb1013/?course=4310&project=0). They (and I) are getting a weird error when compiling with my test file, testSemaphore.chpl, available at: http://turing.plymouth.edu/~kgb1013/4310/semaphoreProject/testSemaphore.chpl . The error is this:
$CHPL_HOME/modules/standard/IO.chpl:3038: error: sync variables cannot currently be written - apply readFE/readFF() to those variables first
I've had them remove the body of all of their methods, but they're still getting the error. Here is the body of their code:
use Time;
class Semaphore {
var gate1$ : sync int;
//Constructor
proc Semaphore(){
}
//secondary Constructor
proc Semaphore(givenTokens : int){
}
//returns the number of tokens available
proc getNumTokens() : int {
return 1;
}
//gives out a token
proc p() {
}
//returns a token
proc v() {
}
}
Why are they getting this error?