sccn / amica

Code for AMICA: Adaptive Mixture ICA with shared components
BSD 2-Clause "Simplified" License
23 stars 13 forks source link

Compile amica on mac OS with M1. #44

Open skostrichegg opened 1 month ago

skostrichegg commented 1 month ago

Have anyone ever tried to compile amica on mac OS with M1?

Currently, intel doesn't support fortran compiler for mac OS. So I'm trying to compile amica with gfortran and mpich, but there are many compile errors like below.

=========================================================

...(skip)

Error: Function ‘omp_get_thread_num’ at (1) has no IMPLICIT type; did you mean ‘mpi_init_thread’? amica15.f90:2308:13:

2308 | blk_time(k) = dble(c2-c1)/dble(counts_per_sec) | 1 Error: Symbol ‘blk_time’ at (1) has no IMPLICIT type amica15.f90:129:10:

129 | thrdnum = omp_get_thread_num() | 1 Error: Function ‘omp_get_thread_num’ at (1) has no IMPLICIT type; did you mean ‘mpi_init_thread’? amica15.f90:131:20:

131 | num_thrds_used = omp_get_num_threads() | 1 Error: Function ‘omp_get_num_threads’ at (1) has no IMPLICIT type; did you mean ‘mpi_init_thread’? amica15.f90:813:21:

813 | comp_list(i,h) = (h-1) * nw + i | 1 Error: Symbol ‘comp_list’ at (1) has no IMPLICIT type

===========================================================

gfortran : 9.3.0 mpich : 2.3.0

Anyone has same problem with me?