- Edited
Hi, I am trying to install ISSM on my MacBook Pro (M1 chip) and am having some issues related to PETSC. At least I think this is the problem.
I installed all other external packages without issues. However, I had some issues installing PETSC using the install-3.17-mac-silicon.sh file. It gave me an error saying it could not located a C compiler, which may be an issue with my paths on local machine. It also had issues finding zlib so I downloaded the tar.gz file and directed to it in the installation file which seemed to work. Eventually I thought the install was successful after getting the message below.
Now to install the libraries do:
make PETSC_DIR=/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/src PETSC_ARCH=arch-darwin-c-opt install
=========================================
*** Using PETSC_DIR=/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/src PETSC_ARCH=arch-darwin-c-opt ***
*** Installing PETSc at prefix location: /Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install ***
====================================
Install complete.
Now to check if the libraries are working do (in current directory):
make PETSC_DIR=/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install PETSC_ARCH="" check
====================================
/usr/bin/make --no-print-directory -f makefile PETSC_ARCH=arch-darwin-c-opt PETSC_DIR=/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/src petsc4py-install libmesh-install mfem-install slepc-install hpddm-install amrex-install bamg-install
make[2]: Nothing to be done for `petsc4py-install'.
make[2]: Nothing to be done for `libmesh-install'.
make[2]: Nothing to be done for `mfem-install'.
make[2]: Nothing to be done for `slepc-install'.
make[2]: Nothing to be done for `hpddm-install'.
make[2]: Nothing to be done for `amrex-install'.
make[2]: Nothing to be done for `bamg-install'.
Next, I tried to compile ISSM by running the following
$ cd $ISSM_DIR
$ autoreconf -ivf
In configure.sh file, I copied and pasted the following which I found on the forum for M1 macs:
export FFLAGS=" -arch arm64"
export CFLAGS=" -arch arm64"
export LDFLAGS=" -arch arm64"
export CXXFLAGS=" -arch arm64"
./configure \
--without-Love --without-kml --without-Sealevelchange \
--prefix=$ISSM_DIR \
--without-wrappers \
--enable-debugging \
--enable-development \
--with-mpi-include="$ISSM_DIR/externalpackages/petsc/install/" \
--with-mpi-libflags="-L$ISSM_DIR/externalpackages/petsc/install/ -lmpich" \
--with-petsc-dir="$ISSM_DIR/externalpackages/petsc/install" \
--with-metis-dir="$ISSM_DIR/externalpackages/petsc/install" \
--with-scalapack-dir="$ISSM_DIR/externalpackages/petsc/install/" \
--with-mumps-dir="$ISSM_DIR/externalpackages/petsc/install/" \
--with-numthreads=4
$ cd $ISSM_DIR
$ make
$ make install
After running the above lines, I received the following error message:
In file included from ./cores/love_core.cpp:11:
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:39:14: error: use of undeclared identifier 'PETSC_COMM_SELF'
PetscError(PETSC_COMM_SELF,__LINE__,PETSC_FUNCTION_NAME,__FILE__,PETSC_ERR_SUP,PETSC_ERROR_INITIAL,"%s - Lapack routine is unavailable.",fname);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:39:39: error: use of undeclared identifier 'PETSC_FUNCTION_NAME'
PetscError(PETSC_COMM_SELF,__LINE__,PETSC_FUNCTION_NAME,__FILE__,PETSC_ERR_SUP,PETSC_ERROR_INITIAL,"%s - Lapack routine is unavailable.",fname);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:39:68: error: use of undeclared identifier 'PETSC_ERR_SUP'
PetscError(PETSC_COMM_SELF,__LINE__,PETSC_FUNCTION_NAME,__FILE__,PETSC_ERR_SUP,PETSC_ERROR_INITIAL,"%s - Lapack routine is unavailable.",fname);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:39:82: error: use of undeclared identifier 'PETSC_ERROR_INITIAL'
PetscError(PETSC_COMM_SELF,__LINE__,PETSC_FUNCTION_NAME,__FILE__,PETSC_ERR_SUP,PETSC_ERROR_INITIAL,"%s - Lapack routine is unavailable.",fname);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:40:13: error: use of undeclared identifier 'PETSC_COMM_SELF'
MPI_Abort(PETSC_COMM_SELF,PETSC_ERR_SUP);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:40:29: error: use of undeclared identifier 'PETSC_ERR_SUP'
MPI_Abort(PETSC_COMM_SELF,PETSC_ERR_SUP);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:45:31: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKgetrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:45:45: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKgetrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:45:59: error: unknown type name 'PetscScalar'
BLAS_EXTERN void LAPACKgetrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:45:72: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKgetrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:45:86: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKgetrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:45:100: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKgetrf_(PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:46:35: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKREALgetrf_(PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:46:49: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKREALgetrf_(PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:46:63: error: unknown type name 'PetscReal'
BLAS_EXTERN void LAPACKREALgetrf_(PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:46:74: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKREALgetrf_(PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:46:88: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKREALgetrf_(PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:46:102: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKREALgetrf_(PetscBLASInt*,PetscBLASInt*,PetscReal*,PetscBLASInt*,PetscBLASInt*,PetscBLASInt*);
^
/Users/amyjenson/svn/issm/trunk/externalpackages/petsc/install/include/petscblaslapack.h:47:31: error: unknown type name 'PetscBLASInt'
BLAS_EXTERN void LAPACKgetri_(PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*,PetscScalar*,PetscBLASInt*,PetscBLASInt*);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [cores/libISSMCore_la-love_core.lo] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
Any suggestions as to where the problem lies?
Thanks,
Amy