timothyfrasier / related

8 stars 7 forks source link

error with coancestry() function on M1 Mac #11

Open shailee93 opened 1 year ago

shailee93 commented 1 year ago

Hi Tim,

I just re-installed related on my M1 Macbook Pro using the instructions you provided here: https://github.com/timothyfrasier/related

Here is the report from the installation:

> install.packages("~/Downloads/related_1.0.tar.gz", repos = NULL, type = "source")
* installing *source* package ‘related’ ...
** using staged installation
** libs
clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG   -I/usr/local/include   -fPIC  -Wall -g -O2  -c family_sim.c -o family_sim.o
gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls  -fPIC  -Wall -g -O2  -c  related.f90 -o related.o
related.f90:610:10:

  610 |       S = Sum(ObsAlleleFre(1 : ObsNumAllele(I), I))
      |          1
Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Wconversion]
related.f90:1936:53:

 1936 |       if(abs(p)>=abs(.5_DP*q*etemp).or.p<=q*(a-x).or.p>=q*(b-x)) goto 1
      |                                                     ^
Warning: 'e' may be used uninitialized [-Wmaybe-uninitialized]
related.f90:1906:46:

 1906 |   REAL(DP) brent,tol,xmin,f,CGOLD,ZEPS,a,b,d,e,etemp, &
      |                                              ^
note: 'e' was declared here
related.f90:5105:49:

 5105 |         3*q(2)*q(3) + q(1)*(1 + 7*q(2) + 7*q(3)))
      |                                                 ^
Warning: 'q[2]' may be used uninitialized [-Wmaybe-uninitialized]
related.f90:4961:34:

 4961 |   REAL(DP):: Y, P(4), e2, e0, Q(3)
      |                                  ^
note: 'q[2]' was declared here
related.f90:5105:49:

 5105 |         3*q(2)*q(3) + q(1)*(1 + 7*q(2) + 7*q(3)))
      |                                                 ^
Warning: 'q[1]' may be used uninitialized [-Wmaybe-uninitialized]
related.f90:4961:34:

 4961 |   REAL(DP):: Y, P(4), e2, e0, Q(3)
      |                                  ^
note: 'q[1]' was declared here
related.f90:5105:49:

 5105 |         3*q(2)*q(3) + q(1)*(1 + 7*q(2) + 7*q(3)))
      |                                                 ^
Warning: 'q[0]' may be used uninitialized [-Wmaybe-uninitialized]
related.f90:4961:34:

 4961 |   REAL(DP):: Y, P(4), e2, e0, Q(3)
      |                                  ^
note: 'q[0]' was declared here
related.f90:79:31:

   79 |   REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)
      |                               ^
Warning: 'rr.offset' may be used uninitialized [-Wmaybe-uninitialized]
related.f90:298:53:

  298 |                 DCI95(J, I, K, M) = DD(I025(J), I, K)
      |                                                     ^
Warning: 'dd.dim[2].stride' may be used uninitialized [-Wmaybe-uninitialized]
related.f90:79:44:

   79 |   REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)
      |                                            ^
note: 'dd.dim[2].stride' was declared here
related.f90:79:44: Warning: 'dd.dim[1].stride' may be used uninitialized [-Wmaybe-uninitialized]
related.f90:79:44: Warning: 'dd.offset' may be used uninitialized [-Wmaybe-uninitialized]
clang -mmacosx-version-min=10.13 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o related.so family_sim.o related.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'
ld: warning: ignoring file /usr/local/gfortran/lib/libgfortran.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
ld: warning: ignoring file related.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64
ld: warning: ignoring file /usr/local/gfortran/lib/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-related/00new/related/libs
** R
** data
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (related)

I was able to use the readgenotype function to read in my genotype file, but when I try to run coancestry, it R gives me the following error:

Error in .Fortran("related", PACKAGE = "related") : 
  "related" not available for .Fortran() for package "related"
Timing stopped at: 0 0 0

I'm on R package version 4.2.1 and RStudio version 2022.07.2

Thanks for your help!

timothyfrasier commented 1 year ago

Hi:

Do you get this error when trying to estimate relatedness on the example data file, or just on your own? Please try to example data file and see how that works, and that will help with trouble-shooting.

Thanks! -Tim


Timothy R. Frasier Coordinator: Forensic Sciences Program Professor: Biology Saint Mary's University 923 Robie Street Halifax, Nova Scotia B3H 3C3 Canada Tel: (902) 491-6382 E-mail: @.*** frasierlab.ca


From: shailee93 @.> Sent: Tuesday, November 15, 2022 9:32 PM To: timothyfrasier/related @.> Cc: Subscribed @.***> Subject: [timothyfrasier/related] error with coancestry() function on M1 Mac (Issue #11)

Hi Tim,

I just re-installed related on my M1 Macbook Pro using the instructions you provided here: https://github.com/timothyfrasier/relatedhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimothyfrasier%2Frelated&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KADCrH0i71Mgl1LklQSHDUXG%2BM9bUxH21VyNoevV8hA%3D&reserved=0

Here is the report from the installation:

install.packages("~/Downloads/related_1.0.tar.gz", repos = NULL, type = "source")

** using staged installation

** libs

clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c family_sim.c -o family_sim.o

gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c related.f90 -o related.o

related.f90:610:10:

610 | S = Sum(ObsAlleleFre(1 : ObsNumAllele(I), I))

  |          1

Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Wconversion]

related.f90:1936:53:

1936 | if(abs(p)>=abs(.5_DPqetemp).or.p<=q(a-x).or.p>=q(b-x)) goto 1

  |                                                     ^

Warning: 'e' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:1906:46:

1906 | REAL(DP) brent,tol,xmin,f,CGOLD,ZEPS,a,b,d,e,etemp, &

  |                                              ^

note: 'e' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

  |                                                 ^

Warning: 'q[2]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

  |                                  ^

note: 'q[2]' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

  |                                                 ^

Warning: 'q[1]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

  |                                  ^

note: 'q[1]' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

  |                                                 ^

Warning: 'q[0]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

  |                                  ^

note: 'q[0]' was declared here

related.f90:79:31:

79 | REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)

  |                               ^

Warning: 'rr.offset' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:298:53:

298 | DCI95(J, I, K, M) = DD(I025(J), I, K)

  |                                                     ^

Warning: 'dd.dim[2].stride' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:79:44:

79 | REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)

  |                                            ^

note: 'dd.dim[2].stride' was declared here

related.f90:79:44: Warning: 'dd.dim[1].stride' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:79:44: Warning: 'dd.offset' may be used uninitialized [-Wmaybe-uninitialized]

clang -mmacosx-version-min=10.13 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o related.so family_sim.o related.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'

ld: warning: ignoring file /usr/local/gfortran/lib/libgfortran.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

ld: warning: ignoring file related.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64

ld: warning: ignoring file /usr/local/gfortran/lib/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-related/00new/related/libs

** R

** data

** byte-compile and prepare package for lazy loading

** help

*** installing help indices

** building package indices

** installing vignettes

** testing if installed package can be loaded from temporary location

** checking absolute paths in shared objects and dynamic libraries

** testing if installed package can be loaded from final location

** testing if installed package keeps a record of temporary installation path

I was able to use the readgenotype function to read in my genotype file, but when I try to run coancestry, it R gives me the following error:

Error in .Fortran("related", PACKAGE = "related") :

"related" not available for .Fortran() for package "related"

Timing stopped at: 0 0 0

I'm on R package version 4.2.1 and RStudio version 2022.07.2

Thanks for your help!

— Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimothyfrasier%2Frelated%2Fissues%2F11&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0%2FPpt%2FW6WFLADh%2FxJ1R9HfSqyLJr7v0Y9aQEek1GdBE%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA3NYWN5WNLOER5URHVPTV3WIQ2S5ANCNFSM6AAAAAASBTNVHQ&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2v3jC83xjp63JahroQINGf4wMvAHyYfTVZgsR4G%2FCHg%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***>

shailee93 commented 1 year ago

Hi Tim,

Sorry for the very late response to this! I ended up just switching to an older version of R (R 3.6.3), and it worked out. So I think the issue was probably driven by the latest version of R (R 4.2.2).

Best, Shailee


Shailee Shah (she/her), PhD Postdoctoral Research Associate, Chen Lab https://popgenchenlab.github.io/ University of Rochester https://shailee-shah.com https://shailee-shah.com/ • @shailee_shah93 https://twitter.com/shailee_shah93

On Nov 16, 2022, at 10:42, timothyfrasier @.***> wrote:

Hi:

Do you get this error when trying to estimate relatedness on the example data file, or just on your own? Please try to example data file and see how that works, and that will help with trouble-shooting.

Thanks! -Tim


Timothy R. Frasier Coordinator: Forensic Sciences Program Professor: Biology Saint Mary's University 923 Robie Street Halifax, Nova Scotia B3H 3C3 Canada Tel: (902) 491-6382 E-mail: @.*** frasierlab.ca


From: shailee93 @.> Sent: Tuesday, November 15, 2022 9:32 PM To: timothyfrasier/related @.> Cc: Subscribed @.***> Subject: [timothyfrasier/related] error with coancestry() function on M1 Mac (Issue #11)

Hi Tim,

I just re-installed related on my M1 Macbook Pro using the instructions you provided here: https://github.com/timothyfrasier/relatedhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimothyfrasier%2Frelated&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KADCrH0i71Mgl1LklQSHDUXG%2BM9bUxH21VyNoevV8hA%3D&reserved=0

Here is the report from the installation:

install.packages("~/Downloads/related_1.0.tar.gz", repos = NULL, type = "source")

  • installing source package ‘related’ ...

** using staged installation

** libs

clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c family_sim.c -o family_sim.o

gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c related.f90 -o related.o

related.f90:610:10:

610 | S = Sum(ObsAlleleFre(1 : ObsNumAllele(I), I))

| 1

Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Wconversion]

related.f90:1936:53:

1936 | if(abs(p)>=abs(.5_DPqetemp).or.p<=q(a-x).or.p>=q(b-x)) goto 1

| ^

Warning: 'e' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:1906:46:

1906 | REAL(DP) brent,tol,xmin,f,CGOLD,ZEPS,a,b,d,e,etemp, &

| ^

note: 'e' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

| ^

Warning: 'q[2]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

| ^

note: 'q[2]' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

| ^

Warning: 'q[1]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

| ^

note: 'q[1]' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

| ^

Warning: 'q[0]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

| ^

note: 'q[0]' was declared here

related.f90:79:31:

79 | REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)

| ^

Warning: 'rr.offset' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:298:53:

298 | DCI95(J, I, K, M) = DD(I025(J), I, K)

| ^

Warning: 'dd.dim[2].stride' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:79:44:

79 | REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)

| ^

note: 'dd.dim[2].stride' was declared here

related.f90:79:44: Warning: 'dd.dim[1].stride' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:79:44: Warning: 'dd.offset' may be used uninitialized [-Wmaybe-uninitialized]

clang -mmacosx-version-min=10.13 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o related.so family_sim.o related.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'

ld: warning: ignoring file /usr/local/gfortran/lib/libgfortran.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

ld: warning: ignoring file related.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64

ld: warning: ignoring file /usr/local/gfortran/lib/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-related/00new/related/libs

** R

** data

** byte-compile and prepare package for lazy loading

** help

*** installing help indices

** building package indices

** installing vignettes

** testing if installed package can be loaded from temporary location

** checking absolute paths in shared objects and dynamic libraries

** testing if installed package can be loaded from final location

** testing if installed package keeps a record of temporary installation path

  • DONE (related)

I was able to use the readgenotype function to read in my genotype file, but when I try to run coancestry, it R gives me the following error:

Error in .Fortran("related", PACKAGE = "related") :

"related" not available for .Fortran() for package "related"

Timing stopped at: 0 0 0

I'm on R package version 4.2.1 and RStudio version 2022.07.2

Thanks for your help!

— Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimothyfrasier%2Frelated%2Fissues%2F11&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0%2FPpt%2FW6WFLADh%2FxJ1R9HfSqyLJr7v0Y9aQEek1GdBE%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA3NYWN5WNLOER5URHVPTV3WIQ2S5ANCNFSM6AAAAAASBTNVHQ&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2v3jC83xjp63JahroQINGf4wMvAHyYfTVZgsR4G%2FCHg%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/timothyfrasier/related/issues/11#issuecomment-1317221723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM4T3XVCXNRBRX5OU53Y5PTWIT6G3ANCNFSM6AAAAAASBTNVHQ. You are receiving this because you authored the thread.

timothyfrasier commented 1 year ago

Hi Shailee:

Great, thanks for letting me know.

-Tim


Timothy R. Frasier Coordinator: Forensic Sciences Program Professor: Biology Saint Mary's University 923 Robie Street Halifax, Nova Scotia B3H 3C3 Canada Tel: (902) 491-6382 E-mail: @.*** frasierlab.ca


From: shailee93 @.> Sent: Wednesday, March 22, 2023 3:36 PM To: timothyfrasier/related @.> Cc: Timothy Frasier @.>; Comment @.> Subject: Re: [timothyfrasier/related] error with coancestry() function on M1 Mac (Issue #11)

Hi Tim,

Sorry for the very late response to this! I ended up just switching to an older version of R (R 3.6.3), and it worked out. So I think the issue was probably driven by the latest version of R (R 4.2.2).

Best, Shailee


Shailee Shah (she/her), PhD Postdoctoral Research Associate, Chen Lab https://popgenchenlab.github.io/ University of Rochester https://shailee-shah.com https://shailee-shah.com/ • @shailee_shah93 https://twitter.com/shailee_shah93

On Nov 16, 2022, at 10:42, timothyfrasier @.***> wrote:

Hi:

Do you get this error when trying to estimate relatedness on the example data file, or just on your own? Please try to example data file and see how that works, and that will help with trouble-shooting.

Thanks! -Tim


Timothy R. Frasier Coordinator: Forensic Sciences Program Professor: Biology Saint Mary's University 923 Robie Street Halifax, Nova Scotia B3H 3C3 Canada Tel: (902) 491-6382 E-mail: @.*** frasierlab.ca


From: shailee93 @.> Sent: Tuesday, November 15, 2022 9:32 PM To: timothyfrasier/related @.> Cc: Subscribed @.***> Subject: [timothyfrasier/related] error with coancestry() function on M1 Mac (Issue #11)

Hi Tim,

I just re-installed related on my M1 Macbook Pro using the instructions you provided here: https://github.com/timothyfrasier/relatedhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimothyfrasier%2Frelated&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=KADCrH0i71Mgl1LklQSHDUXG%2BM9bUxH21VyNoevV8hA%3D&reserved=0

Here is the report from the installation:

install.packages("~/Downloads/related_1.0.tar.gz", repos = NULL, type = "source")

  • installing source package ‘related’ ...

** using staged installation

** libs

clang -mmacosx-version-min=10.13 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I/usr/local/include -fPIC -Wall -g -O2 -c family_sim.c -o family_sim.o

gfortran -mmacosx-version-min=10.13 -fno-optimize-sibling-calls -fPIC -Wall -g -O2 -c related.f90 -o related.o

related.f90:610:10:

610 | S = Sum(ObsAlleleFre(1 : ObsNumAllele(I), I))

| 1

Warning: Possible change of value in conversion from REAL(8) to REAL(4) at (1) [-Wconversion]

related.f90:1936:53:

1936 | if(abs(p)>=abs(.5_DPqetemp).or.p<=q(a-x).or.p>=q(b-x)) goto 1

| ^

Warning: 'e' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:1906:46:

1906 | REAL(DP) brent,tol,xmin,f,CGOLD,ZEPS,a,b,d,e,etemp, &

| ^

note: 'e' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

| ^

Warning: 'q[2]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

| ^

note: 'q[2]' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

| ^

Warning: 'q[1]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

| ^

note: 'q[1]' was declared here

related.f90:5105:49:

5105 | 3q(2)q(3) + q(1)(1 + 7q(2) + 7*q(3)))

| ^

Warning: 'q[0]' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:4961:34:

4961 | REAL(DP):: Y, P(4), e2, e0, Q(3)

| ^

note: 'q[0]' was declared here

related.f90:79:31:

79 | REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)

| ^

Warning: 'rr.offset' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:298:53:

298 | DCI95(J, I, K, M) = DD(I025(J), I, K)

| ^

Warning: 'dd.dim[2].stride' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:79:44:

79 | REAL, ALLOCATABLE :: RR(:, :), DD(:, :, :), FF(:, :, :)

| ^

note: 'dd.dim[2].stride' was declared here

related.f90:79:44: Warning: 'dd.dim[1].stride' may be used uninitialized [-Wmaybe-uninitialized]

related.f90:79:44: Warning: 'dd.offset' may be used uninitialized [-Wmaybe-uninitialized]

clang -mmacosx-version-min=10.13 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o related.so family_sim.o related.o -L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0 -L/usr/local/gfortran/lib -lgfortran -lquadmath -lm -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation

ld: warning: directory not found for option '-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin18/8.2.0'

ld: warning: ignoring file /usr/local/gfortran/lib/libgfortran.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

ld: warning: ignoring file related.o, building for macOS-x86_64 but attempting to link with file built for unknown-arm64

ld: warning: ignoring file /usr/local/gfortran/lib/libquadmath.dylib, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

installing to /Library/Frameworks/R.framework/Versions/4.2/Resources/library/00LOCK-related/00new/related/libs

** R

** data

** byte-compile and prepare package for lazy loading

** help

*** installing help indices

** building package indices

** installing vignettes

** testing if installed package can be loaded from temporary location

** checking absolute paths in shared objects and dynamic libraries

** testing if installed package can be loaded from final location

** testing if installed package keeps a record of temporary installation path

  • DONE (related)

I was able to use the readgenotype function to read in my genotype file, but when I try to run coancestry, it R gives me the following error:

Error in .Fortran("related", PACKAGE = "related") :

"related" not available for .Fortran() for package "related"

Timing stopped at: 0 0 0

I'm on R package version 4.2.1 and RStudio version 2022.07.2

Thanks for your help!

— Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimothyfrasier%2Frelated%2Fissues%2F11&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=0%2FPpt%2FW6WFLADh%2FxJ1R9HfSqyLJr7v0Y9aQEek1GdBE%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA3NYWN5WNLOER5URHVPTV3WIQ2S5ANCNFSM6AAAAAASBTNVHQ&data=05%7C01%7Ctimothy.frasier%40smu.ca%7Cfe8a78b1da4241f641f908dac7726e02%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638041591529161567%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2v3jC83xjp63JahroQINGf4wMvAHyYfTVZgsR4G%2FCHg%3D&reserved=0. You are receiving this because you are subscribed to this thread.Message ID: @.***> — Reply to this email directly, view it on GitHub https://github.com/timothyfrasier/related/issues/11#issuecomment-1317221723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM4T3XVCXNRBRX5OU53Y5PTWIT6G3ANCNFSM6AAAAAASBTNVHQ. You are receiving this because you authored the thread.

— Reply to this email directly, view it on GitHubhttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Ftimothyfrasier%2Frelated%2Fissues%2F11%23issuecomment-1480075273&data=05%7C01%7Ctimothy.frasier%40smu.ca%7C76e116fd68dc4c02763f08db2b045592%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638151069841027043%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UYQI7yvjAKE2kfPqI7ghO%2F6zB3uhaEp8%2Fr0EmN673UI%3D&reserved=0, or unsubscribehttps://can01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA3NYWPDXXAMX6TDRR7O6T3W5NBCLANCNFSM6AAAAAASBTNVHQ&data=05%7C01%7Ctimothy.frasier%40smu.ca%7C76e116fd68dc4c02763f08db2b045592%7C060b02ae57754360abbae2e29cca6627%7C1%7C0%7C638151069841183257%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PAWHXVW70ZA6mT7lEFnZZLLBykKa8WLO9BcLpZ%2B2JR8%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>