Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_suite failure on Apple #146

Open
solomonik opened this issue Aug 29, 2022 · 1 comment
Open

test_suite failure on Apple #146

solomonik opened this issue Aug 29, 2022 · 1 comment

Comments

@solomonik
Copy link
Collaborator

make test2 seems to fail in autobuild, removed from autobuild to allow testing of other parts for the moment.

https://github.com/cyclops-community/ctf/runs/8080581891?check_suite_focus=true

@huttered40
Copy link
Contributor

FYI, I was able to build CTF on my mac with Clang+OpenMPI and Clang+MPICH. However, after some fiddling, was not able to correctly build with GCC+OpenMPI. The configure statement ran correctly, but I was getting errors similar to:

/usr/local/Cellar/open-mpi/4.1.5/bin/mpicxx -O3 -fopenmp -Wall  -D_POSIX_C_SOURCE=200112L -D__STDC_LIMIT_MACROS -DFTN_UNDERSCORE=1 -DUSE_LAPACK -DUSE_SCALAPACK  -I/usr/local/Cellar/open-mpi/4.1.5/include -I/usr/local/Cellar/openblas/0.3.23/include/ -fPIC -c memcontrol.cxx -o /Users/huttered40/Documents/my_libraries/CTF/ctf/obj_shared/memcontrol.o
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/sysctl.h:83,
                 from memcontrol.cxx:6:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/ucred.h:101:9: error: 'u_int' does not name a type; did you mean 'int'?
  101 |         u_int   cr_version;             /* structure layout version */
      |         ^~~~~
      |         int
In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/sysctl.h:85:
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/proc.h:116:9: error: 'u_int' does not name a type; did you mean 'int'?
  116 |         u_int   p_estcpu;        /* Time averaged value of p_cpticks. */
      |         ^~~~~
      |         int
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/proc.h:121:9: error: 'u_int' does not name a type; did you mean 'int'?
  121 |         u_int   p_swtime;        /* Time swapped in or out. */
      |         ^~~~~
      |         int
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/proc.h:122:9: error: 'u_int' does not name a type; did you mean 'int'?
  122 |         u_int   p_slptime;       /* Time since last blocked. */
      |         ^~~~~
      |         int
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/proc.h:136:9: error: 'u_char' does not name a type; did you mean 'char'?
  136 |         u_char  p_priority;     /* Process priority. */
      |         ^~~~~~
      |         char
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/proc.h:137:9: error: 'u_char' does not name a type; did you mean 'char'?
  137 |         u_char  p_usrpri;       /* User-priority based on p_cpu and p_nice. */
      |         ^~~~~~
      |         char
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/proc.h:142:9: error: 'u_short' does not name a type; did you mean 'short'?
  142 |         u_short p_xstat;        /* Exit status for wait; also stop signal. */
      |         ^~~~~~~
      |         short
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/proc.h:143:9: error: 'u_short' does not name a type; did you mean 'short'?
  143 |         u_short p_acflag;       /* Accounting flags. */
      |         ^~~~~~~
      |         short
/Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/usr/include/sys/sysctl.h:792:23: error: 'u_int' has not been declared
  792 | int     sysctl(int *, u_int, void *, size_t *, void *, size_t);
      |                       ^~~~~
make[3]: *** [/Users/huttered40/Documents/my_libraries/CTF/ctf/obj_shared/memcontrol.o] Error 1
make[2]: *** [shared] Error 2
make[1]: *** [ctf_objs] Error 2
make: *** [/Users/huttered40/Documents/my_libraries/CTF/ctf/lib_shared/libctf.so] Error 2

Also, I noticed that there seems to be an error in the configure file for Apple OSX: The ld binary is assumed to be able to use -rpath=... but it must be written as -rpath ... (i.e., a space rather than an equation symbol). After manually changing that in the configure file (in 2 places), the configure statement ran for GCC+OpenMPI on Mac OSX, but, as mentioned above, make python_test failed.

For reference, my configure statement was:

./configure CXX="/usr/local/Cellar/open-mpi/4.1.5/bin/mpicxx" INCLUDES="-I/usr/local/Cellar/open-mpi/4.1.5/include -I/usr/local/Cellar/openblas/0.3.23/include/" LIB_PATH="-L/usr/local/Cellar/open-mpi/4.1.5//lib/ -L/usr/local/Cellar/openblas/0.3.23/lib/ -L/usr/local/Cellar/scalapack/2.2.0_1/lib/" LIBS="-lblas -llapack -lmpi -lscalapack" LD_LIB_PATH="-L/usr/local/Cellar/open-mpi/4.1.5//lib/ -L/usr/local/Cellar/openblas/0.3.23/lib/ -L/usr/local/Cellar/scalapack/2.2.0_1/lib/" LD_LIBS="-lblas -llapack -lmpi -lscalapack"

and I had to set environment variables OMPI_CC, OMPI_CXX to the correct gcc,g++ binaries, respectively else it automatically linked to Clang.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants