Csound Csound-dev Csound-tekno Search About

Re: "failed to open file" --- reasons other than filename error

Date2015-11-03 02:52
FromChristopher Bailey
SubjectRe: "failed to open file" --- reasons other than filename error
I've never used it.  I'm open to trying it if it isn't too complicated to get going.

--Chris

>Still trying to think of a debugging stategy; do you now how to use gdb?
>If so it should be possible to find out WHY it cannot open the file.  If
>you are not happy wit gdb we will have to think ofsoething else
>==John ff
>

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-11-03 08:44
FromVictor Lazzarini
SubjectRe: "failed to open file" --- reasons other than filename error
I can reproduce the errors here. I have also made a test CSD which seems to indicate that we can
open up to 250 files simultaneously. Not sure yet where this limit comes from. Here’s the test:

 




instr 1
a1 diskin2 "fox.wav",1
if p4 < 1000 then
print p4
schedule 1,0,2,p4+1
endif
endin
schedule(1,0,2,0)






========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 3 Nov 2015, at 02:52, Christopher Bailey  wrote:
> 
> I've never used it.  I'm open to trying it if it isn't too complicated to get going.
> 
> --Chris
> 
>> Still trying to think of a debugging stategy; do you now how to use gdb?
>> If so it should be possible to find out WHY it cannot open the file.  If
>> you are not happy wit gdb we will have to think ofsoething else
>> ==John ff
>> 
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-11-03 09:59
FromRichard Dobson
SubjectRe: "failed to open file" --- reasons other than filename error
If that is running on a Mac, it could be the limit imposed by default by 
the OS. I hit something similar working on our particle physics 
sonification stuff, opening 100s of small soundfiles. By default the Mac 
imposed quite a low limit, which might well be 256 (whereas Windows by 
default offered IIRC a generous 1024 or so). but there is some low-level 
console command which can be used to increase the limit. I don't 
remember it offhand, but the information is probably buried deep in my 
archives somewhere and I may be able to track it down ere long.

Richard Dobson



On 03/11/2015 08:44, Victor Lazzarini wrote:
> I can reproduce the errors here. I have also made a test CSD which
> seems to indicate that we can open up to 250 files simultaneously.
> Not sure yet where this limit comes from. Here’s the test:
>
..

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-11-03 10:04
FromVictor Lazzarini
SubjectRe: "failed to open file" --- reasons other than filename error
This is the same file in my test, so Csound would have opened it only once.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 3 Nov 2015, at 09:59, Richard Dobson  wrote:
> 
> If that is running on a Mac, it could be the limit imposed by default by the OS. I hit something similar working on our particle physics sonification stuff, opening 100s of small soundfiles. By default the Mac imposed quite a low limit, which might well be 256 (whereas Windows by default offered IIRC a generous 1024 or so). but there is some low-level console command which can be used to increase the limit. I don't remember it offhand, but the information is probably buried deep in my archives somewhere and I may be able to track it down ere long.
> 
> Richard Dobson
> 
> 
> 
> On 03/11/2015 08:44, Victor Lazzarini wrote:
>> I can reproduce the errors here. I have also made a test CSD which
>> seems to indicate that we can open up to 250 files simultaneously.
>> Not sure yet where this limit comes from. Here’s the test:
>> 
> ..
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>       https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-11-03 10:38
FromOeyvind Brandtsegg
SubjectRe: "failed to open file" --- reasons other than filename error
Tested both Victors and Chrostophers's files here on windows and I got
no problems.

kitchen_test_little.csd
...
B 14.670 .. 14.740 T 14.739 TT 14.739 M:  0.09073  0.05582
B 14.740 .. 14.810 T 14.811 TT 14.811 M:  0.00971  0.00445
B 14.810 .. 14.880 T 14.881 TT 14.881 M:  0.00702  0.00301
B 14.880 .. 14.950 T 14.951 TT 14.951 M:  0.00573  0.00371
B 14.950 .. 15.020 T 15.020 TT 15.020 M:  0.00002  0.00002
Score finished in csoundPerform().
inactive allocs returned to freespace
end of score.              overall amps:  0.74792  0.84215
           overall samples out of range:        0        0
0 errors in performance
Elapsed time at end of performance: real: 40.107s, CPU: 40.109s
8192 16384 sample blks of shorts written to kitchen_test_little.aiff (AIFF)


Victor's csd
...
instr 1:  p4 = 994.000
new alloc for instr 1:
diskin2: opened 'fox.wav':
         44100 Hz, 1 channel(s), 121569 sample frames
instr 1:  p4 = 995.000
new alloc for instr 1:
diskin2: opened 'fox.wav':
         44100 Hz, 1 channel(s), 121569 sample frames
instr 1:  p4 = 996.000
new alloc for instr 1:
diskin2: opened 'fox.wav':
         44100 Hz, 1 channel(s), 121569 sample frames
instr 1:  p4 = 997.000
new alloc for instr 1:
diskin2: opened 'fox.wav':
         44100 Hz, 1 channel(s), 121569 sample frames
instr 1:  p4 = 998.000
new alloc for instr 1:
diskin2: opened 'fox.wav':
         44100 Hz, 1 channel(s), 121569 sample frames
instr 1:  p4 = 999.000
new alloc for instr 1:
diskin2: opened 'fox.wav':
         44100 Hz, 1 channel(s), 121569 sample frames
 (...then processes for a very long time)



2015-11-03 11:04 GMT+01:00 Victor Lazzarini :
> This is the same file in my test, so Csound would have opened it only once.
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952
>
>> On 3 Nov 2015, at 09:59, Richard Dobson  wrote:
>>
>> If that is running on a Mac, it could be the limit imposed by default by the OS. I hit something similar working on our particle physics sonification stuff, opening 100s of small soundfiles. By default the Mac imposed quite a low limit, which might well be 256 (whereas Windows by default offered IIRC a generous 1024 or so). but there is some low-level console command which can be used to increase the limit. I don't remember it offhand, but the information is probably buried deep in my archives somewhere and I may be able to track it down ere long.
>>
>> Richard Dobson
>>
>>
>>
>> On 03/11/2015 08:44, Victor Lazzarini wrote:
>>> I can reproduce the errors here. I have also made a test CSD which
>>> seems to indicate that we can open up to 250 files simultaneously.
>>> Not sure yet where this limit comes from. Here’s the test:
>>>
>> ..
>>
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
>
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>         https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here



-- 

Oeyvind Brandtsegg
Professor of Music Technology
NTNU
7491 Trondheim
Norway
Cell: +47 92 203 205

http://flyndresang.no/
http://www.partikkelaudio.com/
http://soundcloud.com/brandtsegg
http://soundcloud.com/t-emp

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-11-03 12:54
FromVictor Lazzarini
SubjectRe: "failed to open file" --- reasons other than filename error
yes, that’s a system issue. This article explains it:

http://krypted.com/mac-os-x/maximum-files-in-mac-os-x/

I’ve checked and the results from my system is:

ligeti:debug victor$ sysctl kern.maxfilesperproc
kern.maxfilesperproc: 50000


so it’s OK, it’s pretty high. The problem is the shell, which needs to be told to open
more files. This does the trick:

ligeti:debug victor$ ulimit -S -n 2048


after that everything runs OK.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 3 Nov 2015, at 10:38, Oeyvind Brandtsegg  wrote:
> 
> Tested both Victors and Chrostophers's files here on windows and I got
> no problems.
> 
> kitchen_test_little.csd
> ...
> B 14.670 .. 14.740 T 14.739 TT 14.739 M:  0.09073  0.05582
> B 14.740 .. 14.810 T 14.811 TT 14.811 M:  0.00971  0.00445
> B 14.810 .. 14.880 T 14.881 TT 14.881 M:  0.00702  0.00301
> B 14.880 .. 14.950 T 14.951 TT 14.951 M:  0.00573  0.00371
> B 14.950 .. 15.020 T 15.020 TT 15.020 M:  0.00002  0.00002
> Score finished in csoundPerform().
> inactive allocs returned to freespace
> end of score.              overall amps:  0.74792  0.84215
>           overall samples out of range:        0        0
> 0 errors in performance
> Elapsed time at end of performance: real: 40.107s, CPU: 40.109s
> 8192 16384 sample blks of shorts written to kitchen_test_little.aiff (AIFF)
> 
> 
> Victor's csd
> ...
> instr 1:  p4 = 994.000
> new alloc for instr 1:
> diskin2: opened 'fox.wav':
>         44100 Hz, 1 channel(s), 121569 sample frames
> instr 1:  p4 = 995.000
> new alloc for instr 1:
> diskin2: opened 'fox.wav':
>         44100 Hz, 1 channel(s), 121569 sample frames
> instr 1:  p4 = 996.000
> new alloc for instr 1:
> diskin2: opened 'fox.wav':
>         44100 Hz, 1 channel(s), 121569 sample frames
> instr 1:  p4 = 997.000
> new alloc for instr 1:
> diskin2: opened 'fox.wav':
>         44100 Hz, 1 channel(s), 121569 sample frames
> instr 1:  p4 = 998.000
> new alloc for instr 1:
> diskin2: opened 'fox.wav':
>         44100 Hz, 1 channel(s), 121569 sample frames
> instr 1:  p4 = 999.000
> new alloc for instr 1:
> diskin2: opened 'fox.wav':
>         44100 Hz, 1 channel(s), 121569 sample frames
> (...then processes for a very long time)
> 
> 
> 
> 2015-11-03 11:04 GMT+01:00 Victor Lazzarini :
>> This is the same file in my test, so Csound would have opened it only once.
>> ========================
>> Dr Victor Lazzarini
>> Dean of Arts, Celtic Studies and Philosophy,
>> Maynooth University,
>> Maynooth, Co Kildare, Ireland
>> Tel: 00 353 7086936
>> Fax: 00 353 1 7086952
>> 
>>> On 3 Nov 2015, at 09:59, Richard Dobson  wrote:
>>> 
>>> If that is running on a Mac, it could be the limit imposed by default by the OS. I hit something similar working on our particle physics sonification stuff, opening 100s of small soundfiles. By default the Mac imposed quite a low limit, which might well be 256 (whereas Windows by default offered IIRC a generous 1024 or so). but there is some low-level console command which can be used to increase the limit. I don't remember it offhand, but the information is probably buried deep in my archives somewhere and I may be able to track it down ere long.
>>> 
>>> Richard Dobson
>>> 
>>> 
>>> 
>>> On 03/11/2015 08:44, Victor Lazzarini wrote:
>>>> I can reproduce the errors here. I have also made a test CSD which
>>>> seems to indicate that we can open up to 250 files simultaneously.
>>>> Not sure yet where this limit comes from. Here’s the test:
>>>> 
>>> ..
>>> 
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>      https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>        https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> 
> 
> 
> -- 
> 
> Oeyvind Brandtsegg
> Professor of Music Technology
> NTNU
> 7491 Trondheim
> Norway
> Cell: +47 92 203 205
> 
> http://flyndresang.no/
> http://www.partikkelaudio.com/
> http://soundcloud.com/brandtsegg
> http://soundcloud.com/t-emp
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-11-03 12:57
FromVictor Lazzarini
SubjectRe: "failed to open file" --- reasons other than filename error
By the way, 

ulimit -a

will tell you the current limits for bash.
========================
Dr Victor Lazzarini
Dean of Arts, Celtic Studies and Philosophy,
Maynooth University,
Maynooth, Co Kildare, Ireland
Tel: 00 353 7086936
Fax: 00 353 1 7086952 

> On 3 Nov 2015, at 12:54, Victor Lazzarini  wrote:
> 
> yes, that’s a system issue. This article explains it:
> 
> http://krypted.com/mac-os-x/maximum-files-in-mac-os-x/
> 
> I’ve checked and the results from my system is:
> 
> ligeti:debug victor$ sysctl kern.maxfilesperproc
> kern.maxfilesperproc: 50000
> 
> 
> so it’s OK, it’s pretty high. The problem is the shell, which needs to be told to open
> more files. This does the trick:
> 
> ligeti:debug victor$ ulimit -S -n 2048
> 
> 
> after that everything runs OK.
> ========================
> Dr Victor Lazzarini
> Dean of Arts, Celtic Studies and Philosophy,
> Maynooth University,
> Maynooth, Co Kildare, Ireland
> Tel: 00 353 7086936
> Fax: 00 353 1 7086952 
> 
>> On 3 Nov 2015, at 10:38, Oeyvind Brandtsegg  wrote:
>> 
>> Tested both Victors and Chrostophers's files here on windows and I got
>> no problems.
>> 
>> kitchen_test_little.csd
>> ...
>> B 14.670 .. 14.740 T 14.739 TT 14.739 M:  0.09073  0.05582
>> B 14.740 .. 14.810 T 14.811 TT 14.811 M:  0.00971  0.00445
>> B 14.810 .. 14.880 T 14.881 TT 14.881 M:  0.00702  0.00301
>> B 14.880 .. 14.950 T 14.951 TT 14.951 M:  0.00573  0.00371
>> B 14.950 .. 15.020 T 15.020 TT 15.020 M:  0.00002  0.00002
>> Score finished in csoundPerform().
>> inactive allocs returned to freespace
>> end of score.              overall amps:  0.74792  0.84215
>>          overall samples out of range:        0        0
>> 0 errors in performance
>> Elapsed time at end of performance: real: 40.107s, CPU: 40.109s
>> 8192 16384 sample blks of shorts written to kitchen_test_little.aiff (AIFF)
>> 
>> 
>> Victor's csd
>> ...
>> instr 1:  p4 = 994.000
>> new alloc for instr 1:
>> diskin2: opened 'fox.wav':
>>        44100 Hz, 1 channel(s), 121569 sample frames
>> instr 1:  p4 = 995.000
>> new alloc for instr 1:
>> diskin2: opened 'fox.wav':
>>        44100 Hz, 1 channel(s), 121569 sample frames
>> instr 1:  p4 = 996.000
>> new alloc for instr 1:
>> diskin2: opened 'fox.wav':
>>        44100 Hz, 1 channel(s), 121569 sample frames
>> instr 1:  p4 = 997.000
>> new alloc for instr 1:
>> diskin2: opened 'fox.wav':
>>        44100 Hz, 1 channel(s), 121569 sample frames
>> instr 1:  p4 = 998.000
>> new alloc for instr 1:
>> diskin2: opened 'fox.wav':
>>        44100 Hz, 1 channel(s), 121569 sample frames
>> instr 1:  p4 = 999.000
>> new alloc for instr 1:
>> diskin2: opened 'fox.wav':
>>        44100 Hz, 1 channel(s), 121569 sample frames
>> (...then processes for a very long time)
>> 
>> 
>> 
>> 2015-11-03 11:04 GMT+01:00 Victor Lazzarini :
>>> This is the same file in my test, so Csound would have opened it only once.
>>> ========================
>>> Dr Victor Lazzarini
>>> Dean of Arts, Celtic Studies and Philosophy,
>>> Maynooth University,
>>> Maynooth, Co Kildare, Ireland
>>> Tel: 00 353 7086936
>>> Fax: 00 353 1 7086952
>>> 
>>>> On 3 Nov 2015, at 09:59, Richard Dobson  wrote:
>>>> 
>>>> If that is running on a Mac, it could be the limit imposed by default by the OS. I hit something similar working on our particle physics sonification stuff, opening 100s of small soundfiles. By default the Mac imposed quite a low limit, which might well be 256 (whereas Windows by default offered IIRC a generous 1024 or so). but there is some low-level console command which can be used to increase the limit. I don't remember it offhand, but the information is probably buried deep in my archives somewhere and I may be able to track it down ere long.
>>>> 
>>>> Richard Dobson
>>>> 
>>>> 
>>>> 
>>>> On 03/11/2015 08:44, Victor Lazzarini wrote:
>>>>> I can reproduce the errors here. I have also made a test CSD which
>>>>> seems to indicate that we can open up to 250 files simultaneously.
>>>>> Not sure yet where this limit comes from. Here’s the test:
>>>>> 
>>>> ..
>>>> 
>>>> Csound mailing list
>>>> Csound@listserv.heanet.ie
>>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>>> Send bugs reports to
>>>>     https://github.com/csound/csound/issues
>>>> Discussions of bugs and features can be posted here
>>> 
>>> Csound mailing list
>>> Csound@listserv.heanet.ie
>>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>>> Send bugs reports to
>>>       https://github.com/csound/csound/issues
>>> Discussions of bugs and features can be posted here
>> 
>> 
>> 
>> -- 
>> 
>> Oeyvind Brandtsegg
>> Professor of Music Technology
>> NTNU
>> 7491 Trondheim
>> Norway
>> Cell: +47 92 203 205
>> 
>> http://flyndresang.no/
>> http://www.partikkelaudio.com/
>> http://soundcloud.com/brandtsegg
>> http://soundcloud.com/t-emp
>> 
>> Csound mailing list
>> Csound@listserv.heanet.ie
>> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
>> Send bugs reports to
>>       https://github.com/csound/csound/issues
>> Discussions of bugs and features can be posted here
> 
> Csound mailing list
> Csound@listserv.heanet.ie
> https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
> Send bugs reports to
>        https://github.com/csound/csound/issues
> Discussions of bugs and features can be posted here

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here

Date2015-11-03 13:33
FromRichard Dobson
SubjectRe: "failed to open file" --- reasons other than filename error
Yes, that's what I remember having to do before.

Richard Dobson

On 03/11/2015 12:54, Victor Lazzarini wrote:
..
>
>
> so it’s OK, it’s pretty high. The problem is the shell, which needs to be told to open
> more files. This does the trick:
>
> ligeti:debug victor$ ulimit -S -n 2048
>
>
> after that everything runs OK.

Csound mailing list
Csound@listserv.heanet.ie
https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND
Send bugs reports to
        https://github.com/csound/csound/issues
Discussions of bugs and features can be posted here