Gulp compilation in parallel

Dear Julian,

I am compiling gulp in parallel by ./mkgulp -m,

the error is given:

/usr/bin/ld: linpack.o: undefined reference to symbol ‘dswap_’
/g100_work/PROJECTS/spack/preprod/05/install/0.21/linux-centos8-skylake_avx512/gcc-12.2.0/openblas-0.3.24-ujvyhlet7scpglp4tbwpne6vsdtwczdc/lib/libopenblas.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make: *** [makefile:221: gulp] Error 1
mv: cannot stat ‘gulp’: No such file or directory

how can I fix this problem? Thank you

wang

Dear Wang,

dswap is just a standard part of BLAS & so this isn’t really a GULP issue - it just means you’re not linking the BLAS library correctly. If you can’t find an optimised one that works on your system you can always link the copy that comes with GULP.
Regards,
Julian

Dear Julian,

thanks for your reply.

I have fix the problem with BLAS by modifying the line in mkgulp file:
echo ‘LDFLAGS += -L/g100_work/IscrC_K-DEMOF/lammps/lammps-stable_2Aug2023_update4/blas/SS_DGBL3B -lgbl3b’ >> makefile

and recompile gulp, then the error is:
/usr/bin/ld: cannot find -lscalapack
collect2: error: ld returned 1 exit status
make: *** [makefile:221: gulp] Error 1
mv: cannot stat ‘gulp’: No such file or directory
it means I need to link lscalapack, so I used this command:

make LDFLAGS=“-L/g100/home/userexternal/nspallan/src/scalapack-2.1.0 -lscalapack -lblacs-openmpi”

then error again is:
make: *** No rule to make target ‘…/…/Utils/pGFNFF/Src//*.F90’, needed by ‘…/…/Utils/pGFNFF/Src//libpGFNFF.a’. Stop.

and I have no idea how to fix it and I can find these *.F90 and *.a files in …/Utils/pGFNFF/Src

Best,
wang

Dear Wang,
That’s how it goes with libraries - you just keep adding them until all the dependences are satisfied (if they’re not on the initial link line).
For the pGFNFF stuff, it should be automatically built by executing “mkgulp -m” for the parallel case. Of course if you’ve modified the Makefile or mkgulp then there is a chance you’ve broken something. You can always go to the source directory for the pGFNFF utility and either use the Makefile (with modifications to match your GULP build, such as same compiler, which should just be mpif90, and flags) to create the library or manually compile the source code and then build the library (using the commands from the Makefile). Hard to diagnose exactly what the issue is without access to your computer & files. All I can say is that the standard mkgulp should work if you’ve only modified the correct options. You might want to get a clean copy of the code with the correct options in mkgulp & then try building.
Regards,
Julian