Re: Openmx linking problem ( No.1 ) |
- Date: 2008/10/01 01:13
- Name: Mauro Sgroi <maurosgroi@yahoo.it>
- Dear all,
after two days of trials I succeded to compile with dynamic atlas and fftw3 libraries. The point is to link the final excutable with mpif90 (gfortran) instead of mpicc. I modified slightly the makefile as follows:
CC=mpicc -O3 -mtune=native -m64 -ffast-math -fopenmp -I/opt/fftw-3.1.2/include -fPIC LD=mpif90 -O3 -mtune=native -m64 -ffast-math -fopenmp -I/opt/fftw-3.1.2/include -fPIC
LIB=-L/opt/fftw-3.1.2/lib -lfftw3 -L/opt/atlas/lib -latlas -lgfortran -rdynamic
The option -rdynamic is importan, as you get a segmentation fault without it.
Moreover the linker has been modiefied as follows:
openmx: $(OBJS)
$(LD) $(OBJS) $(STACK) $(LIB) -lm -o openmx
LD was placed instead of CC.
The obtained excutable run faster than the statically linked one and passed all the tests. I hope this information can be useful to someone. Best regards, Mauro Sgroi.
|
|