Sorry for the delay in replying. :-\
I'm afraid we don't test with the NAG compiler. :-(
Would this be something that the NAG would be willing to do for the Open MPI community? Companies like Absoft do -- we have a light test suite that can be fully automated (i.e., run via cron). Ping me offline if you would be able to do this.
I suspect that the version of Libtool we're using doesn't fully understand the NAG compiler. We get many of the compile-time options by extracting them from Libtool.
We use Libtool 2.2.6b for OMPI v1.5. Do you know if that version of Libtool supports the NAG compiler well, or if a more recent version supports it better? Libtool made some fairly major changes late in the 2.2.x series that we don't really want to have to adapt to in the v1.5 series if we don't have to (i.e., we planned to adapt to them for the v1.7 series). But perhaps we could patch our Libtool for NAG...?
On Jun 27, 2011, at 5:24 AM, Ning Li wrote:
> I built OpenMPI 1.5.3 using NAG compiler v 5.2 on a new system running Fedora 15 (with gcc 4.6). OpenMPI can be built successfully, but when I compile a Fortran MPI application I got an error at link stage:
> gcc: error: unrecognized option --export-dynamic
> Note that NAG Fortran compiler generates intermediate C code and actually calls gcc to build the application.
> GCC 4.6 release note contains the following: "GCC now has stricter checks for invalid command-line options. In particular, when gcc was called to link object files rather than compile source code, it would previously accept and ignore all options starting with --, including linker options such as --as-needed and --export-dynamic, although such options would result in errors if any source code was compiled. Such options, if unknown to the compiler, are now rejected in all cases; if the intent was to pass them to the linker, options such as -Wl,--as-needed should be used."
> My next step was to track down where the illegal syntax was generated, using the '-showme' option provided by the OpenMPI compiler wrapper and '-dryrun' option provided by NAG compiler.
> [lining_at_combe pi]$ /home/lining/software/openmpi/1.5.3/nag/bin/mpif90 --showme pi.f90 -o pi.exe_nag
> nagfor pi.f90 -o pi.exe_nag -I/home/lining/software/openmpi/1.5.3/nag/include -pthread -I/home/lining/software/openmpi/1.5.3/nag/lib -L/home/lining/software/openmpi/1.5.3/nag/lib -lmpi_f90 -lmpi_f77 -lmpi -lnsl -lutil -lm -ldl -Wl,--export-dynamic -lnsl -lutil -lm -ldl
> [lining_at_combe pi]$ /home/lining/software/openmpi/1.5.3/nag/bin/mpif90 -dryrun pi.f90 -o tpi.exe_nag
> NAG Fortran Compiler Release 5.2(721)
> Option warning: Unrecognised option -pthread passed to loader
> /home/lining/software/NAG_Fortran/lib/forcomp -checkversion 5.2 721 -I/home/lining/software/openmpi/1.5.3/nag/include -I/home/lining/software/openmpi/1.5.3/nag/lib -library /home/lining/software/NAG_Fortran/lib -o /tmp/pi.024444.c pi.f90
> /usr/bin/gcc -I/home/lining/software/NAG_Fortran/lib -c -DANSI_C -DINT64=long long -funsigned-char -march=i686 -Wno-pointer-sign -o pi.o /tmp/pi.024444.c
> /usr/bin/gcc -o pi.exe_nag /home/lining/software/NAG_Fortran/lib/quickfit.o pi.o -pthread -L/home/lining/software/openmpi/1.5.3/nag/lib -lmpi_f90 -lmpi_f77 -lmpi -lnsl -lutil -lm -ldl -lnsl -lutil -lm -ldl -Wl,-rpath,/home/lining/software/NAG_Fortran/lib /home/lining/software/NAG_Fortran/lib/libf52.so /home/lining/software/NAG_Fortran/lib/libf52.a -lm --export-dynamic
> So OpenMPI generates the '-Wl,--export-dynamic' flag. When this is passed to NAG compiler, NAG compiler interprets this as "passing the '--export-dynamic' flag to the linker (gcc)" (which I believe is the correct behaviour). But gcc 4.6 expects to see '-Wl,--export-dynamic'.
> My temporary solution as supplied by NAG compiler developers is to edit share/openmpi/*-wrapper-data.txt and put flag '-Wl,-Wl,,--export-dynamic' there.
> Ning Li
> Technical Consultant
> Numerical Algorithms Group
> The Numerical Algorithms Group Ltd is a company registered in England
> and Wales with company number 1249803. The registered office is:
> Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.
> This e-mail has been scanned for all viruses by Star. The service is
> powered by MessageLabs.
> users mailing list
For corporate legal information go to: