Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 89 additions & 0 deletions check/fixes.frm
Original file line number Diff line number Diff line change
Expand Up @@ -2476,6 +2476,48 @@ P;
assert succeeded?
assert result("F") =~ expr("9999")
*--#] Issue268_2 :
*--#[ Issue271 :
#-
#define N "16"
Symbol x,n;
Local test = -{`N'*(`N'+1)/2} + <x^1>+...+<x^`N'>;
.sort
#$split = 0;
Identify x^n?pos_ = n;
$split = $split + term_;
ModuleOption sum $split;
.sort
#message split = `$split'
Print;
.end
assert succeeded?
assert stdout =~ exact_pattern(<<EOF)
~~~split = 0
EOF
assert result("test") =~ expr("0")
*--#] Issue271 :
*--#[ Issue271b :
#-
#define N "16"
Symbol x,n;
Local test = -{`N'*(`N'+1)/2} + <x^1>+...+<x^`N'>;
.sort
#$split = 0;
$split = $split + term_;
ModuleOption sum $split;
.sort
#message split = `$split'
Print;
.end
# This symbolic sum doesn't work in TFORM, but does work in ParFORM:
#pend_if threaded?
assert succeeded?
assert stdout =~ exact_pattern(<<EOF)
~~~split = -136+x+x^2+x^3+x^4+x^5+x^6+x^7+x^8+x^9+x^10+x^11+x^12+x^13+x^14+x^15
+x^16
EOF
assert result("test") =~ expr("- 136 + x + x^2 + x^3 + x^4 + x^5 + x^6 + x^7 + x^8 + x^9 + x^10 + x^11 + x^12 + x^13 + x^14 + x^15 + x^16")
*--#] Issue271b :
*--#[ Issue277 :
* A question about addargs
CFunction f,g,h;
Expand Down Expand Up @@ -4448,6 +4490,53 @@ assert warning?("Excess information in symmetric properties")
assert warning?("Illegal information in number of arguments properties")
assert warning?("Undefined $-variable")
*--#] Issue766 :
*--#[ Issue796 :
* Regression: the fix for 796 deadlocks here:
Symbol x;
Local test = <x^1>+...+<x^128>;
#$maxpow = 0;
$maxpow = max_($maxpow,count_(x,1));
ModuleOption maximum $maxpow;
.sort
#message maxpow: `$maxpow'
.end
assert succeeded?
assert stdout =~ exact_pattern(<<'EOF')
maxpow: 128
EOF
*--#] Issue796 :
*--#[ Issue796b :
* Regression: the fix for 796 deadlocks here:
Symbol x;
Local test = <x^1>+...+<x^128>;
#$minpow = 129;
$minpow = min_($minpow,count_(x,1));
ModuleOption minimum $minpow;
.sort
#message minpow: `$minpow'
.end
assert succeeded?
assert stdout =~ exact_pattern(<<'EOF')
minpow: 1
EOF
*--#] Issue796b :
*--#[ Issue796c :
* This case has always deadlocked:
Symbol x;
Local test = <x^1>+...+<x^128>;
#$sumpow = 129;
$sumpow = max_($sumpow,count_(x,1));
ModuleOption sum $sumpow;
.sort
#message sumpow: `$sumpow'
.end
# ParFORM does not pass this test
#pend_if mpi?
assert succeeded?
assert stdout =~ exact_pattern(<<'EOF')
sumpow: 129
EOF
*--#] Issue796c :
*--#[ PullReq535 :
* This test requires more than the specified 50K workspace.
#:maxtermsize 200
Expand Down
3 changes: 1 addition & 2 deletions sources/checkpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -2099,8 +2099,7 @@ int DoRecovery(int *moduletype)
R_COPY_B(d->where, size, void*);
}
#ifdef WITHPTHREADS
d->pthreadslockread = dummylock;
d->pthreadslockwrite = dummylock;
INIRECLOCK(d->pthreadslock);
#endif
if ( d->nfactors > 1 ) {
R_COPY_B(d->factors,sizeof(FACDOLLAR)*d->nfactors,FACDOLLAR*);
Expand Down
6 changes: 6 additions & 0 deletions sources/declare.h
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,12 @@ static inline LONG ULongToLong(ULONG x)
#define INILOCK(x) pthread_mutex_t x = PTHREAD_MUTEX_INITIALIZER;
#define EXTERNRWLOCK(x) extern pthread_rwlock_t x;
#define INIRWLOCK(x) pthread_rwlock_t x = PTHREAD_RWLOCK_INITIALIZER;
#define INIRECLOCK(x) do { pthread_mutexattr_t attrib; \
pthread_mutexattr_init(&attrib); \
pthread_mutexattr_settype(&attrib, PTHREAD_MUTEX_RECURSIVE); \
pthread_mutex_init(&(x), &attrib); \
pthread_mutexattr_destroy(&attrib); \
} while(0)
#ifdef DEBUGGINGLOCKS
#include <asm/errno.h>
#define LOCK(x) while ( pthread_mutex_trylock(&(x)) == EBUSY ) {}
Expand Down
Loading
Loading