incorrect AMD math library link order
Wei-Keng Liao
wkliao at northwestern.edu
Mon Mar 11 11:03:46 CDT 2024
Hi, Max
Could you modify build_pnetcdf.txt to compile a simple F90 program
(example programs can be found from MPICH repo in
https://urldefense.us/v3/__https://github.com/pmodels/mpich/tree/main/examples__;!!G_uCfscf7eWS!ZybsrnnDV1S14dcgjy_1LvdWBCaETPr4Q1Otck0NxOd88RAKBM7zkJ83Q92kLQB4fmAjZaQ61tIuZvbki1_Pap693pJ7Luw$ )
This is to see if the environment variables set in build_pnetcdf.txt
also work without PnetCDF? For example, run this command:
mpifort pi3f90.f90
If that works, could you try this configure command, without running
build_pnetcdf.txt? i.e. no environment variables are set.
./configure --with-mpi=$HOME/AOCC/opt/amd/ompi/5.0.2
If the above failed, please send me file config.log.
Wei-keng
On Mar 11, 2024, at 10:37 AM, Max R. Dechantsreiter <max at performancejones.com> wrote:
Hi Wei-keng,
...Same problem. I am attaching my build procedure.
I even tried hacking the Makefile and libtool, to no effect.
Best regards,
Max
---
On Mon, Mar 11, 2024 at 03:12:27PM +0000, Wei-Keng Liao wrote:
Hi, Max
Could you give the release candidate 1.13.0.rc1 a try?
The configure utility files have been updated since 1.12.3,
which may fix the problem.
https://urldefense.com/v3/__https://github.com/Parallel-NetCDF/Parallel-NetCDF.github.io/raw/master/Release/pnetcdf-1.13.0.rc1.tar.gz__;!!Dq0X2DkFhyF93HkjWTBQKhk!QaDTsobUHYLC8K-towJw_kn5rctCrB6wv3OdDy6h4_9yKnUNepXT1b2RCV-EcqmdpdkcMAcwrT2IN4hDGUZIk9s$
Wei-keng
On Mar 11, 2024, at 6:36 AM, Max R. Dechantsreiter <max at performancejones.com> wrote:
Hello Wei-Keng,
Building PnetCDF 1.12.3 with AOCC compilers, I found that
libamdlm is linked after libm ('-lm -lamdlibm') instead of
before as it should be; so far I have not found any way to
change this. If I set LIBS='-lamdlibm' and configure, both
FCLIBS and FLIBS in the resulting Makefile are assigned
-L/home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib -L/usr/lib/gcc/x86_64-linux-gnu/10 -L/lib/x86_64-linux-gnu -L/lib/../lib64 -L/usr/lib/x86_64-linux-gnu -L/home/maxd/AOCC/opt/amd/aocc/4.2.0/bin/../lib -L/lib -L/usr/lib -L/home/maxd/AOCC/opt/amd/aocl/4.2.0/aocc/lib -L/home/maxd/AOCC/opt/amd/aocc/4.2.0/lib -L/home/maxd/AOCC/opt/amd/aocc/4.2.0/lib32 -L. -lamdlibm -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lflangmain -lflang -lflangrti -lpgmath -lquadmath -lompstub -lm -lrt -lpthread
which is promising. However, in the link it's wrong:
libtool: link: /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/bin/mpif90 -I../../src/binding/f90 -ffree-form -I. -DN_DIM=3 -DMAXBLOCKS=100 -DIONMAX=13 -march=broadwell -mtune=broadwell -O3 -freciprocal-math -fPIC -o flash_benchmark_io get_mfluid_property.o flash_release.o flash_benchmark_io.o checkpoint_ncmpi_parallel.o plotfile_ncmpi_parallel.o -L../../src/libs /home/maxd/AOCC/Build/pnetcdf-1.12.3/src/libs/.libs/libpnetcdf.a -L/home/maxd/AOCC/opt/amd/ompi/hwloc-2.10.0_aocc-4.2.0/lib /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib/libmpi_usempif08.so /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib/libmpi_usempi_ignore_tkr.so /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib/libmpi_mpifh.so -L/home/maxd/AOCC/opt/amd/aocc/4.2.0/lib /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib/libmpi.so /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib/libopen-pal.so -lpthread -lrt /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib/libpmix.so -lutil -ldl -levent_core -levent_pthreads /home/maxd/AOCC/opt/amd/ompi/hwloc-2.10.0_aocc-4.2.0/lib/libhwloc.so -lm -lamdlibm -pthread -rpath /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib -rpath /home/maxd/AOCC/opt/amd/ompi/hwloc-2.10.0_aocc-4.2.0/lib -rpath /home/maxd/AOCC/opt/amd/ompi/openmpi-5.0.2_aocc-4.2.0/lib -rpath /home/maxd/AOCC/opt/amd/ompi/hwloc-2.10.0_aocc-4.2.0/lib
Any suggestion for how to remedy this?
Best regards,
Max
---
Max R. Dechantsreiter
President
Performance Jones L.L.C.
max at performancejones.com
Skype: PerformanceJones (UTC+01:00)
+1 414 446-3100 (telephone/voicemail)
https://urldefense.com/v3/__http://www.linkedin.com/in/benchmarking__;!!Dq0X2DkFhyF93HkjWTBQKhk!XoFfRmNF4v6X3b67Y51DU9xey_PcSw1VYyTqFCWAsLtD1l0FSMXpDqzdhbHEA9T8wvV7jXjXnH3AaDZYp90LdZg$
<build_pnetcdf.txt>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20240311/32dbe270/attachment-0001.html>
More information about the parallel-netcdf
mailing list