kernsuite / packaging

Use this repository to report issues with packages or request new packages
13 stars 4 forks source link

PSRCHIVE + TEMPO2 issue #208

Closed AlexKurek closed 4 years ago

AlexKurek commented 5 years ago

When I install PSRCHIVE from KERN-5 like follows:

apt-add-repository -s ppa:kernsuite/kern-5
apt-add-repository multiverse
apt-add-repository restricted
apt-get update
apt-get install -y psrcat psrchive tempo2

Im getting an error while using psradd:

psradd: system ("tempo2 -npsr 1 -f pulsar.par -pred "DE601HBA 58659.5007071352 58659.5423738019 118.06640625 189.55078125 12 2 3599.9999999999998" > stdout.txt 2> stderr.txt") failed: returned error code 1

Similar thing happens, when I install PSRCHIVE natively. I was able to fix this by installing entire TEMPO2 (entire, so not only bin, lib, include but everything) to the same folder as PSRCHIVE (not to PSRCHIVE/tempo2). Maybe it would be good to do the same in KERN?

Below I paste my installation script:

apt-get install -y csh gv pgplot5 fort77
mkdir -p ${INSTALLDIR}/PSRCHIVE/build
cd ${INSTALLDIR}/PSRCHIVE/build
git clone git://git.code.sf.net/p/psrchive/code psrchive
cd psrchive
./bootstrap
./configure --enable-shared F77=gfortran FFLAGS=-fPIC CFLAGS=-fPIC --prefix=${INSTALLDIR}/PSRCHIVE
cd packages && make && cd -
./packages/epsic.csh
export TEMPO2=${INSTALLDIR}/PSRCHIVE/
./packages/tempo2.csh
./packages/psrcat.csh
export PSRCAT_FILE=${INSTALLDIR}/PSRCHIVE/psrcat/psrcat.db
export PATH=${PATH}:${INSTALLDIR}/PSRCHIVE/bin
./configure --enable-shared F77=gfortran FFLAGS=-fPIC CFLAGS=-fPIC --prefix=${INSTALLDIR}/PSRCHIVE
make -j${J}
make install
rm -rf ${INSTALLDIR}/PSRCHIVE/{build,src}
strip ${INSTALLDIR}/PSRCHIVE/{bin,lib}/* || true

export PSRHOME=${INSTALLDIR}/PSRCHIVE
gijzelaerr commented 5 years ago

You pipe the output and error log to stdout.txt and stderr.txt. What is the content of these files?

AlexKurek commented 5 years ago

Not really, this is just what the error says. The only thing Ive done is this:

psradd -R -v J0814+7429_2019-06-25_12_31_00.lane*.zz -o J0814+7429_2019-06-25_12_31_00.lane123b.single.zz1

and I dont see this .txt files on my drive

gijzelaerr commented 5 years ago

psradd redirects stdout and stderr. What happens if you call tempo2 -npsr 1 -f pulsar.par -pred "DE601HBA 58659.5007071352 58659.5423738019 118.06640625 189.55078125 12 2 3599.9999999999998 manually.

AlexKurek commented 5 years ago

If I do this under KERN-5 instalation:

tempo2 -npsr 1 -f pulsar.par -pred "DE601HBA 58659.5007071352 58659.5423738019 118.06640625 189.55078125 12 2 3599.9999999999998"
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under conditions of GPL license.

Environment variable >TEMPO2< not set

and using my working manual installation, where I define TEMPO2 and other variables:

tempo2 -npsr 1 -f pulsar.par -pred "DE601HBA 58659.5007071352 58659.5423738019 118.06640625 189.55078125 12 2 3599.9999999999998"
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under conditions of GPL license.

ERROR [FILE3]: Unable to open parfile pulsar.par for pulsar 0

At the same time, psradd -R -v J0814+7429_2019-06-25_12_31_00.lane*.zz -o J0814+7429_2019-06-25_12_31_00.lane123b.single.zz1 is working fine under manual installation:

psradd -R -v J0814+7429_2019-06-25_12_31_00.lane*.zz -o J0814+7429_2019-06-25_12_31_00.lane123b.single.zz1
psradd: starting with J0814+7429_2019-06-25_12_31_00.lane1b.single.zz
psradd: New filename: 'J0814+7429_2019-06-25_12_31_00.lane123b.single.zz1'
psradd: appending J0814+7429_2019-06-25_12_31_00.lane2b.single.zz
psradd: appending J0814+7429_2019-06-25_12_31_00.lane3b.single.zz
psradd: Unloading archive: 'J0814+7429_2019-06-25_12_31_00.lane123b.single.zz1'
AlexKurek commented 4 years ago

AFAIK many people has problems installing PSRCHIVE from source. I paste here my set of commands for Ubuntu 18 and 20. It installs everything. FFTW is compilled so it can use all avalilable CPU instruction sets. Also swig is compilled at version 2, since v. 3 (standard in Ubuntu 18) crashes the compilation.

PSRCHIVE_install_Ub18.zip

PSRCHIVE_install_Ub20.zip

gijzelaerr commented 4 years ago

Unfortunately, due to time and budget constraints we are dropping pulsar packages from KERN-6.