Hi Neks,
I have given -fPIE as well as the -fPIC option in core/makenek.inc at the compiler specification line and am now able to compile with -fPIE and -fPIC.
Unfortunately, the makenek command still terminates with the same error, as given below.
mpif77 -fPIE -fPIC -O2 -cpp -fdefault-real-8 -fdefault-double-8 -std=legacy -DMPI -DUNDERSCORE -DGLOBAL_LONG_LONG -DTIMER -I/home/user/Desktop/Ajeesh_PhD/Codes/Nek5000/Nek5000-19.0/run/eddy_uv -I/home/user/Ajeesh_PhD/Codes/Nek5000/Nek5000-19.0/core -I./ -I /home/user/Ajeesh_PhD/Codes/Nek5000/Nek5000-19.0/core/experimental -o nek5000 /home/user/Ajeesh_PhD/Codes/Nek5000/Nek5000-19.0/core/drive.f /home/user/Desktop/Ajeesh_PhD/Codes/Nek5000/Nek5000-19.0/run/eddy_uv/eddy_uv.o libnek5000.a -L/home/user/Ajeesh_PhD/Codes/Nek5000/Nek5000-19.0/3rd_party/blasLapack -lblasLapack -L/home/user/Ajeesh_PhD/Codes/Nek5000/Nek5000-19.0/3rd_party/gslib/lib -lgs -Wl,--allow-multiple-definition
/usr/bin/ld: /usr/local/lib/libmpich.a(allreduce.o): relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
make: *** [makefile:133: nek5000] Error 1
Any help will be deeply appreciated.