Comments (6)
Implementing the above fix results in the tmux child threads giving the following error:
Saving FPMresp (ID = 35) as "piaacmcconf_i000/FPMresp1_s2_l0565_sr10_nbr032_mr200_ccnbr000_ccz002000_ocr0800_ocz000000_ssr50_ssm0_Mirror_wb10_mp04_thread00.fits" ...creating file "!_savefits_atomic_FPMresp.tmp.fits"
mv: rename !_savefits_atomic_FPMresp.tmp.fits to piaacmcconf_i000/FPMresp1_s2_l0565_sr10_nbr032_mr200_ccnbr000_ccz002000_ocr0800_ocz000000_ssr50_ssm0_Mirror_wb10_mp04_thread00.fits: No such file or directory
I found the file _savefits_atomic_FPMresp.tmp.fits in the working directory (not piaacmcconf_i000). It looks like the fnametmp should not contain the "!", while the name passed to save___fits should. Testing with the following change:
sprintf(fnametmp, "savefits_atomic%s.tmp.fits", ID_name);
sprintf(savename, "!%s", fnametmp);
where "savename" is the name passed to save___fits.
from piaacmcdesign.
I'm concerned about this being thread safe. Isn't there a danger of multiple threads writing to _savefits_atomic_FPMresp.tmp.fits at the same time? I'm adding thread number to the temp filename, which implies changes to the save_fits_atomic signature.
from piaacmcdesign.
I've successfully completed step 100 and am into step 101 with the above fixes. The performance is excellent, seeing a contrast of 1.45738e-09 compared to 1.5e-7 after three iterations of optsingle 200 with the 2.19 code. Something else must have gotten fixed.
from piaacmcdesign.
fixed in release 1.2.25
new function code appends pid and thread id to temporary file name, and fixes the sprintf and "!" bugs:
int save_fits_atomic(char *ID_name, char *file_name)
{
long ID;
int atype;
char fnametmp[1000];
char savename[1000];
char command[2000];
int ret;
pthread_t self_id;
ID = image_ID(ID_name);
self_id=pthread_self();
sprintf(fnametmp, "_savefits_atomic_%s_%d_%ld.tmp.fits", ID_name, (int) getpid(), (unsigned long) self_id);
sprintf(savename, "!%s", fnametmp);
if (ID!=-1)
{
atype = data.image[ID].md[0].atype;
switch(atype) {
case FLOAT:
save_fl_fits(ID_name, savename);
break;
case DOUBLE:
save_db_fits(ID_name, savename);
break;
case USHORT:
save_sh_fits(ID_name, savename);
break;
}
sprintf(command, "mv %s %s", fnametmp, file_name);
ret = system(command);
}
return 0;
}
from piaacmcdesign.
check:
https://guides.github.com/features/mastering-markdown/
On 10/09/2016 06:00 PM, Steve bryson wrote:
How do I turn off markdown? All I want to do is type plain text.
Markdown is removing characters I type.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFVuDT1hoKVcjHZalgIprk81L4yLl5k4ks5qybhugaJpZM4KSHFG.
from piaacmcdesign.
I don’t want to master markdown. I want the plain text I copied to be properly formatted when I paste it in a comment without having to type any extra characters. Imposing markdown in a comment context without it being asked for is absurd.
On Oct 12, 2016, at 12:39 AM, Olivier Guyon [email protected] wrote:
check:
https://guides.github.com/features/mastering-markdown/On 10/09/2016 06:00 PM, Steve bryson wrote:
How do I turn off markdown? All I want to do is type plain text.
Markdown is removing characters I type.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#12 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFVuDT1hoKVcjHZalgIprk81L4yLl5k4ks5qybhugaJpZM4KSHFG.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
from piaacmcdesign.
Related Issues (14)
- PIAA shapes regularization attenuates desired apodization HOT 2
- some more unitialized variables HOT 1
- extraneous cruft in 1.2.19 HOT 1
- non-repeatable core dump in PIAACMCsimul_exec line 5729
- seg faults in save_fits in tmux processes HOT 1
- Fix scope issue that causes OS X to crash HOT 1
- Other scope issues that are a problem on OS X HOT 1
- multiple clock_gettime declarations cause duplicate symbol errors in OS X HOT 1
- Likely bug? HOT 1
- Freeing of uninitialized pointers in PIAACMCsimul.c HOT 1
- A risky race condition in COREMOD_memory.c HOT 1
- Possible copy and paste bug in PIAACMCsimul.c HOT 1
- still seeing the ID = -1 core dump. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from piaacmcdesign.