zzz3639 / EpiAlign

1 stars 0 forks source link

Error with the compile using "CustomFunction.Attention.c" #2

Open guanjue opened 2 years ago

guanjue commented 2 years ago

Hi,

Thank you for provide this package to the community. I have tried it compile with the "CustomFunction.Naive.c". It works great.

However, when I compiled with "CustomFunction.Attention.c", the TwoRegions.out just stop working on the testing data.

Here are the command I used on the testing seq1 seq2 data, and the error: ../bin/TwoRegions.out seq1 seq2 para Segmentation fault (core dumped)

I wonder if there is anyway I can fix this error? Thanks

Best wishes. Guanjue

guanjue commented 2 years ago

The following are the compile outputs: (just in case it is needed)

TwoRegions_baseline.c: In function ‘score_baseline’: TwoRegions_baseline.c:12:8: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] if(strcmp(fit_model,"normal")==0){ ^~ DatabaseSearch_baseline1.c: In function ‘pick_sseq’: DatabaseSearch_baseline1.c:122:5: warning: ‘return’ with no value, in function returning non-void return; ^~ DatabaseSearch_baseline1.c:120:5: note: declared here int pick_sseq(unsigned char sseq, unsigned char sseq_num, int n, unsigned char sseq_out, unsigned char sseq_num_out, int l, int u) ^~~~~ NonOverlapTopK.c: In function ‘main’: NonOverlapTopK.c:86:13: warning: argument 1 value ‘18446744073705551620’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=] Lmatrix = (int)malloc(sizeof(int)hmax);


In file included from NonOverlapTopK.c:2:0:
/usr/include/stdlib.h:465:14: note: in a call to allocation function ‘malloc’ declared here
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
              ^~~~~~
NonOverlapTopK.c:97:18: warning: argument 1 value ‘18446744073701551624’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
     score_matrix = (float**)malloc(sizeof(float*)*hmax);
     ~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from NonOverlapTopK.c:2:0:
/usr/include/stdlib.h:465:14: note: in a call to allocation function ‘malloc’ declared here
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
              ^~~~~~
NonOverlapTopK.c:98:22: warning: argument 1 value ‘18446744073701551624’ exceeds maximum object size 9223372036854775807 [-Walloc-size-larger-than=]
     score_matrix_ori = (float**)malloc(sizeof(float*)*hmax);
     ~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from NonOverlapTopK.c:2:0:
/usr/include/stdlib.h:465:14: note: in a call to allocation function ‘malloc’ declared here
 extern void *malloc (size_t __size) __THROW __attribute_malloc__ __wur;
              ^~~~~~
zzz3639 commented 2 years ago

Hi, Guanjue: Sorry for the late reply, I have to find a machine to bypass the great firewall in order to log in github.

The problem you mentioned is indeed a flaw of our documentation. If you use naive attention score, the "para" is a number. but if you use other attention score, "para" is the path to a parameter file.

The attention score named "attention" in our package, refers to frequency based weights in our paper, and it refers to "unpredictibility" in our documentation, we changed the name in the final revision of our paper. The attention score named "frequency" in our package, we did not put it into our paper.

I attached the parameter files I run EpiAlign. Para.window is for score "attention", includes 2 numbers of 2 window length. E003.logfre is for score "frequency", records the log frequencies of all the chromatin states, of course, the frequency is from cell sample 003.

Hopes it helps.

Best!

My name is ZHANG Haowen

Guanjue Xiang @.***> 于2021年12月17日周五 14:46写道:

Hi,

Thank you for provide this package to the community. I have tried it compile with the "CustomFunction.Naive.c". It works great.

However, when I compiled with "CustomFunction.Attention.c", the TwoRegions.out just stop working on the testing data.

Here are the command I used on the testing seq1 seq2 data, and the error: ../bin/TwoRegions.out seq1 seq2 para Segmentation fault (core dumped)

I wonder if there is anyway I can fix this error? Thanks

Best wishes. Guanjue

— Reply to this email directly, view it on GitHub https://github.com/zzz3639/EpiAlign/issues/2, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADGDEWMM6L2TKD3VFEWLFTDURLMFDANCNFSM5KIDGA6Q . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>

guanjue commented 2 years ago

Hi, Haowen

Thank you for the clarification. The attached files seems cannot be show through the github issue reply system. Do you mind to send the them to my email address? (guanjuexiang@gmail.com)

Best wishes. Guanjue